MaverickV2PoolLens

Inherits: IMaverickV2PoolLens

Contract that provides both views into a pool's state as well as helpfer functions to compute paramters used by MaverickV2LiquidityManager.

Functions

getAddLiquidityParams

Converts add parameter slippage specification into add parameters. The return values are given in both raw format and as packed values that can be used in the LiquidityManager contract.

function getAddLiquidityParams(AddParamsViewInputs memory params)
    public
    view
    returns (
        bytes memory packedSqrtPriceBreaks,
        bytes[] memory packedArgs,
        uint88[] memory sqrtPriceBreaks,
        IMaverickV2Pool.AddLiquidityParams[] memory addParams,
        IMaverickV2PoolLens.TickDeltas[] memory tickDeltas
    );

getAddLiquidityParamsForBoostedPosition

Converts add parameter slippage specification for a boosted position into add parameters. The return values are given in both raw format and as packed values that can be used in the LiquidityManager contract.

function getAddLiquidityParamsForBoostedPosition(
    IMaverickV2BoostedPosition boostedPosition,
    AddParamsSpecification memory addSpec
)
    public
    view
    returns (
        bytes memory packedSqrtPriceBreaks,
        bytes[] memory packedArgs,
        uint88[] memory sqrtPriceBreaks,
        IMaverickV2Pool.AddLiquidityParams[] memory addParams,
        IMaverickV2PoolLens.TickDeltas[] memory tickDeltas
    );

getCreateBoostedPositionParams

Converts add parameter slippage specification and boosted position specification into add parameters. The return values are given in both raw format and as packed values that can be used in the LiquidityManager contract.

getCreatePoolAtPriceAndAddLiquidityParams

Converts add parameter slippage specification and new pool specification into CreateAndAddParamsInputs parameters that can be used in the LiquidityManager contract.

getTicksAroundActive

View function that provides information about pool ticks within a tick radius from the activeTick.

getTicks

View function that provides information about pool ticks within a range.

getFullPoolState

View function that provides pool state information.

getTickSqrtPriceAndL

View function that provides price and liquidity of a given tick.

getPoolSqrtPrice

Pool sqrt price.

getPoolPrice

Pool price.

tokenScales

Token scale of two tokens in a pool.

Last updated