Skip to main content

Token Swapping (AMM)

Cat Wallet features a fully functional Automated Market Maker (AMM) built directly into the dashboard, enabling users to trade tokens instantly on the Ritual Chain.

Contracts

ContractAddress
CatWalletSwapFactory0xB2DBAAf0078E6926BdFC239741fC1e29946eC18c
CatWalletSwapRouter0x2De3d1506d3442643145e1688cd24753c321CD12

How Swapping Works

The swap interface interacts directly with the CatWalletSwapRouter smart contract.

  1. Liquidity Pools: The AMM relies on liquidity pools managed by the CatWalletSwapFactory contract.
  2. Automated Pricing: Prices are determined automatically based on the constant product formula ($x \cdot y = k$).
  3. Approvals: Swapping an ERC-20 token (like rUSD) requires a prior approval of the CatWalletSwapRouter. Swapping native RITUAL requires no approval.

Active Pools (10)

PoolDirection
RITUAL ↔ rUSDNative pair
RITUAL ↔ rBTCNative pair
RITUAL ↔ rETHNative pair
RITUAL ↔ rSOLNative pair
RITUAL ↔ rDAINative pair
rUSD ↔ rBTCToken pair
rUSD ↔ rETHToken pair
rUSD ↔ rDAIToken pair
rETH ↔ rBTCToken pair
rSOL ↔ rUSDToken pair

Slippage Tolerance

  • Default: 1%
  • Options: 0.5%, 1%, 3%, 5%
  • If execution price falls outside your tolerance while the transaction is confirming, the swap will automatically revert.

High Price Impact Warning

If your trade exceeds 15% price impact, Cat Wallet displays a warning that must be explicitly acknowledged.

Error Handling

ErrorCauseFix
"RPC Hiccup"Transient Ritual testnet node errorAuto-retried after 2s
"Price Moved"Pool reserves shifted while pendingIncrease slippage or retry
"transaction type not supported"Wallet sent EIP-1559 txCat Wallet applies legacy gasPrice override automatically
"expired"Deadline passed before tx minedRitual uses ms timestamps — deadline must be Date.now() + bufferMs