Optional
feeOptional
initialReadonly
feeThe amount of fees taken from each transaction with the pool.
Holds a map of all active positions in the liquidity pool.
Private
sqrtThe internal representation of the price. The square root is tracked for easier math.
Current price of X as expressed in Y (i.e. amount of Y tokens needed to buy 1 token of X).
Private
addWhen you enter a position, you start providing liquidity to the pool. The position will gain rewards when a trade occurs inside the range in which it is active.
Consider all positions whose range includes the current price and find the narrowest range that is contained by all the ranges of the matched positions. Within this range, the liquidity stays constant during price movements.
The current active range.
The direction of price movement to consider. This becomes relevant when you're at a point exactly in between two possible ranges, each of which could have a different virtual liquidity
Private
getDInvPrivate
getDSqrtThe amount of virtual liquidity that is available in the current active range.
The direction of price movement to consider. This becomes relevant when you're at a point exactly in between two possible ranges, each of which could have a different virtual liquidity
Returns the position with the requested id.
An array of positions that are currently contributing to the virtual liquidity in the active range.
The direction of price movement to consider. This becomes relevant when you're at a point exactly in between two possible ranges, each of which could have a different virtual liquidity
Make a trade that moves the price to the target.
The balance delta required to make this trade. Negative values are paid to the pool, positive values are received in return.
Generated using TypeDoc
Represents a liquidity pool that uses concentrated liquidity (e.g. Uniswap V3).