Trade lifecycle
One swap, step by step. The full cycle typically completes in one to four minutes, most of that zero-knowledge proof generation and block time.
1. The user asks for a price. The pricing engine computes the fair market rate (pricing), adds the spread (the spread), and checks a fixed, ordered chain of gates: global halt, pair paused, a pricing risk-flag, token eligibility, size within the pair's bounds, the double-sample price-drift check, enough inventory to pay out, enough hedge capacity for the risk this trade creates. The first no stops everything; a clean pass all the way through returns a quote, and at that point the inventory and hedge budget behind it are reserved.
2. The user commits on-chain. Their wallet signs one transaction depositing the sold token into the source escrow, together with a secret hash and a deadline (the contracts).
3. The scanner detects and vets. A service watches the chain continuously. When the order appears it re-runs the refusal checks against the real on-chain order, including whether the market has drifted too far since the quote. An order that fails any check is never filled; the escrow refunds the user automatically at the deadline.
4. The settler fills. The execution service deposits the bought token into the destination escrow, locked to the same secret hash. This is the moment the desk commits its own capital. Execution is at-most-once by construction: the desk's own ledger makes filling the same order twice impossible, even if every upstream safeguard failed. If the chain's confirmation of a submitted fill is unclear, the desk records nothing and raises the uncertainty for a human to resolve against the chain directly, rather than writing down a fill it isn't sure happened.
5. The hedge opens. The instant the fill confirms, the hedging engine opens an offsetting position on an external exchange (hedging and risk). A fill that cannot be hedged is parked for operator triage.
6. Both sides settle. The user reveals their secret and receives their tokens, or lets Abyss submit the claim and pay the fee for them. Revealing the secret is what lets the desk claim the user's deposit on the source side. Independent reconciliation jobs then re-derive every order, hedge, and balance from the chain and the exchanges, so a missed event can delay bookkeeping but never corrupt it.
Where the user stands throughout
The user acts exactly twice (deposit, claim); everything between is automatic. At no point does Abyss hold both sides of the trade, and if Abyss disappeared mid-swap, the user's deposit would return automatically at the deadline with no action from anyone.