Architecture / 03
Event-based order lifecycle
The implemented contract is an event-driven coordination layer. It does not contain the ECDSA RFQ quote-validation path previously described by this site.
State held on-chain
- Receiver, USDT, factory, fee and owner configuration.
- ERC-20 balances and allowances.
- Order nonce and create/fill/cancel logs.
State not held on-chain
- An order struct containing original terms.
- A pending / filled / cancelled state machine.
- Broker execution price or trade confirmation.
- A signed market-maker quote validated by the supplied implementation.
Open finding MED-01
Events are not enforceable order state. Privileged calls can emit fill or cancellation without proving order existence, pending status or parameter match.
Cancellation
The user signs an order ID for the API. The privileged backend verifies it and calls markOrderCancelled. Refunds require configured receiver allowances and balances.