MaverickV2BoostedPositionStatic

Inherits: ImmutableArrayGetter, IMaverickV2BoostedPosition, BoostedPositionBase

BoostedPosition for static-mode Maverick V2 AMM liquidity positions. This contract inherits ERC20 and a given user's BP balance represents their pro rata position in the boosted position.

Functions

constructor

Constructor does not do any validation of input parameters. This contract is meant to be deployed by a factory contract and that factory contract should perform parameter validations.

constructor(
    string memory name_,
    string memory symbol_,
    IMaverickV2Pool pool_,
    uint8 binCount_,
    bytes32[3] memory binData,
    bytes32[12] memory ratioData
) BoostedPositionBase(name_, symbol_, pool_, 0, binCount_) ImmutableArrayGetter(binCount_, binData, ratioData);

mint

Mints BP LP position to recipient. User has to add liquidity to BP contract before making this call as this mint function simply assigns any new liquidity that this BP possesses in the pool to the recipient. Accordingly, this function should only be called in the same transaction where liquidity has been added to a pool as part of a multicall or through a router/manager contract.

function mint(address recipient) public returns (uint256 deltaSupply);

burn

Burns BP LP positions and redeems the underlying A/B token to the recipient.

function burn(address recipient, uint256 amount) public returns (uint256 tokenAOut, uint256 tokenBOut);

migrateBinLiquidityToRoot

Migrates all underlying movement-mode liquidity from a merged bin to the active parent of the merged bin. For Static BPs, this function is a no-op and never needs to be called.

function migrateBinLiquidityToRoot() public pure;

getTicks

Array of ticks where the underlying BP liquidity exists.

function getTicks() public view returns (int32[] memory ticks);

getBinIds

Array of BP binIds.

function getBinIds() public view returns (uint32[] memory);

getRatios

Array of relative pool bin LP balance of the bins in the BP.

function getRatios() public view returns (uint128[] memory);

Last updated