Trading and routing
Quote authority, route construction, slippage, settlement, and failure states.
Quote flow
The Abyss API currently supports exact-input quote requests. It discovers connected simple routes from one to four hops, obtains output from the deployed AbyssQuoter at a pinned quotedBlock, and simulates the exact router request from the supplied sender.
The response is unsigned. The API never holds keys, signs, or broadcasts transactions.
Route identity
Each hop includes a complete PoolKey, input token, and square-root price limit. Routes must be connected, cannot repeat a pool, and cannot exceed four hops. Intermediate output is held by the router and paid into the next pool. The final output goes to the selected recipient.
Single-pool operations
The router exposes:
exactInputSingle, which spends an exact input and enforces minimum output;exactOutputSingle, which requests an exact output and enforces maximum input; andexactInput, which executes a route of one to four pools and enforces final minimum output.
The public API quote endpoint supports exact input only, even though the router has a single-pool exact-output function.
Slippage and deadlines
Slippage tolerance is converted into amountOutMinimum for exact-input execution. If final output is lower, the transaction reverts. A deadline is a Unix timestamp after which the router rejects execution.
Slippage protection limits execution away from a quote. It does not prevent sandwiching, adverse selection, failed execution, or loss from token behavior.
Callback authentication
During each swap, the router resolves the complete pool key through the factory. Callback data binds that key, the exact resolved pool, and the payer. On callback, the router resolves the key again and requires both msg.sender and the bound address to match. Being some factory-recognized pool is insufficient.
The pool verifies actual balance increase after callback rather than trusting a reported payment amount.
Common failure states
| State | Meaning |
|---|---|
| Wallet rejection | The user declined the signature or transaction request. |
| Wrong chain | The wallet provider is not on RISE Mainnet. |
| Quote unavailable | No valid connected route could be quoted at current state. |
| Quote stale | Pool state changed after the quoted block. |
| Insufficient allowance | The router cannot transfer the input token. |
| Slippage exceeded | Output fell below the minimum or input exceeded the maximum. |
| Deadline expired | The transaction reached execution after its deadline. |
| Payment failed | Callback settlement did not increase the pool balance enough. |
| RPC or indexer failure | Required current or discovery data could not be obtained. |
Transaction submission is not success. A confirmed successful receipt is the state-change boundary.