Skip to content
LogoLogo

Async Swap

Async Swap

Async Swap is an MEV-capturing DEX: an on-chain order book and matching engine built as a Uniswap v4 hook. Value that searchers usually take from ordering and backruns goes to the protocol and LPs instead. Traders set a limit price for assets paired with USDC. Orders match with other traders or with the pool's active liquidity, and anyone can permissionlessly fill a resting order.

  • Price, then bid, then time. Book matching ranks orders by price. Among orders at the same price, a higher escrowed USDC priority bid goes first, and earlier orders break equal bids.
  • Ordering MEV is auctioned, not extracted. Priority bids are paid in USDC to the protocol's FeeVault, so jumping the queue at a price costs the bidder, not other traders.
  • Backruns pay LPs. Each pool's first fill in a 2-block window records the price before it. A later fill in that window that moves the same pool's price back toward it pays a dynamic fee of about half the backrun's profit, split between LPs and the protocol. Other pools are unaffected. See dynamic fee ordering.
  • Orders rest until they execute. Unfilled amounts stay open for later matching, a pool fill, a filler, repricing or cancellation.
  • No swap touches the curve directly. Every swap becomes an order. The only AMM swaps are the ones the hook makes to fill a resting order from pool liquidity, and those pay active LPs 0.02% and the protocol 0.01%. Book matches and filler fills take 0.02% of what each side receives.
  • Proceeds you can always claim. A book match credits both sides as PoolManager claims, which you redeem to any address through TokenClaims (ERC-20) or NativeClaims (ETH), or to your own wallet through Router.withdrawClaims. A recipient a token refuses cannot block matching.
  • Rules the owner cannot change. Anyone can open a USDC pool on the hook. The minimum order, the $0.10 priority-bid cap and the 0.0001-token asset floor are fixed when the hook is deployed; the owner can only collect fees, sweep stranded balances and transfer ownership.
  • Batch your actions. Router.multicall cancels several orders and withdraws claims in one atomic transaction, with no extra approvals.

Where to start

If you want toRead
Understand the contracts, custody and feesProtocol overview
Follow an order from placement to settlement, and how priority bids are paidOrder lifecycle and priority bids
See every call, callback and withdrawal stepContract call sequences
See how backrun MEV is captured for LPsDynamic fee ordering
Check how prices are compared and roundedPrice keys and crossing
Review the audit scope, known issues and previous findingsAudit scope
Look up a contract, function or eventContract reference

Status

The contracts are on asyncswap/contracts main. Every finding of the previous reviews is fixed or acknowledged; see the audit scope. These docs rebuild from that repository on every change to its sources, guides or audit notes.