Stake2Earn is Meteora’s stake-for-fee program for DAMM v1 constant-product pools. Pool creators lock DAMM v1 LP into a program-owned lock escrow, and token holders stake the pool’s base token to compete for the top staker list that receives released LP fees. To learn the product flow, configuration limits, and formulas before integrating, read the product documentation.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.
What Is Stake2Earn
Product overview for Stake2Earn staking, LP fee delegation, and top staker rewards.
Configuration And Limits
Product-level settings and launch constraints for Stake2Earn vaults.
Stake2Earn Formulas
Product formulas for staking, fees, and reward distribution.
Integration
Program Accounts
PDA seeds, vault state, stake escrow state, unstake requests, and top/full balance list layouts.
Program Instructions
Vault creation, staking, claiming, unstaking, withdrawal, crank, and admin instruction details.
Program Events
Event CPI emissions for vault lifecycle, staking, fee release, top list movement, and admin updates.
Program Errors
Anchor custom error codes, enum names, messages, and common integration causes.
TypeScript SDK
Transaction builders, state readers, PDA helpers, and examples from
@meteora-ag/m3m3.Rust Integration
Generated Rust instruction/account interface, PDA helpers, and CPI guidance.
Stake2Earn API
Indexed read-only vault discovery, analytics, filter routes, and leaderboard responses.
Changelog
Program, SDK, API, and source-noted release changes that affect integrations.
Program IDs
The publicstake_for_fee program ID is the same on mainnet and devnet:
| Network | Program ID |
|---|---|
| Mainnet Beta | FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP |
| Devnet | FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP |
| Local feature build | M5c95Zio3HQ1gvQ3pjhh8BsscrDcKnN28gxnQD1E17U |
| Program | ID |
|---|---|
| DAMM v1 | Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB |
| Dynamic Vault | 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi |
Stake2Earn Program
Anchor program source for
stake_for_fee.Stake2Earn IDL
TypeScript IDL bundled by the public SDK.
TypeScript SDK
@meteora-ag/m3m3 SDK source for transaction builders and state helpers.Rust Interface
Generated Rust instruction, account, event, and error interface.
Important Constants
| Constant | Public value | Use |
|---|---|---|
MIN_LIST_LENGTH / MAX_LIST_LENGTH | 5 / 1000 | Allowed top staker list length on public builds. |
FULL_BALANCE_LIST_HARD_LIMIT | 10000 | Maximum tracked full-balance entries on public builds. |
MIN_SECONDS_TO_FULL_UNLOCK / MAX_SECONDS_TO_FULL_UNLOCK | 6 hours / 31 days | Allowed fee drip duration range. |
MIN_UNSTAKE_LOCK_DURATION / MAX_UNSTAKE_LOCK_DURATION | 6 hours / 31 days | Allowed unstake cooldown range. |
MAX_JOIN_WINDOW_DURATION | 31 days | Maximum delay before fee distribution begins. |
MIN_LOCK_ESCROW_CLAIM_FEE_DURATION | 5 minutes | Minimum interval before another lock escrow fee claim. |
SCALE_OFFSET | 64 | Fixed-point scale used for cumulative fee-per-liquidity checkpoints. |
| Quote mints | SOL, USDC | Only SOL and USDC are accepted as quote mints. |
Commands
| Task | Command |
|---|---|
| Build TypeScript SDK | cd stake-for-fee-sdk/ts-client && pnpm install && pnpm run build |
| Run TypeScript SDK tests | cd stake-for-fee-sdk/ts-client && pnpm test |
| Build local program | cd stake-for-fee && anchor build -p stake_for_fee -- --features local |
| Run local program tests | cd stake-for-fee && yarn test |
| Check Rust interface workspace | cd stake-for-fee-sdk && cargo check |

