Order lifecycle
Every trade moves through a small set of states — lock, then either fill and settle, or expire and reclaim. The chain enforces the rules, so neither side can cheat.
1. Lock
You submit an order and it escrows your funds on-chain. A buy locks USDC; a sell locks your broAsset. You set two protections:
- Min received — the least you will accept out of the fill, derived from the max slippage you pick.
- Expiry — after this time an unfilled order can be reclaimed in full (1d, 7d, or 30d).
2. Fill
The broker submits the fill and the chain checks the output against your min received, so a fill can never pay you less than you agreed. On a buy the broker mints the broAsset to your wallet and takes the escrowed USDC; on a sell it pays USDC and the broAsset is burned. A filled order is consumed and deleted on-chain in the same transaction, reclaiming its storage.
3. Settle · or · 4. Reclaim
- Settle — the fill clears, you receive at least your min received, and the order closes.
- Reclaim — if the broker cannot beat your min received before expiry, you withdraw your escrowed funds in full. Nothing is lost.
Grace period
For a short fixed window after you place an order, it cannot be cancelled. This grace period protects the broker from place-and-cancel griefing — a taker pulling the order the instant the broker commits capital to hedge it. After the window passes you can cancel any time before a fill lands.
Why min-received matters
The broker self-quotes the fill price (from live executable DEX prices, not an on-chain oracle). Min received is what makes that safe: you never have to trust the quote is fair — only the on-chain guarantee that you receive at least the amount you signed for, or your funds come back.