Create: Stake2Earn Pool
Last updated
Last updated
are Dynamic AMM Memecoin Pools that are launched with a Stake2Earn Vault. In this page, we provide the code examples that can be used to create a Stake2Earn Pool.
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.
Dynamic AMM SDK:
Stake2Earn Vault SDK:
Dynamic AMM Program ID: Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB
Stake2Earn Vault Program ID: FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP
Devnet:
Clone repo:
Config list to reference:
Readme:
If you want to create an Alpha Vault along with your new pool, you also need to find a pool_config_key
that is mapped to a vault_config_key
that meets your requirements.
If none of the pool_config_key
in the list meet your requirements, please reach out to Meteora for a custom pool config key.
Using this endpoint, integrators can input the config pubkey, and it will return an array of fee update timings for the config, if there's any.
Integrators may choose a pool_config_key
with a fee curve that suits your integration.
If there is no existing config in the list that fits your project's requirement, a new config needs to be created.
Only the Meteora team can create a new config to add it to the preset pool config list.
By default, Meteora's frontend is currently using this pool config key for Memecoin Pool creation: FiENCCbPi3rFh5pW2AJ59HC53yM32eLaCjMKxRqanKFJ
For the FiENCCbPi3rFh5pW2AJ59HC53yM32eLaCjMKxRqanKFJ
pool config, it doesn't allow creation of any Alpha Vault, therefore it's field vault_config_key
is 1111111...
Custom Pool Config Key: Integrators such as launchpads or other partners may need to use their own unique custom pool config key, if they want custom pool_creator_authority
to prevent front-running of the token launch pool.
NOTE:
New dedicated config keys can only be created by Meteora. Please reach out to us if this is required.
The pool_creator_authority
doesn't work with program address. It's not a program whitelist, it needs to be a PDA (program derived address) or normal account.
Custom Fee Curve: If you are an integrator, Meteora can also apply a custom fee curve/schedule for your pools, but we will need to create a dedicated config key for your team, where pool_creator_authority
is linked to your signer wallet for pool creation. You would need to send us your signer wallet that would be used to deploy the pools.
NOTE:
Even with a dedicated config key for your team, Meteora would need to customize the fee curve/schedule for you. You can't do it on your own.
Custom Pool Config and Fee Curve is used by integrators such as Moonshot by DEX Screener.
If required, Meteora can set a custom fee curve for a single, specific pool. This would override the fee curve used by the pool's config key, doesn't matter which config key is used.
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, the following bun script examples can be used to initialize a Stake2Earn Vault for the Memecoin Pool you created on Meteora.
First, make sure you create the token mint and the Memecoin Pool. After that, you need to lock the liquidity, before creating the Stake2Earn Vault for the Memecoin Pool. The addresses in the allocations should contain the feeFarm
(Stake2Earn Vault) address.
Run the script with the config file which is set with your preferred parameters
Run:
Run:
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.
Dynamic AMM API endpoints:
Stake2Earn Mainnet API endpoint:
API endpoint to get Stake2Earn vault info from pool address:
Stake2Earn Devnet API endpoint:
Dynamic AMM SDK:
What fee parameters to choose depends on your project's needs. You will need to look at the and choose a suitable pool_config_key
with your preferred fee parameters.
Pool config list:
Devnet API: You can also get the list of config keys from devnet API
API endpoint to return the associated fee curve for each existing config:
Note: For more information about setting Pool and Fee Config for Memecoin Pools, please read .
After you have selected your preferred pool config key, use this example to to create a Memecoin Pool with Stake2Earn Vault:
Install Bun: You'll also need to run the scripts. Install it via . Then install the dependencies by running the command bun install
Clone repo:
Select an example config from the list to reference and change the parameters inside according to your needs:
Use a wallet simulator (e.g. ) and paste the user's wallet address. Try to stake or unstake tokens in a Stake2Earn Vault.