Arkena Docs

How swaps work

Arkena uses signed swap intents matched against LP quotes by a settlement engine. Here is the full model.

Arkena's swap doesn't work like a Uniswap pool. There's no constant-product curve, no bonding bond. Instead, takers sign intents and liquidity providers publish quotes, and an engine matches them in batches.

The model is closer to CoW Protocol or to a continuous limit-order book than to an AMM. This page covers the parts a holder benefits from understanding.

The roles

There are two roles in any swap:

  • Taker. Wants to convert one token into another. Signs an intent saying "trade up to X for at least Y, before this deadline."
  • Liquidity provider. Publishes an LP quote saying "I'll swap up to N of token A for token B, at this rate." The quote stays active across many intents.

You can be a taker today and an LP tomorrow — the wallet supports both, and there's no commitment to either side.

The flow

TakerWalletBackendLedgerClick SwapPOST /swap/prepareintent + summaryPOST /swap/execute(sig)queue + match (1s tick)settle batchsettledreceipt
Swap intent — submitted, matched, settled

A swap goes through three observable states:

  1. Submitted. Your signed intent is in the engine's queue.
  2. Matching. The engine has found a candidate LP quote and is preparing to settle.
  3. Settled. The atomic settlement has confirmed on Canton. Balances have updated.

The engine batches intents on a fast tick — typically once per second. That's where the "few-second latency" comes from.

Why this design

Arkena chose intent-and-batch for three reasons.

Cheaper failure. With an AMM, a failed transaction still costs network fees; with an intent, an unmatched intent costs nothing. The deadline lets the engine retry as conditions change, instead of you re-submitting.

Better fills. A single intent can be split across multiple LP quotes in the same settlement batch. You get the best aggregate price the engine can construct from current quotes.

Cancellable. Until the engine commits a match to the ledger, you can cancel. With AMM-style swaps, your transaction is in flight and uncancellable the moment it's submitted.

The trade-off is latency: a few seconds vs. one block on a typical AMM. For most swap sizes the price improvement and the absence of failed-tx overhead make up for it.

Partial fills, on the LP side

When an LP's quote is larger than the taker's intent, only part of the quote is consumed. The original quote contract is replaced with a successor that has reduced capacity, and the LP keeps quoting on the rest.

This is invisible to takers — you get your full output for the size you asked for. It's the LP's bookkeeping that quietly tracks remaining capacity across many fills.

How this compares

AMM (Uniswap V2-style)Arkena (intent + batch)CoW Protocol
Pricingconstant-product curveLP-set quotesmatched between users + AMMs
Failed tx costyesnono
Cancellablenoyes (pre-match)yes
Settlementper-tx, single blockbatched, ~1–2 secbatched, per auction
MEV exposurehighlow (batched)very low

What's next