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.

Stake2Earn emits Anchor events with Event CPI (emit_cpi!) in the inspected user and admin flows. Indexers should parse inner instructions from the stake_for_fee program, not only log strings.

Event Delivery

DetailValue
Programstake_for_fee
Public program IDFEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP
Delivery pathAnchor Event CPI
Event authority PDA["__event_authority"]
Client requirementLow-level transactions must include Anchor Event CPI accounts when an instruction struct uses #[event_cpi].

Vault Lifecycle

EventEmitted byFieldsUse
VaultCreatedinitialize_vaultpool, token_a_mint, token_b_mint, vault, stake_mint, quote_mint, creator, top_list_length, seconds_to_full_unlock, unstake_lock_duration, start_fee_distribute_timestampDiscover a new Stake2Earn vault and its launch configuration.
StakeEscrowCreatedinitialize_stake_escrowpool, vault, escrow, owner, full_balance_indexIndex a user’s stake escrow for one vault.

Fee And Stake Events

EventEmitted byFieldsUse
FeeEmissionstake, claim_fee, request_unstake, cancel_unstake, claim_fee_crankpool, vault, token_a_claimed, token_b_claimed, token_a_released, token_b_released, cumulative_fee_a_per_liquidity, cumulative_fee_b_per_liquidity, effective_stake_amountTrack lock escrow fee claims and drip release into top staker accounting.
UserStakestake, claim_feepool, vault, owner, stake_amount, total_stake_amount, fee_a_pending, fee_b_pending, fee checkpointsTrack direct stakes and automatic restake of base/stake-token fee claims.
ClaimFeeSucceedclaim_feestake_escrow, pool, vault, owner, fee_a_amount, fee_b_amount, total_fee_a_amount, total_fee_b_amountTrack user fee claims. The quote side is transferred; the stake/base side is restaked.

Unstake Events

EventEmitted byFieldsUse
UnstakeCreatedrequest_unstakeunstake, pool, vault, owner, amount, new_stake_escrow_amount, new_stake_escrow_ongoing_total_unstake_amount, pending fees, fee checkpoints, start_at, end_atTrack a new pending unstake and its release timestamp.
CancelUnstakeSucceedcancel_unstakeunstake, pool, vault, owner, amount, new_stake_escrow_amount, new_stake_escrow_ongoing_total_unstake_amount, pending fees, fee checkpointsTrack cancellation of a pending unstake.
WithdrawSucceedwithdrawunstake, pool, vault, owner, amount, new_stake_escrow_ongoing_total_unstake_amountTrack final withdrawal of released stake tokens.

Top List Events

EventEmitted byFieldsUse
AddNewUserToTopHolderstake, claim_fee, request_unstake, cancel_unstake when list sync promotes a stakerpool, vault, owner, stake_amount, pending fees, fee checkpointsTrack a staker entering the top list.
RemoveUserFromTopHolderstake, claim_fee, request_unstake, cancel_unstake when list sync removes a stakerpool, vault, owner, stake_amount, pending fees, fee checkpointsTrack a staker leaving the top list.
ReclaimIndexstake, claim_fee, cancel_unstake when the full balance list index is reclaimedvault, in_owner, in_owner_balance, out_owner, out_owner_balance, reclaim_indexTrack replacement of the smallest tracked full-balance entry.

Admin Events

EventEmitted byFieldsUse
UpdateUnstakeLockDurationupdate_unstake_lock_durationvault, old_value, new_valueTrack changes to the cooldown used by future unstake requests.
UpdateSecondsToFullUnlockupdate_seconds_to_full_unlockvault, old_value, new_valueTrack changes to the fee drip duration.

Defined But Not Emitted By Current Handlers

EventFieldsSource note
ConfigCreatedconfig, index, seconds_to_full_unlock, unstake_lock_duration, join_window_duration, top_list_lengthDefined in events.rs, but no matching active handler is exposed by the inspected lib.rs.
ConfigClosedconfig, indexDefined in events.rs, but no matching active handler is exposed by the inspected lib.rs.

Indexing Notes

NeedRecommended event
New vault discoveryVaultCreated
User stake escrow discoveryStakeEscrowCreated
Current user active stake changesUserStake, UnstakeCreated, CancelUnstakeSucceed, WithdrawSucceed
Fee drip accountingFeeEmission
User quote-claim accountingClaimFeeSucceed
Leaderboard movementsAddNewUserToTopHolder, RemoveUserFromTopHolder, ReclaimIndex