This page summarizes the account model used by
stake_for_fee. For exact binary layouts, use the Anchor IDL or the generated TypeScript and Rust types exported by @meteora-ag/m3m3 and stake_for_fee_interface.PDA Map
The SDK exports
deriveFeeVault, deriveTopStakerList, deriveFullBalanceList, deriveStakeEscrow, deriveLockEscrowPda, and deriveLpMint.
FeeVault
FeeVault is the root Stake2Earn account.
Configuration
Metrics
TopStakerInfo
StakeEscrow
StakeEscrow is the user position account for one vault.
When a user calls
claim_fee, the base/stake token side is automatically restaked. Only the quote token side is transferred to the user, capped by max_fee.
Unstake
Unstake stores one pending withdrawal request.
request_unstake creates this account with an arbitrary keypair supplied by the caller. cancel_unstake and withdraw close it to the owner.
Top List Account
TopListMetadata is a zero-copy account header followed by StakerMetadata entries.
Ranking uses stake amount first. For equal balances, earlier full balance indexes rank ahead of later joiners.
Full Balance List Account
FullBalanceListMetadata is a zero-copy account header followed by StakerBalance entries.
The public hard limit is
10000 tracked entries. If the full balance list is full, a new or returning large staker can reclaim the smallest tracked index only when the required smallest_stake_escrow account is provided.
