Description: Currently, TradeFlow only supports market orders. We want to allow users to place limit orders. The core contract must store the order intent, allowing off-chain "keepers" to execute the trade when the market price meets the order criteria.
Context / Motivation: Advanced traders require limit orders. Moving this on-chain allows TradeFlow to capture a more sophisticated demographic of DeFi users while rewarding keepers for network maintenance.
Acceptance Criteria: - [ ] Implement a create_limit_order function locking the user's input asset.
Description: Currently, TradeFlow only supports market orders. We want to allow users to place limit orders. The core contract must store the order intent, allowing off-chain "keepers" to execute the trade when the market price meets the order criteria.
Context / Motivation: Advanced traders require limit orders. Moving this on-chain allows TradeFlow to capture a more sophisticated demographic of DeFi users while rewarding keepers for network maintenance.
Acceptance Criteria: - [ ] Implement a
create_limit_orderfunction locking the user's input asset.execute_limit_orderfunction callable by anyone, which verifies the current pool price satisfies the order.Technical Pointers: Store limit orders in
persistentstorage mapped by an incremental ID or userAddress. Emit a Soroban event (Env::events().publish()) upon order creation so off-chain backend indexing (TradeFlow-API) can track them easily.