Skip to content

Fee logic ignores cancellation #38

@adamazad

Description

@adamazad

When orders are created, the OrderFactory substracts the fee from the principal:

https://github.com/ImpeccableHQ/stackly/blob/7bfd49daa0730577fb5f5f43d6c879cc533c719c/packages/contracts/src/OrderFactory.sol#L58-L59

This is problematic when canceling orders: the fee is not returned to the user. For instance, if a user deposits $1000, $1 is immediately paid to the protocol.

https://github.com/ImpeccableHQ/stackly/blob/7bfd49daa0730577fb5f5f43d6c879cc533c719c/packages/contracts/src/DCAOrder.sol#L125-L133

Protocol fees should be paid upon successful execution of orders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions