Tokenized Positions

Whirlpool Position ownership is represented by a single non-fungible token in the owner's wallet.

Anatomy of a Position

There are 3 main accounts used to represent a Tokenized Position on Whirlpool.

Position Account - The actual account hosting the position's information. Program Address derived from Whirlpool Program Id and Position Mint.

Position Mint Account - The mint of the token minted to represent this position.

Position Associated Token Account - The ATA of the mint-token that will house the minted token in the user's wallet.

The program will verify that a user owns a position by checking whether the wallet provided has the correct position token in it.

Creating a Position

Positions are created using the open_position instruction and it does the following:

  1. Caller will provide a brand new token mint and the PDA of the Position account derived from the Whirlpool

  2. open_position will initialize the mint, mint 1 token to the position_token_account and immediately burn the mint authority of this mint.

  3. The position account is initialized with the set tick range and is ready to receive new liquidity via the increase_liquidity instruction.

Traits of a Whirlpool Position

  • Tick range cannot be readjusted. If a user would like to re-balance, the instructions needed to be sent would be to close the account and then re-open a new one.

  • Position tokens can be transferred around. Whoever yields the token in their wallet has access to the instructions needed to modify the Position account.

  • We are considering adding another option for power users to create positions without token-minting in the future. This will be a cheaper way to construct positions since unlike account rent, the cost to mint a token is not refundable to the user when closed.

NFT Metadata

When creating a tokenized position on Whirlpools, you have the option of whether to append metaplex metadata onto the token with open_position_with_metadata. Doing so will allow your token to be recognized as a Whirlpools NFT in Solana wallets (ex. Phantom). The drawback is your instruction call would consume more compute-budget.

Last updated