Bonsaiswap Docs
  • 🌿Bonsaiswap Intro
  • Get Started
    • Create a Wallet
    • Get ERC20 Tokens
  • Roadmap
  • Products
    • 🔄Exchange
      • Swapping Tokens
      • Providing Liquidity
    • 🔮Coming Soon!
  • Tokenomics
    • 🎍AKADAMA
  • Developers
    • 🛠️Technical Reference
      • Core
        • BonsaiswapV3Factory
        • BonsaiswapV3Pool
        • BonsaiswapV3PoolDeployer
        • Interfaces
          • IERC20Minimal
          • IBonsaiswapV3Factory
          • IBonsaiswapV3Pool
          • IBonsaiswapV3PoolDeployer
          • callback
            • IBonsaiswapV3FlashCallback
            • IBonsaiswapV3MintCallback
            • IBonsaiswapV3SwapCallback
          • Pool
            • IBonsaiswapV3PoolActions
            • IBonsaiswapV3PoolDerivedState
            • IBonsaiswapV3PoolEvents
            • IBonsaiswapV3PoolImmutables
            • IBonsaiswapV3PoolOwnerActions
            • IBonsaiswapV3PoolState
        • Libraries
          • BitMath
          • FixedPoint128
          • FixedPoint96
          • FullMath
          • LiquidityMath
          • LowGasSafeMath
          • Oracle
          • Position
          • SafeCast
          • SecondsOutside
          • SqrtPriceMath
          • SwapMath
          • Tick
          • TickBitmap
          • TickMath
          • TransferHelper
          • UnsafeMath
      • Periphery
        • Base
          • BlockTimestamp
          • ERC721Permit
          • LiquidityManagement
          • Multicall
          • PeripheryImmutableState
          • PeripheryPayments
          • PeripheryPaymentsWithFee
          • PoolInitializer
          • SelfPermit
        • Interfaces
          • IERC20Metadata
          • IERC721Permit
          • IMulticall
          • INonfungiblePositionManager
          • INonfungibleTokenPositionDescriptor
          • IPeripheryImmutableState
          • IPeripheryPayments
          • IPeripheryPaymentsWithFee
          • IPoolInitializer
          • IQuoter
          • IQuoterV2
          • ISelfPermit
          • ISwapRouter
          • ITickLens
          • external
            • IERC1271
            • IERC20PermitAllowed
            • IWETH9
        • Lens
          • Quoter
          • QuoterV2
          • TickLens
        • Libraries
          • Base64
          • BytesLib
          • CallbackValidation
          • ChainId
          • HexStrings
          • LiquidityAmounts
          • NFTDescriptor
          • NFTSVG
          • OracleLibrary
          • Path
          • PoolAddress
          • PoolTicksCounter
          • PositionKey
          • TokenRatioSortOrder
          • TransferHelper
          • WeightedOracleLibrary
        • NonfungiblePositionManager
        • NonfungibleTokenPositionDescriptor
        • SwapRouter
        • V3Migrator
      • Deployment Addresses
      • Error Codes
Powered by GitBook
On this page
  1. Developers
  2. Technical Reference
  3. Core
  4. Interfaces
  5. Pool

IBonsaiswapV3PoolImmutables

PreviousIBonsaiswapV3PoolEventsNextIBonsaiswapV3PoolOwnerActions

Last updated 2 years ago

These parameters are fixed for a pool forever, i.e., the methods will always return the same values

Functions

factory

  function factory(
  ) external view returns (address)

The contract that deployed the pool, which must adhere to the IBonsaisV3Factory interface

Return Values:

Type
Description

address

contract address

token0

  function token0(
  ) external view returns (address)

The first of the two tokens of the pool, sorted by address

Return Values:

Type
Description

address

token contract address

token1

  function token1(
  ) external view returns (address)

The second of the two tokens of the pool, sorted by address

Type
Description

address

token contract address

  function fee(
  ) external view returns (uint24)

The pool's fee in hundredths of a bip, i.e. 1e-6

Type
Description

uint24

fee

  function tickSpacing(
  ) external view returns (int24)

The pool tick spacing

Ticks can only be used at multiples of this value, minimum of 1 and always positive e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... This value is an int24 to avoid casting even though it is always positive.

Type
Description

int24

tick spacing

  function maxLiquidityPerTick(
  ) external view returns (uint128)

The maximum amount of position liquidity that can use any tick in the range

This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool

Type
Description

uint128

max amount of liquidity per tick

Return Values:

fee

Return Values:

tickSpacing

Return Values:

maxLiquidityPerTick

Return Values:

🛠️
​
​
​
​
​
​
​
​
​
​
​
​
​