Skip to content

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.

You Abyss Ask for a price firm quote, rate locked Deposit on-chain one wallet approval Claim you reveal, desk collects Detect and vet every check re-run Fill desk capital committed Hedge risk neutralized 1 2 3 4 5 6 seconds ~20 s moments later full cycle: 1-4 minutes
Figure. One swap on a timeline. You act twice (deposit, claim); everything between is automatic, and Abyss never holds both sides of the trade.

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.

Before any quote, eight questions, in order, all answered yes: 1 · No halt?global stop off 2 · Pair active?not paused 3 · Risk flag clear?pricing not flagged 4 · Token on?enabled to trade 5 · Size in band?within pair max 6 · Price stable?two samples agree 7 · Inventory?coins reserved 8 · Hedge room?budget reserved Firm quote issued inventory and hedge budget now locked to this quote Any single "no" means no quote and nothing reserved. The desk never promises what it cannot deliver.
Figure. The quote gate chain, run in this exact order. The first failure stops everything, so a quote is a promise the desk has already verified it can keep. A separate, tighter version of the price-stability and size checks runs again at fill time, minutes later, against whatever the market is doing by then.

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.