Skip to main content
The planned V3 helpers will find a BDEX V3 pool for a token pair and fee tier, and quote a single-pool swap. You can do both today with viem and the SDK’s V3 ABIs.
In development. This describes the planned API. It is not published yet and details may change. Follow progress on GitHub.

Planned functions

The names below come from the SDK plan. Parameters and return types aren’t final, so they aren’t listed.

getPoolV3

Will return the pool address for two tokens and a fee tier, using the V3 factory’s getPool(tokenA, tokenB, fee). The factory returns the zero address when no pool exists. BDEX V3 pools on testnet use the 500, 3000 and 10000 fee tiers (0.05%, 0.30% and 1%).

quoteExactInputSingleV3

Will quote a swap through one pool with QuoterV2’s quoteExactInputSingle. QuoterV2 isn’t a view function: it runs the swap and reverts to return the result, so it has to be simulated, not read. A pool with no liquidity at the current price makes it revert.

Do it today

The SDK ships bdexV3FactoryAbi, bdexV3QuoterV2Abi and bdexV3SwapRouterAbi, with addresses for both networks.
v3-quote.ts
Quotes differ a lot between fee tiers on testnet, so always compare them. To send the swap, call SwapRouter’s exactInputSingle with the best tier. The full, tested script is in Swap on BDEX V3.
getAddresses(968) has a universalRouter, but mainnet doesn’t, because the mainnet Universal Router isn’t confirmed. Use SwapRouter for V3 swaps on both networks.

BDEX V2

Simpler pools with one fee.

Provide V3 liquidity

Add liquidity to a V3 pool.
Last modified on October 3, 2026