Meteora 백서

Meteora

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 64쪽

`EstimateDlmmRebalanceSwapParams` | DLMM estimate inputs. | | `JupiterQuoteResponse`, `JupiterSwapInstructionResponse` | Jupiter API response shapes used by helpers. | | `ZapProgram`, `ZapTypes`, `ZapIdl` | Anchor program type, generated IDL type, and bundled IDL JSON. | # We Build Liquidity Pools Source: https://docs.meteora.ag/get-started/index The Most Composable Liquidity Layer for Liquidity Providers, Launchpads and Token Launches on Solana. <video /> ## Why Meteora? Meteora is the dynamic liquidity infrastructure powering Solana's most successful token launches and biggest LP community. Whether you're an LP maximizing returns, a launchpad delivering deep day-one liquidity, a team launching a token, or a builder integrating liquidity primitives, Meteora gives you the tools to ship fast with unmatched capital efficiency. The same battle-tested infrastructure powering Meteora's DLMM, DAMM, and Dynamic Bonding Curve pools is available to you through robust TypeScript and Rust SDKs, as well as free public REST APIs. We handle the complex math, so you can focus on building your product, with world-class support from the Meteora team that wants you to win. <CardGroup> <Card title="Built for Liquidity Providers" icon="users"> Earn fees and rewards across Solana's largest, most active LP community. </Card> <Card title="Built for Launchpads" icon="rocket"> Power day-one liquidity for every project you launch with battle-tested pools. </Card> <Card title="Built for Token Launches" icon="star"> Bring your token to market with deep, reliable liquidity from block one. </Card> </CardGroup> ## Products ### Core Products <CardGroup> <Card title="What is DLMM?" icon="arrows-to-circle" href="/core-products/dlmm/what-is-dlmm"> Concentrated liquidity in discrete price bins with dynamic, volatility-aware fees, zero-slippage swaps within a bin and native onchain limit orders. </Card> </CardGroup> <CardGroup> <Card title="What is DAMM v2?" icon="calculator-simple" href="/core-products/damm-v2/what-is-damm-v2"> Constant-product AMM with position NFTs, optional concentrated ranges, and built-in anti-sniper suite. </Card> <Card title="What is Dynamic Bonding Curve?" icon="chart-simple" href="/core-products/dbc"> Fully customizable bonding curves for token launches that auto-graduate to a DAMM pool once the quote threshold is hit. </Card> </CardGroup> ### Helper Products <CardGroup> <Card title="What is Presale Vault?" icon="gavel" href="/helper-products/presale-vault/what-is-presale-vault"> Run token presales with whitelists, tiers, and contributions in any SPL token. </Card> <Card title="What is Alpha Vault?" icon="building-columns" href="/helper-products/alpha-vault/what-is-alpha-vault"> Early-access launch vault that lets genuine supporters buy in before public trading opens. </Card> <Card title="What is Dynamic Fee Sharing?" icon="share-nodes" href="/helper-products/dynamic-fee-sharing/what-is-dynamic-fee-sharing"> Automatically split pool fees across multiple recipients by configurable share allocations. </Card> <Card title="What is Zap?" icon="bolt-lightning" href="/helper-products/zap/what-is-zap"> Convert tokens and manage positions in a single transaction with the ability to zap in or zap out instantly. </Card> </CardGroup> ### Legacy Products <CardGroup> <Card title="What is DAMM v1?" icon="infinity" href="/legacy-products/damm-v1/what-is-damm-v1"> Constant-product AMM with infinite price range, earning swap fees plus extra yield from lending integrations. </Card> </CardGroup> <CardGroup> <Card title="What is Dynamic Vault?" icon="vault" href="/legacy-products/dynamic-vault/what-is-dynamic-vault"> Auto-rebalances idle LP capital across Solana lending markets to boost yield on DAMM v1 pools. </Card> <Card title="What is Stake2Earn?" icon="piggy-bank" href="/legacy-products/stake2earn/what-is-stake2earn"> Reward top token stakers with a share of locked LP trading fees from DAMM v1 pools. </Card> </CardGroup> ## Developer Guides <CardGroup> <Card title="Build with DLMM" icon="arrows-to-circle" href="/developer-guides/dlmm"> Build with bin-based concentrated liquidity, native limit order and dynamic fees. </Card> <Card title="Build with DAMM v2" icon="calculator-simple" href="/developer-guides/damm-v2"> Build constant-product pools with NFT positions, anti-sniping mechanisms, and multiple fee collection modes support. </Card> <Card title="Build with Dynamic Bonding Curve" icon="chart-simple" href="/developer-guides/dbc"> Build custom token launches with programmable 16-point curve segments that auto-graduate to a DAMM pool. </Card> <Card title="Build with Presale Vault" icon="gavel" href="/developer-guides/presale-vault"> Build presales with fixed-price, FCFS, or prorata modes including tier systems, whitelists, and deposit fees. </Card> <Card title="Build with Alpha Vault" icon="box" href="/developer-guides/alpha-vault"> Add anti-bot deposit vaults to DLMM, DAMM v1, or DAMM v2 launches with FCFS or prorata modes. </Card> <Card title="Build with Dynamic Fee Sharing" icon="money-bill-wave" href="/developer-guides/dynamic-fee-sharing"> Create fee vaults that split collected fees across recipients natively onchain. </Card> <Card title="Build with Zap" icon="bolt-lightning" href="/developer-guides/zap"> Combine program actions and Jupiter swaps in one transaction across DAMM v2 and DLMM pools. </Card> <Card title="Build with DAMM v1" icon="infinity" href="/developer-guides/damm-v1"> Build with the legacy infinite-range AMM that contains integrated lending yield. </Card> <Card title="Build with Dynamic Vault" icon="vault" href="/developer-guides/dynamic-vault"> Integrate auto-rebalancing yield vaults powered by the Hermes yield aggregation engine. </Card> <Card title="Build with Stake2Earn" icon="steak" href="/developer-guides/stake2earn"> Distribute trading fees from locked liquidity to top token stakers. </Card> </CardGroup> ## Agents Meteora is built for AI agents and LLM-powered development. Drop these tools into your stack to ship integrations faster. <CardGroup> <Card title="Meteora CLI" icon="terminal" href="/agents/overview"> Manage pools and run swaps from the terminal — JSON-native and agent-ready. </Card> <Card title="Agent Skills" icon="wand-magic-sparkles" href="/agents/overview"> Drop-in skill files that teach coding agents how to integrate Meteora correctly. </Card> <Card title="Documentation MCP" icon="plug" href="/agents/mcp"> Search and query Meteora docs from any MCP-compatible AI editor. </Card> <Card title="llms.txt" icon="file-lines" href="/agents/llms-txt"> LLM-optimized documentation index for RAG pipelines and AI agents. </Card> </CardGroup> ## Invent on Meteora We abstract the need for understanding Meteora integration complexities by providing an all-in-one interface that any developer can use to create, enter commands and deploy liquidity pools on Solana. <CardGroup> <Card title="DLMM" icon="meteor" href="/invent/launch-pools/dlmm-launch-pool"> Spin up a concentrated liquidity pool, with optional Alpha Vault for anti-bot protection. </Card> <Card title="DAMM v2" icon="comet" href="/invent/launch-pools/damm-v2-launch-pool"> Spin up a balanced or one-sided pool with optional Alpha Vault and onchain anti-sniping mechanisms. </Card> <Card title="DAMM v1" icon="star-shooting" href="/invent/launch-pools/damm-v1-launch-pool"> Spin up a freshly minted DAMM v1 pool with optional Alpha Vault. </Card> <Card title="Dynamic Bonding Curve" icon="rocket-launch" href="/invent/launch-pools/dbc-token-launch-pool"> Spin up a fully customizable bonding curve that auto-graduates to a DAMM pool. </Card> </CardGroup> ## Community <CardGroup> <Card title="Discord" icon="discord" href="https://discord.com/invite/meteora"> Get developer support and chat with the Meteora community. </Card> <Card title="LP Army" icon="users" href="https://lparmy.com"> Join Solana's largest LP community and learn winning strategies from active LPs. </Card> <Card title="Developer Updates" icon="telegram" href="https://t.me/meteora_dev"> Real-time program updates and product releases on Telegram. </Card> </CardGroup> ## Socials <CardGroup> <Card title="Blog" icon="newspaper" href="https://blog.meteora.ag"> Product updates, technical deep dives, and launch information. </Card> <Card title="Twitter / X" icon="x-twitter" href="https://x.com/MeteoraAG"> Real-time announcements, ecosystem news, and releases. </Card> </CardGroup> # Pushing the Boundaries of DeFi Source: https://docs.meteora.ag/get-started/pushing-the-boundaries-of-defi Explore the innovative DeFi programs Meteora is building on Solana, including DLMM, DAMM, DBC, and more. <video /> **We write innovative programs that push the boundaries of DeFi on Solana.** Concentrated Market Making, Dynamic AMMs, Launch Curves, Vault Yield, Fee Sharing, and many more - each product solves a specific market-design problem so **builders**, **protocols**, **liquidity providers**, and **traders** can go live onchain with the best capital efficiency. ## Active Programs <span>Active</span> <span>= will have new developments and still actively maintained</span> <div> <div> <table> <thead> <tr> <th>Program</th> <th>Program ID</th> <th>Open Source</th> </tr> </thead> <tbody> <tr> <td><strong>DLMM</strong></td> <td><code>LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo</code></td> <td>❌</td> </tr> <tr> <td><strong>DAMM v2</strong></td> <td><code>cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG</code></td> <td>✅</td> </tr> <tr> <td><strong>DBC</strong></td> <td><code>dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN</code></td> <td>✅</td> </tr> <tr> <td><strong>Presale Vault</strong></td> <td><code>presSVxnf9UU8jMxhgSMqaRwNiT36qeBdNeTRKjTdbj</code></td> <td>✅</td> </tr> <tr> <td><strong>Alpha Vault</strong></td> <td><code>vaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2</code></td> <td>❌</td> </tr> <tr> <td><strong>Dynamic Fee Sharing</strong></td> <td><code>dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh</code></td> <td>✅</td> </tr> <tr> <td><strong>Zap</strong></td> <td><code>zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz</code></td> <td>✅</td> </tr> </tbody> </table> </div> </div> ## Legacy Programs <span>Legacy</span> <span>= will not have new developments but still maintained</span> <div> <div> <table> <thead> <tr> <th>Program</th> <th>Program ID</th> <th>Open Source</th> </tr> </thead> <tbody> <tr> <td><strong>DAMM v1</strong></td> <td><code>Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB</code></td> <td>❌</td> </tr> <tr> <td><strong>Dynamic Vault</strong></td> <td><code>24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi</code></td> <td>❌</td> </tr> <tr> <td><strong>Stake2Earn</strong></td> <td><code>FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP</code></td> <td>❌</td> </tr> <tr> <td><strong>Farm</strong></td> <td><code>FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1</code></td> <td>❌</td> </tr> <tr> <td><strong>Mercurial Stable Swap</strong></td> <td><code>MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky</code></td> <td>❌</td> </tr> </tbody> </table> </div> </div> # Why are Liquidity Pools and Liquidity Providers on Solana Important? Source: https://docs.meteora.ag/get-started/why-are-liquidity-pools-important Liquidity Pools are the foundation of Decentralized Finance, and Liquidity Providers are the driving force behind them. <video /> Liquidity pools are the backbone of decentralized finance. No matter what you're building, whether it's a new token, a DApp, or a DeFi service, it all starts with liquidity. For example, if you're launching a new token, you begin with nothing. You need to create a liquidity pool to enable swaps between your token and others. Moreover, deep liquidity for key tokens like SOL enables smooth liquidation and minimizes bad debt risks within the ecosystem. And deep liquidity for wrapped tokens (e.g., BTC, ETH) on Solana allows users to bridge assets across chains, attracting more users from other blockchain networks. Most users tend to focus only on the DeFi app experience, overlooking the liquidity that powers it. It's important to remember that behind every trade is a liquidity pool making it possible. ### Endless Ways to Provide Liquidity There are countless approaches to being a liquidity provider (LP). You can LP for: * New token launches * Memecoins or non-hyped assets * Market-making strategies * Major DeFi protocols or smaller experiments * Real-world assets Being an LP isn't one-size-fits-all, it’s a spectrum with endless possibilities. ### A Diverse Range of LPs Being an LP can mean very different things depending on who you are and what your goals are. Liquidity provision comes from a wide array of contributors, such as: * Professional Market Makers * Developers who integrate liquidity pools into DApps * Creators who launch and bootstrap liquidity for new tokens * Launchpads that help migrate and establish liquidity for new projects * Everyday DeFi users who provide liquidity directly to earn yield or support projects they believe in ### Liquidity Is the Fuel for Crypto’s Future As DeFi continues to evolve, liquidity will become even more critical. The future of crypto doesn’t revolve around centralized exchanges, it lies in decentralized systems. We're heading toward a world where millions of people are launching billions of new tokens. **Liquidity Pools** will be central to that future. We’ll need new mechanisms for **creating, launching, distributing**, and **maintaining** these tokens, and all of them will depend on liquidity pools. **Liquidity Providers (LPs)** will be the people driving this ecosystem. They’re the ones who create, fund, and maintain the markets that make DeFi possible. **Launchpads** will play a vital role in this shift, offering platforms for new tokens to be created and launched. The launchpad ecosystem is just getting started—what we have today is only the beginning. # Alpha Vault Formulas Source: https://docs.meteora.ag/helper-products/alpha-vault/formulas Review Alpha Vault allocation, swappable amount, refund, vesting, cap, and Token 2022 transfer-fee formulas. Alpha Vault accounting is proportional: the vault buys as one account, then users receive token claims and quote refunds based on their escrow deposit share. All on-chain arithmetic uses integer token amounts. Division rounds down. ## Key Terms | Term | Meaning | | - | - | | `total_deposit` | Total net quote amount recorded across all escrows. | | `escrow.total_deposit` | Net quote amount recorded for one escrow. | | `max_buying_cap` | Pro Rata quote amount cap for vault fills. | | `max_depositing_cap` | FCFS total accepted deposit cap. | | `swapped_amount` | Total quote amount already used by vault fills. | | `bought_token` | Total launch token bought by the vault. | | `claimed_token` | Launch token already claimed by an escrow. | | `withdrawn_deposit_overflow` | Pro Rata overflow quote already withdrawn by an escrow. | ## Max Swappable Amount The max swappable amount is mode-dependent. ```math theme={"system"} \text{Pro Rata Max Swappable} = \min(\text{total\_deposit}, \text{max\_buying\_cap}) ``` ```math theme={"system"} \text{FCFS Max Swappable} = \text{total\_deposit} ``` Each fill instruction also takes a `max_amount`, so the actual amount for that fill is: ```math theme={"system"} \text{Fill Swappable Amount} = \min(\text{Max Swappable Amount} - \text{swapped\_amount}, \text{max\_amount}) ``` ## User Deposit Share Most user-facing amounts use the escrow's share of total vault deposits. ```math theme={"system"} \text{User Share} = \frac{\text{escrow.total\_deposit}}{\text{total\_deposit}} ``` Because this is integer math on-chain, the program multiplies before dividing and rounds down. ## Linear Vesting The program treats both endpoints as inclusive by adding `1` to the numerator and denominator. ```math theme={"system"} \text{Vesting Duration} = \text{end\_vesting\_point} - \text{start\_vesting\_point} + 1 ``` ```math theme={"system"} \text{Elapsed Duration} = \min(\text{current\_point}, \text{end\_vesting\_point}) - \text{start\_vesting\_point} + 1 ``` ```math theme={"system"} \text{Total Claimable Token} = \text{bought\_token} \times \frac{\text{Elapsed Duration}}{\text{Vesting Duration}} ``` Claims are not allowed before `start_vesting_point`. ## User Claimable Token ```math theme={"system"} \text{Escrow Dripped Token} = \text{Total Claimable Token} \times \frac{\text{escrow.total\_deposit}}{\text{total\_deposit}} ``` ```math theme={"system"} \text{User Claimable Token} = \text{Escrow Dripped Token} - \text{escrow.claimed\_token} ``` After a claim, the program increments both the escrow's `claimed_token` and the vault's `total_claimed_token`. ## Pro Rata Overflow Refund Overflow is the part of total deposits that cannot be included in max swappable amount. ```math theme={"system"} \text{Deposit Overflow} = \text{total\_deposit} - \text{Max Swappable Amount} ``` ```math theme={"system"} \text{Escrow Overflow Refund} = \text{Deposit Overflow} \times \frac{\text{escrow.total\_deposit}}{\text{total\_deposit}} ``` An escrow can withdraw this overflow after `last_join_point` and through `last_buying_point`. The program tracks `withdrawn_deposit_overflow` so repeated withdrawals only receive the remaining overflow amount. ## Final Remaining Quote Refund After the pool's `last_buying_point`, an escrow can withdraw its share of quote left in the vault. ```math theme={"system"} \text{Remaining Quote} = \text{total\_deposit} - \text{swapped\_amount} ``` ```math theme={"system"} \text{Escrow Total Refund Quote} = \text{Remaining Quote} \times \frac{\text{escrow.total\_deposit}}{\text{total\_deposit}} ``` ```math theme={"system"} \text{Final Refund Transfer} = \text{Escrow Total Refund Quote} - \text{escrow.withdrawn\_deposit\_overflow} ``` The escrow is then marked as refunded so the final remaining quote path cannot be used twice. ## FCFS Accepted Deposit In FCFS mode, the program limits the accepted deposit amount before transfer. ```math theme={"system"} \text{Remaining Vault Capacity} = \text{max\_depositing\_cap} - \text{total\_deposit} ``` ```math theme={"system"} \text{Remaining User Quota} = \text{User Cap} - \text{escrow.total\_deposit} ``` ```math theme={"system"} \text{Accepted Deposit} = \min( \text{requested net amount}, \text{Remaining Vault Capacity}, \text{Remaining User Quota} ) ``` If the accepted amount is `0`, the deposit fails. ## Token 2022 Transfer Fees When the quote mint has a Token 2022 transfer fee, the vault records the fee-excluded amount as the deposit. It transfers the fee-included amount from the user so that the vault receives the intended net amount. ```math theme={"system"} \text{Recorded Deposit} = \text{Transfer Amount} - \text{Transfer Fee} ``` For outbound claims and refunds, emitted event amounts are fee-excluded when a transfer fee applies. <Warning> Formula examples describe the accounting path. Actual token balances can also be affected by Token 2022 transfer fees and transfer-memo requirements on destination accounts. </Warning> # Alpha Vault Launch Design Guide Source: https://docs.meteora.ag/helper-products/alpha-vault/launch-design-guide Choose Alpha Vault mode, caps, access model, timing, crank plan, and vesting settings based on the behavior enforced by the program. Alpha Vault is configurable, but the best launch designs are simple enough for users to understand before they deposit. ## Start With the Allocation Goal | Goal | Better fit | | - | - | | Broad participation when demand may exceed capacity | Pro Rata | | Hard accepted-deposit cap | FCFS | | Large allowlist with wallet-specific caps | Merkle proof | | Small curated allocation | Authority-ma
프로젝트로 돌아가기