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:
| Field | Description |
|---|---|
name | Type: stringThe name for the account. |
custodies | Type: publicKeyAn array containing the public keys for the custodies (tokens) managed by the JLP pool. |
aumUsd | Type: u128The 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. |
limit | Type: LimitContains values for the pool's limits. |
fees | Type: FeesSets the fee amounts or percentages for the Jupiter Perpetuals exchange. |
poolApr | Type: PoolAprContains data related to the pool's APR / APY calculations. |
Limit
| Field | Description |
|---|---|
maxAumUsd | Type: u128The 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. |
tokenWeightageBufferBps | Type: u128The 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. |
maxPositionUsd | Type: u64Sets 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
| Field | Description |
|---|---|
increasePositionBps | Type: stringA fixed fee of 6 BPS (0.06%) is charged for opening or increasing a position. |
decreasePositionBps | Type: publicKeyA fixed fee of 6 BPS (0.06%) is charged for closing or decreasing a position. |
addRemoveLiquidityBps | Type: u128Fee charged when adding or removing liquidity to/from the pool. |
swapBps | Type: LimitSwap fee for exchanging non-stablecoin tokens routed through the liquidity pool. swap fee = swapBps ± swapTaxBps |
taxBps | Type: PoolAprTax 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. |
stableSwapBps | Type: LimitSwap fee for exchanges involving stablecoins, routed through the liquidity pool. swap fee = stableSwapBps ± stableSwapTaxBps |
stableSwapTaxBps | Type: FeesTax fee for stablecoin swaps. Similar to taxBps, this fee is determined by the difference between the current and target weightage. |
protocolShareBps | Type: PoolAprJupiter takes a share of 2500 BPS (25%) from the fees collected by the pool. |
PoolApr
| Field | Description |
|---|---|
lastUpdated | Type: i64The UNIX timestamp when the pool's APR data was last updated. |
feeAprBps | Type: u64The 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. |
realizedFeeUsd | Type: u64The 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. |