Swap

Live on Testnet

Swap flows guide

This guide documents every swap path the Aurove dapp can plan and execute today. Content is limited to behaviour implemented in the Swap UI (/#swap-interface) and routers it calls. Each flow below was checked against a running local Hardhat deployment (chain id 31337) with live contract calls where noted.

Where to swap

All swaps run through the homepage Swap card (Open swap). App nav Swap and legacy /swap redirect to the same surface.

Aurove swap card
Homepage Swap card: Sell and Buy assets, reverse direction, slippage settings, and the primary action (Connect / Approve / Review swap).

Supported asset forms

FormSell sideBuy sideUI group
erc20 (e.g. MUSD)YesYesERC-20 / Other ERC-20
id20 (e.g. avBTCm, avMEZOm)YesYes (preferred)ID20 tokens
underlying (BTC / MEZO deposit-into-managed)YesNoERC-20 tokens (special deposit label)
tranche (Ledger ERC-1155)YesNoLedger tranches
venft (veBTC / veMEZO position)Yes (entire lock only)NoveNFT positions

Plan types (what the router does)

Sell form → execution plan
ERC-20 / ID20
directClSwap
CLSwapRouter
Underlying BTC/MEZO
zapErc20*
Zap: deposit → wrap → CL
Tranche ERC-1155
zapTranche*
Zap: wrap → CL
veNFT
zapVeNftExactInput
Zap: deposit → wrap → CL

Flow 1 — Swap ID20 tokens (direct CL)

Status: Verified (tx) · UI-supported

Sell a liquid ID20 (for example avBTCm) for another pool token (for example MUSD) through the concentrated-liquidity router with no Aurove deposit step.

Plan typedirectClSwapexactInputSingle / exactInput (or exact-output variants)
RouterCLSwapRouter
ApprovalERC-20 approve of the ID20 to CLSwapRouter
You sendID20 amount (or max-in for exact-output)
You receiveBuy-side ERC-20 or ID20 in your wallet

Steps

  1. Open Swap and connect a wallet on the active network.
  2. Sell → open the asset picker → under ERC-20 tokens / liquid assets choose an ID20 marked Liquid ID20 (e.g. avBTCm).
  3. Buy → choose MUSD or another routable ERC-20 / ID20 with a CL path.
  4. Enter amount (or Max). Confirm quote details (route, min received, impact).
  5. Approve the ID20 if prompted, then Review swap Swap.

Edge cases

  • No CL route → button shows No route available.
  • High impact (≥ 5%) shows an amber warning under the quote.
  • Exact-output is allowed for ID20 sells (edit the Buy amount).

Flow 2 — Swap plain ERC-20 (e.g. MUSD)

Status: Verified (tx) · UI-supported

Same directClSwap path as ID20 when both sides are fungible ERC-20s (or ID20) already listed on a registered pool route.

ExampleMUSD → avBTCm on the MUSD/avBTCm pool
ApprovalERC-20 approve of sell token to CLSwapRouter
OutputBuy token balance increases; sell token decreases

Steps

  1. Sell → select MUSD (or other ERC-20 with a route).
  2. Buy → select avBTCm / avMEZOm / another ERC-20.
  3. Amount → Approve → Review → Swap.

Flow 3 — Swap underlying BTC / MEZO (deposit then swap)

Status: Verified (tx) · UI-supported

Selling underlying BTC or MEZO does not swap the raw token on the pool. The zap router deposits into the managed tranche, wraps to ID20, then swaps that ID20 along the CL path in one transaction.

Plan typeauroveDepositWrapThenSwap
RouterAuroveZapRouter.zapErc20ExactInput (or zapErc20ExactOutput)
ApprovalERC-20 approve of BTC/MEZO to AuroveZapRouter
You sendUnderlying BTC or MEZO
You receiveBuy-side token only (intermediate ID20 is not left in your wallet from this zap)
Side effectsManaged vault inventory increases; tranche/ID20 supply accounting updates

Steps

  1. Sell → pick the underlying entry (UI name includes “deposit into …” for managed avBTCm / avMEZOm).
  2. Buy → MUSD or another token reachable from the managed ID20 pool path.
  3. Enter amount → Approve underlying → Review → Swap.
  4. Quote details show Before swap: Deposits and wraps into ID20 before swapping.

Edge cases

  • Requires managed ID20 + pool liquidity for the path after wrap.
  • Exact-output is supported for this plan type in code when quoting allows it.

Flow 4 — Swap Ledger tranches (wrap then swap)

Status: Verified (tx) · UI-supported

Sell ERC-1155 tranche shares you already hold. The zap router wraps them to the matching ID20, then swaps on CL.

Plan typeauroveWrapThenSwap
RouterAuroveZapRouter.zapTrancheExactInput / zapTrancheExactOutput
ApprovalERC-1155 setApprovalForAll of Ledger → AuroveZapRouter
You sendPartial or full tranche balance (any amount ≤ balance)
You receiveBuy-side ERC-20 / ID20

Steps

  1. Hold tranche inventory (from Earn deposit). Confirm under Earn → Your Liquid Positions or Swap sell balances.
  2. Swap → Sell → group Ledger tranches → select managed product tranche.
  3. Enter a partial amount to sell only a fraction of the position.
  4. Approve Ledger operator if prompted → Review → Swap.

Flow 5 — Partial veNFT exit (Earn deposit + tranche swap)

Status: Verified as two composed steps (Earn deposit + Flow 4) · Not a single Swap button that sells “part of a veNFT” directly

The Swap UI only sells an entire veNFT in one zap (Flow 6). To sell a fraction of locked power you must first deposit the veNFT (or lock tokens) into Aurove, then sell tranche shares.

Earn Create Position card
Earn → Create Position: Deposit position (veNFT) or Lock tokens, then choose BTC or MEZO. Deposits mint liquid tranche inventory you can later swap.

Steps

  1. Open Earn.
  2. Deposit position — select your veBTC/veMEZO NFT, approve the NFT for the Ledger, deposit; or Lock tokens — deposit BTC/MEZO ERC-20 into the managed product.
  3. Confirm balances under Your Liquid Positions (tranche / liquid product inventory).
  4. Open Swap → Sell → Ledger tranches (or liquid ID20 if you already wrapped).
  5. Enter the fraction to sell → Approve → Review → Swap (Flow 4 or Flow 1).
After Earn depositYou hold ERC-1155 tranche shares (and may wrap to ID20)
After partial swapTranche/ID20 balance decreases by the sold amount; buy token increases
Remaining positionUnsold tranche remains and continues to participate in managed yield

Flow 6 — Swap an entire veNFT

Status: Verified (tx) · UI-supported · exact-input only

Sell a full veBTC or veMEZO NFT in one transaction: deposit into the managed tranche, wrap, and swap to the buy token via the zap router.

Plan typeauroveVeNftThenSwap
RouterAuroveZapRouter.zapVeNftExactInput
ApprovalERC-721 approve of the veNFT to AuroveZapRouter
Sell amountFixed to the NFT lock amount (inputs are read-only)
Swap typeexactInput only — exact-output is rejected in the planner
You receiveBuy-side ERC-20 / ID20; the veNFT leaves your wallet

Steps

  1. Hold a veBTC or veMEZO in the connected wallet on the active chain.
  2. Swap → Sell → group veNFT positions → select veBTC #… / veMEZO #….
  3. Amount fills automatically from lock size; Buy amount is also read-only for this flow.
  4. Select buy token with a valid route from the managed ID20.
  5. Approve the NFT → Review → Swap.

Edge cases

  • Empty veNFT list if the wallet has no positions or portfolio read fails.
  • Cannot reverse a veNFT sell into “buy veNFT” — buy side is fungible only.
  • Cannot sell “half” of a veNFT in one swap; use Flow 5 for partial exit.

Approvals cheat sheet

Sell formTokenSpender / operatorKind
erc20 / id20Sell ERC-20CLSwapRouterERC-20 allowance
underlyingBTC / MEZOAuroveZapRouterERC-20 allowance
trancheLedgerAuroveZapRouterERC-1155 setApprovalForAll
venftveBTC / veMEZOAuroveZapRouterERC-721 approve (tokenId)

Common UI states

Button / panelMeaning
Connect WalletNo wallet connected
Loading markets… / Unable to load marketsRegistry fetch
No route available / Insufficient liquidityNo CL path or empty pool path
Approve …Missing allowance / operator approval
Review swapReady to open confirmation dialog
Quote details → Before swapZap plan will deposit/wrap before the CL swap

Pools powering routes (configured)

  • MUSD / avBTCm — primary stable ↔ liquid BTC path
  • avBTCm / avMEZOm — liquid BTC ↔ liquid MEZO path

Multi-hop routes up to the configured max hops (default 3) when a direct pool is missing. See also Providing liquidity.

Limitations (do not assume)

  • Swaps use concentrated-liquidity AMM routes only (not limit orders).
  • No buy-side veNFT or tranche purchases in Swap.
  • Partial veNFT amount is not a native swap control; use Earn deposit + tranche sell.
  • veNFT sells are exact-input only (planner rejects exact-output).
  • Academy points may accrue for qualifying swaps through supported pools; that is separate from swap execution (see Points).

Related

  1. Connect wallet on the correct chain.
  2. Pick Sell form (ID20, ERC-20, underlying, tranche, or entire veNFT).
  3. Pick Buy ID20/ERC-20 with a live quote.
  4. Approve the correct token kind, then Review → Swap.
  5. For partial ve exit: Earn deposit first, then sell tranche amount.
swapflowsvenfttrancheid20zapexact-inputapprovals

© 2026 Aurove. Protocol documentation for Mezo testnet deployments.