Last updated
Last updated
Stake2Earn Pools are Dynamic AMM Memecoin Pools that are launched with the stake-to-earn mechanism. For more information, read .
StakeForFee
is the technical term used in the docs to describe the Stake2Earn mechanism and program, while feeFarm
refers to a Stake2Earn Vault.
Memecoin Pool: A Dynamic AMM Pool created with a fee scheduler and with initial liquidity perma-locked.
Stake2Earn Vault: Stake-to-earn farming mechanism and vault where top stakers can earn a share of fees from the locked liquidity.
Stake2Earn Pool: A Memecoin Pool with a Stake2Earn Vault.
Program ID: FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP
Below are the steps to use the StakeForFee TypeScript SDK.
In the following code, feeFarm
refers to the Stake2Earn Vault.
You are recommended to configure your Stake2Earn staking rewards distribution start time (fee claim start time) to be approximately 48 hours after launch. This allows more time for total fee rewards to accumulate from trading activity in the memecoin pool. A bigger total fee reward would help make your Stake2Earn Vault look more appealing to potential stakers.
This code example includes the steps to:
Mint a token
Create dynamic vault and pool
Create Stake2Earn Vault
Lock user's LP to Stake2Earn Vault
Alternatively, we also provide a convenient script to deploy a new Stake2Earn vault.
If you are creating the pool using the instruction:
initializeCustomizablePermissionlessConstantProductPool
createPermissionlessConstantProductPoolWithConfig2
Make sure you choose the config account that doesn't have any Dynamic Fee.
You are recommended to configure your Stake2Earn staking rewards distribution start time (fee claim start time) to be approximately 48 hours after launch. This allows more time for total fee rewards to accumulate from trading activity in the memecoin pool. A bigger total fee reward would help make your Stake2Earn Vault look more appealing to potential stakers.
User lock and Stake2Earn lock use the same lock mechanism on a Dynamic AMM / Memecoin Pool. But users and Stake2Eearn vaults have their own personal lock escrow account for the pool.
When a user permanently locks liquidity directly on the Memecoin Pool page, the user is locking the LP token to their own personal escrow account for the pool. Fees from this locked liquidity go to the user's wallet.
However, when a user locks via the Stake2Earn creation process, the user is locking the LP to their unique Stake2Earn Vault stake escrow account. Therefore, fees from this locked liquidity go to the Stake2Earn Vault, which then distributes fees to the top stakers.
Click "Open explorer" and on the explorer page search for Vault
and/or Stake Escrow
fields to find the respective addresses.
If you plan to use a multisig on the Meteora website, please make sure it is the SquadsX multisig, as that is the only type supported on Meteora website. Otherwise, you can't manage liquidity through the website.
There can only be one Stake2Earn Vault attached to each Memecoin Pool.
SDK:
NPM:
PDA seeds:
Mainnet API endpoint:
Devnet API endpoint:
API endpoint to get Stake2Earn vault info from pool address:
Use this example to to create a Memecoin Pool with Stake2Earn Vault:
Other examples:
Note: The following script is for deploying a new Stake2Earn vault only. To deploy a Memecoin Pool with permanently locked liquidity, please refer to .
Clone repo:
Config list to reference:
Readme:
Install Bun: You'll also need to run the scripts. Install it via . Then install the dependencies by running the command bun install
Note: You can also deploy a Memecoin Pool with a Stake2Earn Vault, as well as an if required.
CPI Example:
It will be fixed fee. Same applies to a Dynamic AMM pool created using the script in this repo:
Check using and make sure it returns no fee curve.
Use a wallet simulator (e.g. ) and paste the user's wallet address. Try to stake or unstake tokens in a Stake2Earn Vault.