Skip to main content

Pool Account

This page contains an overview of the Solana account types used in the Jupiter Perpetuals Program, and specifically the Pool account.

The Pool account is a struct which represents a set of parameters and states associated to the data for JLP pool, including AUM and Custody data.

only one pool account

There is only one Pool account.

Example Typescript Repository

This repository contains Typescript code samples on interacting with the Jupiter Perpetuals program IDL with anchor and @solana/web3.js

You can also find the Custody Account fields in the repository or on a blockchain explorer.

Account Details

Each Pool account contains the following data:

FieldDescription
nameType: string

The name for the account.
custodiesType: publicKey

An array containing the public keys for the custodies (tokens) managed by the JLP pool.
aumUsdType: u128

The current AUM value (USD) for the JLP pool. The aumUsd value's calculation can be summarized by getting the USD value of the tokens managed by the pool minus the USD value reserved to pay off trader profits.

Refer to the Custody account details for more details on AUM calculation.
limitType: Limit

Contains values for the pool's limits.
feesType: Fees

Sets the fee amounts or percentages for the Jupiter Perpetuals exchange.
poolAprType: PoolApr

Contains data related to the pool's APR / APY calculations.

Limit

FieldDescription
maxAumUsdType: u128

The max AUM for the JLP pool. This acts as a max cap / ceiling as the JLP will not accept deposits when the cap is hit.
tokenWeightageBufferBpsType: u128

The token weightage buffer (in basis points) to calculate the token's maximum or minimum current weightage based on the target weightage.

Currently, tokenWeightageBufferBps is set to 2000 which means the the current weightage cannot be lower or higher than + / - 20% of the token's target weightage.

For example, if SOL's target weightage for the JLP pool is 50%, the current weightage cannot be less than 40% or exceed 60%. The pool will not allow deposits or withdrawals if the action causes the token to exceed its target weightage.
maxPositionUsdType: u64

Sets the maximum position size. The current maxPositionUsd value is 2_500_000_000_000 which means a position's max size is $2,500,000.

Fees

FieldDescription
increasePositionBpsType: string

A fixed fee of 6 BPS (0.06%) is charged for opening or increasing a position.
decreasePositionBpsType: publicKey

A fixed fee of 6 BPS (0.06%) is charged for closing or decreasing a position.
addRemoveLiquidityBpsType: u128

Fee charged when adding or removing liquidity to/from the pool.
swapBpsType: Limit

Swap fee for exchanging non-stablecoin tokens routed through the liquidity pool.

swap fee = swapBps ± swapTaxBps
taxBpsType: PoolApr

Tax fee for non-stablecoins, determined based on the difference between the current and target weightage. A larger difference results in a higher tax fee, encouraging liquidity providers to rebalance the pool to the target weightage.
stableSwapBpsType: Limit

Swap fee for exchanges involving stablecoins, routed through the liquidity pool.

swap fee = stableSwapBps ± stableSwapTaxBps
stableSwapTaxBpsType: Fees

Tax fee for stablecoin swaps. Similar to taxBps, this fee is determined by the difference between the current and target weightage.
protocolShareBpsType: PoolApr

Jupiter takes a share of 2500 BPS (25%) from the fees collected by the pool.

PoolApr

FieldDescription
lastUpdatedType: i64

The UNIX timestamp when the pool's APR data was last updated.
feeAprBpsType: u64

The pool's APR in BPS format. The APR is calculated weekly by dividing the pool's realized fees (minus the 25% collected by the protocol) by the total pool value, adjusting for the 1 week time period to annualize the rate.
realizedFeeUsdType: u64

The fees collected by the pool so far. This fee is reinvested back into the pool and is also used to calculate the APR as mentioned above. realizedFeeUsd resets to zero when the fee is reinvested into the pool hence causing the APR value to fluctuate weekly.