Core concepts
Five properties determine how every order behaves: escrow, partial fills, price bounds, expiry and visibility.
Orders are escrowed, not promised
When you create an order your assets move into the vault immediately. This is what makes a fill trustless: the counterparty can verify the goods exist before they part with anything, and the settlement is atomic.
The consequence is that an open order ties up capital. Cancel any time to get it back.
Partial fills
Both sides support them, bounded by a minimum fill size the order's creator sets. The minimum exists so a 500,000 USDC order is not chipped away by thousands of dust trades.
For an ask, the minimum is waived when a fill clears the entire remaining balance, otherwise the tail of a nearly-empty order would be unsellable.
Price bounds are mandatory
Every fill carries a bound, and it is checked against the price per token receivedafter fees.
- A buyer supplies
maxPricePerToken. If the true cost exceeds it, the transaction reverts. - A seller filling a bid supplies
minPricePerToken. If their net proceeds fall below it, the transaction reverts.
This is what makes re-pricing safe. An order's owner can move their price at any time; if they move it against you between your quote and your transaction landing, your fill reverts. It cannot execute at a worse price than you signed for.
Expiry and reclaim
Every order carries an expiry between 60 seconds and 90 days. After it passes, anyone can close the order, but the assets and the rent always return to the order's owner, never to whoever closed it. Abandoned escrow is always recoverable.
Private orders
An order can name a single counterparty. Only that wallet can fill it, and the order is hidden from public listings. This is the primitive for a negotiated block trade between two known parties.