WDK logoWDK documentation

Swap tokens with Velora

Quote and execute EVM token swaps through Velora for standard and smart-account wallet flows.

Use the Velora swap module to quote and execute token swaps on EVM chains. It works with standard EVM accounts and ERC-4337 smart accounts.

Features

  • Token Swapping: Execute token swaps through velora on supported EVM networks
  • Account Abstraction: Compatible with standard EVM accounts and ERC‑4337 smart accounts
  • Fee Controls: Optional swapMaxFee to cap gas costs
  • Approval-aware swaps: Approve input tokens with the wallet account before swapping when allowance is required
  • Provider Flexibility: Works with JSON‑RPC URLs and EIP‑1193 providers
  • TypeScript Support: Full TypeScript definitions included

Supported Networks

Works with EVM networks supported by velora (e.g., Ethereum, Polygon, Arbitrum, etc.). A working RPC provider is required.

Wallet Compatibility

The swap service supports multiple EVM wallet types:

  • Standard EVM Wallets: @tetherto/wdk-wallet-evm accounts
  • ERC‑4337 Smart Accounts: @tetherto/wdk-wallet-evm-erc-4337 accounts with bundler/paymaster
  • Read‑Only Accounts: For quoting swaps without sending transactions

Key Components

  • velora Integration: Uses velora aggregator for routing and quotes
  • Quote System: Pre‑transaction fee and amount estimation via quoteSwap
  • AA Integration: Optional paymaster, sponsorship, native-fee, and fee-cap overrides when using ERC‑4337
  • Read-only quoting: Quote swaps from read-only EVM and ERC‑4337 accounts

Next Steps


Need Help?

On this page