How It Works
On each conversion request, Passage queries Uniswap V3, Aerodrome, and Curve in parallel. It evaluates every available route for the token pair — including multi-hop paths — and scores each by total output, slippage, and execution cost.
If splitting the order across more than one exchange produces a better result than any single route, Passage selects that split automatically. The decision is deterministic and happens before any funds move.
The winning route — or split — executes through a smart contract in a single transaction. Funds move directly from the operator to the destination. The contract never holds a balance. If any leg of the swap fails, the entire transaction reverts.
Documentation
Passage is a TypeScript SDK and smart contract system for routing token swaps across multiple DEXs on Base mainnet. It finds the best available price for a conversion — across Uniswap V3, Aerodrome, and Curve — and executes the winning route atomically through a non-custodial contract.
npm install @passage-cr/routing-sdkIntegration is a single function call. Provide the input token, output token, amount, and your signer — Passage handles route discovery and execution.
import { PassageRouter } from "@passage-cr/routing-sdk"
const router = new PassageRouter({ network: "base" })
const tx = await router.swap({
tokenIn: "0x...", // input token address
tokenOut: "0x...", // output token address
amountIn: "1000000", // in token's smallest unit
signer, // ethers.js or viem signer
})
await tx.wait()Passage charges a 0.1% fee on each swap, deducted from the output amount. The fee is transparent and verifiable on-chain. There are no other charges — no subscription, no monthly minimum.
The contracts are non-custodial. At no point do they hold operator or player funds — assets move directly from sender to recipient within the transaction. The contracts have 2,300+ automated tests and have been subjected to extensive fuzz testing. The codebase is open source and auditable via the repository.
Two contracts are deployed on Base mainnet:
RouterGateway
Handles simple transfers between parties without a swap.
0xcfb93692ad4F8d9687a7730a6452f8b64EC7B607SwapGateway
Executes DEX-routed swaps with path optimization and atomic settlement.
0x6727b5539AFbc79b388f0832c4dCa564DE35eA1e