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
| Function | Description |
|---|---|
poolByPair(address tokenA, address tokenB) → address | The default pool for a pair (address(0) if none). |
createPool(address tokenA, address tokenB) → address | Create a default pool for a pair. |
defaultCommunityFee() → uint16 | Protocol fee share applied to new pools. |
Pool
Created per pair. Holds liquidity and executes swaps; usually accessed via periphery.
| Member | Description |
|---|---|
globalState() → (uint160 price, int24 tick, uint16 fee, ...) | Current price (sqrtPriceX96), tick, and dynamic fee. |
tickSpacing() → int24 | Tick granularity — position ticks must be multiples of this. |
liquidity() → uint128 | Currently active in-range liquidity. |
| Events | Swap, Mint, Burn, Initialize — indexed by the BarkSwap backend. |
Periphery
| Contract | Address | Use |
|---|---|---|
| SwapRouter | 0x911E5A1630fD1768E5A1710DAAFaBb865cB79531 | Execute swaps — see Swap. |
| QuoterV2 | 0x187b41968063Cb8A04A5f4d2113844EF2Ba21493 | Off-chain quotes via staticCall. |
| Quoter | 0x87d4cC67377B8AbE91BBD04bc8a8E9869559Ee36 | Legacy quoter. |
| NonfungiblePositionManager | 0xf596329a6c7E03F0708199cB5435f86783DB4302 | Mint/manage positions — see Provide liquidity. |
| TickLens | 0x0B565C5fc0d35a9A28b4f7be69a209CeF69C318C | Batch-read initialized ticks. |
| EternalFarming | 0xfdF9C6D8034733830AbE170fe203C69A6C1e7169 | Reward accounting backing the gauges. |
| FarmingCenter | 0xaBECc858bE28b4dD6200e3CD68F01a5422d48450 | Farming entry point. |
Key differences from Uniswap v3
- No fee tiers. A pair has one default pool with a dynamic fee; calls take a
deployeraddress (address(0)for default) where Uniswap takesfee. - Encoded paths pack addresses only — no fee bytes between hops.
globalState()replaces Uniswap'sslot0().