Skip to main content

AMM core & periphery

BarkSwap's concentrated-liquidity AMM is a Uniswap v3-style design with a single dynamic-fee pool per pair (no fixed fee tiers). This page lists the entry points most integrations use; for full interfaces see bark_contracts/contracts/src/.

Factory

0xF3961157f56C983316657f0267B4C04460beE43f

FunctionDescription
poolByPair(address tokenA, address tokenB) → addressThe default pool for a pair (address(0) if none).
createPool(address tokenA, address tokenB) → addressCreate a default pool for a pair.
defaultCommunityFee() → uint16Protocol fee share applied to new pools.

Pool

Created per pair. Holds liquidity and executes swaps; usually accessed via periphery.

MemberDescription
globalState() → (uint160 price, int24 tick, uint16 fee, ...)Current price (sqrtPriceX96), tick, and dynamic fee.
tickSpacing() → int24Tick granularity — position ticks must be multiples of this.
liquidity() → uint128Currently active in-range liquidity.
EventsSwap, Mint, Burn, Initialize — indexed by the BarkSwap backend.

Periphery

ContractAddressUse
SwapRouter0x911E5A1630fD1768E5A1710DAAFaBb865cB79531Execute swaps — see Swap.
QuoterV20x187b41968063Cb8A04A5f4d2113844EF2Ba21493Off-chain quotes via staticCall.
Quoter0x87d4cC67377B8AbE91BBD04bc8a8E9869559Ee36Legacy quoter.
NonfungiblePositionManager0xf596329a6c7E03F0708199cB5435f86783DB4302Mint/manage positions — see Provide liquidity.
TickLens0x0B565C5fc0d35a9A28b4f7be69a209CeF69C318CBatch-read initialized ticks.
EternalFarming0xfdF9C6D8034733830AbE170fe203C69A6C1e7169Reward accounting backing the gauges.
FarmingCenter0xaBECc858bE28b4dD6200e3CD68F01a5422d48450Farming entry point.
Key differences from Uniswap v3
  • No fee tiers. A pair has one default pool with a dynamic fee; calls take a deployer address (address(0) for default) where Uniswap takes fee.
  • Encoded paths pack addresses only — no fee bytes between hops.
  • globalState() replaces Uniswap's slot0().
On this page
Jump to a section