Summary
When a user calls exchange_router::cancel_order, the collateral token is returned but the execution fee (paid in XLM/native token to incentivise the keeper) is silently retained in the order_vault. Users lose the execution fee even though no keeper performed any work.
Expected Behaviour
On user-initiated cancellation, the full execution fee should be returned to the user. The keeper fee is only earned upon a successful (or failed-but-attempted) execution.
Steps to Reproduce
- Create an order with execution_fee = 1 XLM
- Call
cancel_order before keeper executes
- Check user wallet — collateral returned, 1 XLM missing
Acceptance Criteria
Affected Contract
exchange_router, order_vault
Summary
When a user calls
exchange_router::cancel_order, the collateral token is returned but the execution fee (paid in XLM/native token to incentivise the keeper) is silently retained in theorder_vault. Users lose the execution fee even though no keeper performed any work.Expected Behaviour
On user-initiated cancellation, the full execution fee should be returned to the user. The keeper fee is only earned upon a successful (or failed-but-attempted) execution.
Steps to Reproduce
cancel_orderbefore keeper executesAcceptance Criteria
cancel_ordertransfers execution fee back toenv.invoker()execute_order_fail) still pays keeper the execution feeAffected Contract
exchange_router,order_vault