Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

The vault program emits Anchor events in program logs. Indexers can use these events to track user liquidity, strategy movements, rewards, performance fees, losses, and simulated unlocked amount reads.

Event Delivery

ItemValue
Program ID24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi
Event sourceAnchor Program data: logs emitted with emit!
ParserAnchor event discriminator plus Borsh event payload
Rust client examplerust-client/src/utils.rs scans Program data: logs and deserializes matching event discriminators
Unlike newer event-CPI programs, Dynamic Vault events are emitted as Anchor logs rather than through a separate event authority account.

Liquidity Events

EventEmitted byPayloadUse
AddLiquiditydepositlp_mint_amount: u64, token_amount: u64Track user deposits and LP minted from the vault’s unlocked accounting.
RemoveLiquiditywithdraw, withdraw_directly_from_strategylp_unmint_amount: u64, token_amount: u64Track user LP burns and underlying tokens returned.
RemoveLiquidity.lp_unmint_amount is the amount of LP burned. In a direct strategy withdrawal, the handler may refine the burn amount when the strategy cannot return the full desired amount.

Strategy Events

EventEmitted byPayloadUse
StrategyDepositdeposit_strategystrategy_type: StrategyType, token_amount: u64Track vault reserve liquidity moved into a strategy.
StrategyWithdrawwithdraw_strategy, remove_strategy, remove_strategy2, withdraw_directly_from_strategystrategy_type: StrategyType, collateral_amount: u64, estimated_token_amount: u64Track strategy collateral redeemed and estimated underlying returned.
For remove_strategy, estimated_token_amount is the actual increase in the vault token account after withdrawing all strategy collateral. For normal strategy withdrawal, it is the requested underlying amount.

Reward And Fee Events

EventEmitted byPayloadUse
ClaimRewardclaim_rewardsstrategy_type: StrategyType, token_amount: u64, mint_account: PubkeyTrack strategy rewards claimed to a treasury-owned token account.
PerformanceFeeRebalance wrapper on profitlp_mint_more: u64Track performance-fee LP minted to fee_vault.
ReportLossRebalance wrapper on lossstrategy: Pubkey, loss: u64Track decreases in vault total amount after strategy accounting.
The performance fee is calculated only when a rebalance reports gain. The program mints LP tokens to the configured fee_vault and adjusts locked profit so the fee accounting does not immediately change virtual price.

Read Events

EventEmitted byPayloadUse
TotalAmountget_unlocked_amounttotal_amount: u64Read current unlocked amount through transaction simulation logs.
The Rust client uses get_unlocked_amount by simulating the instruction and parsing TotalAmount from logs. Off-chain clients can also compute withdrawable amount locally from vault state and sysvar clock data.

Indexing Notes

Use caseEvent
Deposit historyAddLiquidity
Withdrawal historyRemoveLiquidity
Strategy allocation movementStrategyDeposit, StrategyWithdraw
Reward collectionClaimReward
Fee accountingPerformanceFee
Loss accountingReportLoss
Unlocked amount simulationTotalAmount
Events do not include the vault address in their payloads. Indexers should join the event to the transaction instruction accounts, especially the vault, strategy, and token accounts, when building vault-level analytics.

Payload Reference

EventFieldTypeMeaning
AddLiquiditylp_mint_amountu64LP tokens minted to the user’s LP token account.
AddLiquiditytoken_amountu64Underlying tokens transferred into the vault.
RemoveLiquiditylp_unmint_amountu64LP tokens burned from the user’s LP token account.
RemoveLiquiditytoken_amountu64Underlying tokens transferred out to the user.
StrategyDepositstrategy_typeStrategyTypeStrategy handler used for the deposit.
StrategyDeposittoken_amountu64Underlying amount sent to the strategy.
StrategyWithdrawstrategy_typeStrategyTypeStrategy handler used for the withdrawal.
StrategyWithdrawcollateral_amountu64Collateral tokens redeemed or accounted for.
StrategyWithdrawestimated_token_amountu64Estimated or actual underlying amount associated with the strategy withdrawal.
ClaimRewardstrategy_typeStrategyTypeStrategy handler used for reward claiming.
ClaimRewardtoken_amountu64Reward tokens received by the treasury-owned reward account.
ClaimRewardmint_accountPubkeyReward token mint.
PerformanceFeelp_mint_moreu64LP tokens minted to the fee vault.
ReportLossstrategyPubkeyStrategy account that reported loss through rebalance accounting.
ReportLosslossu64Loss in underlying token units.
TotalAmounttotal_amountu64Current unlocked amount in underlying token units.