Intent Lifecycle and Event Monitoring
Every trade on SYMMIO starts with an intent from a trader. Party A sends a quote on-chain that says, in effect: “I want to trade this symbol, in this direction, with this size and these conditions.” That quote includes things like symbol ID, position type (long/short), order type (market/limit), requested price, quantity, and the list of Party B addresses they’re willing to trade with. Once the transaction is confirmed, the quote is stored in the diamond’s state and an event is emitted. From that moment on, it’s visible to every solver listening.
On your side, a core piece of your solver is an event listener that watches the chain for these quote events. Whenever a new quote shows up where your Party B address is whitelisted, your system pulls in the full details of that intent and hands it off to your risk and pricing logic. This is where you decide: Do I want this trade or not? You might check symbol settings, notional limits, spread, available hedging inventory, or internal risk scores before you make a decision.
If you like the intent, the next step is to lock it. Locking a quote tells the protocol, “I’m taking this one, no one else can fill it now.” You allocate the required collateral on your side, call the appropriate Party B function on the diamond. Assuming all checks pass, the quote status moves from PENDING to LOCKED. From there you either immediately open the position or, in a two-step flow, open it shortly after once your hedge is in place. If you only want to fill part of the size, you open a partial amount and the remaining quantity can be re-posted as a new quote.
Solvers ought to track the life cycle of each quote. This is done by listening for events that tell you when a trader has requests to cancel their quote, to close a position, or cancel that close request. You monitor status changes like OPENED, CLOSE_PENDING, CANCELED, and LIQUIDATED, and keep your own internal state in sync. When something unexpected happens (like a force close or a failed transaction) you use those same events to reconcile your positions and risk engine.
Last updated
