Skip to main content
TVL: ~$8M | Type: V3 Concentrated Liquidity | Docs: docs.pancakeswap.finance

Overview

PancakeSwap V3 is the second largest DEX on Monad by TVL. It implements concentrated liquidity identical in mechanics to Uniswap V3, but with its own factory, router, and fee structure. PancakeSwap offers a broader set of fee tiers and tends to have deeper liquidity for mid-cap tokens.

Functions

getPancakeSwapPools()

Returns all active PancakeSwap V3 pools on Monad. Returns
FieldTypeDescription
poolAddressAddressPool contract address
token0AddressFirst token address
token1AddressSecond token address
feenumberFee tier in bps (100, 500, 2500, 10000)
sqrtPriceX96bigintCurrent sqrt price Q64.96
liquiditybigintActive liquidity
ticknumberCurrent tick
import { getPancakeSwapPools } from 'rampart-monad'

const pools = await getPancakeSwapPools()
console.log(`${pools.length} PancakeSwap pools`)
pools.forEach(p => console.log(`Fee tier: ${p.fee / 100} bps`))

getPancakeSwapPrice()

Returns the spot price for a token pair across the best available PancakeSwap V3 pool. Parameters
NameTypeDescription
tokenAAddressInput token address
tokenBAddressOutput token address
Returns number. price of tokenA in units of tokenB.
import { getPancakeSwapPrice } from 'rampart-monad'

const price = await getPancakeSwapPrice(
  '0x...', // MON
  '0x...'  // USDC
)
console.log(`1 MON = ${price} USDC on PancakeSwap`)

getPancakeSwapQuote()

Returns an exact-input quote using PancakeSwap’s QuoterV2. Parameters
NameTypeDescription
tokenInAddressInput token address
tokenOutAddressOutput token address
amountInbigintExact input amount
Returns
FieldTypeDescription
amountOutbigintExpected output amount
sqrtPriceX96AfterbigintSqrt price after the swap
initializedTicksCrossednumberTicks crossed during swap
gasEstimatebigintEstimated gas cost
import { getPancakeSwapQuote } from 'rampart-monad'

const quote = await getPancakeSwapQuote(
  '0x...', // tokenIn
  '0x...', // tokenOut
  1_000_000n // 1 USDC (6 decimals)
)
console.log(`Expected out: ${quote.amountOut}`)
console.log(`Gas estimate: ${quote.gasEstimate}`)

getPancakeSwapTopPairs()

Returns the top trading pairs on PancakeSwap sorted by 24h volume. Returns
FieldTypeDescription
poolAddressAddressPool address
token0SymbolstringSymbol of token0
token1SymbolstringSymbol of token1
volume24hnumber24-hour volume in USD
tvlnumberTotal value locked in USD
feenumberFee tier in bps
import { getPancakeSwapTopPairs } from 'rampart-monad'

const topPairs = await getPancakeSwapTopPairs()
topPairs.slice(0, 5).forEach(pair => {
  console.log(`${pair.token0Symbol}/${pair.token1Symbol} - $${pair.volume24h} vol`)
})

Contract Addresses

ContractAddress
Factory V30x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865
SwapRouter0x13f4EA83D0bd40E75C8222255bc855a974568Dd4
QuoterV20xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997
NonfungiblePositionManager0x46A15B0b27311cedF172AB29E4f4766fbE7F4364