Meteora 백서

Meteora

원문

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

ng | | DAMM v1 | `@meteora-ag/dynamic-amm-sdk@1.4.1` | Existing v1 pools, LP tokens, lock escrows, Dynamic Vault integration, and Stake2Earn | The root `SKILL.md` pins the SDK versions verified by the reference packs. It also records compatibility rules that are easy to miss when combining the SDKs: * The covered SDKs use `@solana/web3.js` v1 transaction types. * DBC, DAMM v2, and DLMM use Anchor 0.31, while DAMM v1 uses Anchor 0.29 and is best isolated when dependency types conflict. * SDK amounts use `BN` values in base units. Studio configs normally use human token units, except where a config field explicitly says otherwise. * Builders return unsigned transactions. Some operations return multiple transactions or additional keypairs that must also sign. * Pool state should be refreshed before quoting or building a transaction. Compact SDK notes are also included for the helper programs that sit on top of the liquidity protocols: | Product | Package and pinned version | | :- | :- | | Alpha Vault | `@meteora-ag/alpha-vault@1.1.16` | | Presale | `@meteora-ag/presale@0.1.1` | | Met Lock | `@meteora-ag/met-lock-sdk@1.0.1` | | Stake2Earn | `@meteora-ag/m3m3@1.0.10` | | Pool Farms | `@meteora-ag/farming-sdk@1.0.18` | | Dynamic Vault | `@meteora-ag/vault-sdk@2.3.1` | | Dynamic Fee Sharing | `@meteora-ag/dynamic-fee-sharing-sdk@1.1.0` | | Zap | `@meteora-ag/zap-sdk@1.3.2` | Each of these products also has studio commands, so the ACT path covers the ordinary lifecycle. The notes exist for the surfaces the studio does not expose — account discovery, read helpers, and the individual gotchas worth knowing before you call these SDKs directly, such as which parameter names do not match the units they take. The versions above reflect the current skill; check `SKILL.md` before installing dependencies in case the packages have moved forward. ## What's in the Skill ```text theme={"system"} skills/ ├── evals/ │ └── trigger-set.md └── meteora/ ├── SKILL.md └── references/ ├── studio-actions.md ├── studio-setup.md ├── dbc.md ├── damm-v2.md ├── dlmm.md ├── damm-v1.md ├── other-products.md ├── wallets-and-txs.md ├── data-and-apis.md ├── troubleshooting.md ├── scaffolds.md └── configs/ ├── dbc_config.jsonc ├── damm_v2_config.jsonc ├── dlmm_config.jsonc ├── damm_v1_config.jsonc ├── alpha_vault_config.jsonc ├── presale_vault_config.jsonc ├── lock_config.jsonc ├── dynamic_vault_config.jsonc ├── fee_sharing_config.jsonc ├── farming_config.jsonc └── zap_config.jsonc ``` The files have distinct jobs: | File | Purpose | | :- | :- | | `SKILL.md` | Defines when the skill should activate, selects ACT or BUILD, maps products to use cases, and applies intake and verification rules | | `studio-actions.md` | Documents all studio commands, their flags, config blocks, outputs, and common prerequisites | | `studio-setup.md` | Covers Node and pnpm requirements, installation, wallet import, RPC setup, devnet funding, and localnet | | `dbc.md`, `damm-v2.md`, `dlmm.md`, `damm-v1.md` | Provide protocol mental models, SDK method maps, working flows, and version fences for outdated API patterns | | `other-products.md` | Summarizes the SDK surfaces for Alpha Vault, Presale, Met Lock, Stake2Earn, Pool Farms, Dynamic Vault, Dynamic Fee Sharing, and Zap, including how to find their accounts onchain | | `wallets-and-txs.md` | Covers key handling, RPC selection, priority fees, simulation, signing, multi-transaction results, and explorer verification | | `data-and-apis.md` | Helps the agent choose REST APIs for discovery or SDK state fetchers for transaction-time accuracy | | `troubleshooting.md` | Maps common studio, TypeScript, and onchain errors to likely causes and fixes | | `scaffolds.md` | Explains when to start from the DBC-based `fun-launch` frontend rather than build a custom UI | | `configs/*.jsonc` | Supplies commented config templates synchronized with `studio/config` | | `evals/trigger-set.md` | Lists prompts that should and should not activate the skill, including near-miss requests for other Solana protocols | Only the `skills/meteora` folder needs to be installed. The trigger eval is maintained beside it in the repository for testing skill discovery. ## Requirements | Use case | Requirements | | :- | :- | | Studio CLI | Node.js 22.12 or newer, pnpm 10 or newer, a Solana RPC, and a funded keypair for writes | | Standalone SDK code | Node.js 18 or newer, npm or another package manager, a Solana RPC, and the SDK version pinned by the skill | | Onchain and data reads | An RPC or Meteora data API, depending on whether the request needs exact onchain state or indexed data | ## Install the Skill Clone the repository, then copy the complete `meteora` folder into a skill directory supported by your agent runtime. Keep the folder name and its internal structure unchanged. <Tabs> <Tab title="Claude Code"> Install it for your user account: ```bash Terminal theme={"system"} git clone https://github.com/MeteoraAg/meteora-invent.git mkdir -p ~/.claude/skills/meteora cp -R meteora-invent/skills/meteora/. ~/.claude/skills/meteora/ ``` When you work inside a `meteora-invent` checkout, Claude Code can also discover the repository copy under `skills/`. </Tab> <Tab title="Shared .agents path"> Use the cross-runtime convention when your agent supports it: ```bash Terminal theme={"system"} git clone https://github.com/MeteoraAg/meteora-invent.git mkdir -p ~/.agents/skills/meteora cp -R meteora-invent/skills/meteora/. ~/.agents/skills/meteora/ ``` </Tab> <Tab title="OpenClaw or Hermes"> Install the folder in the runtime's skill directory: ```bash Terminal theme={"system"} # OpenClaw workspace mkdir -p <openclaw-workspace>/skills/meteora cp -R meteora-invent/skills/meteora/. <openclaw-workspace>/skills/meteora/ # Hermes user-level DeFi skills mkdir -p ~/.hermes/skills/defi/meteora cp -R meteora-invent/skills/meteora/. ~/.hermes/skills/defi/meteora/ ``` </Tab> </Tabs> After installation, confirm that the runtime can see a file at `<skills-directory>/meteora/SKILL.md`. Restart or reload the agent if it only discovers skills at startup. ## Ask the Agent to Run an Action You can make a plain-language request. Include the network, public addresses, amounts and units, and the outcome you want when you already know them. Do not include a private key or seed phrase. ```text theme={"system"} Use the Meteora skill to create a DBC token launch on devnet. Use SOL as the quote token, target a 600 SOL migration market cap, and keep the first run in dry-run mode. Ask me only for the required launch details I have not provided. ``` ```text theme={"system"} Use the Meteora skill to show the DLMM positions owned by <WALLET> in <POOL>. If fees are claimable, prepare a dry run but do not submit a transaction. ``` For a write, the expected flow is: 1. The agent selects the protocol and ACT path. 2. It collects or confirms the network, RPC, wallet, funding, amounts and units, addresses, and protocol parameters. 3. It edits the relevant JSONC config and runs the action with `dryRun: true`. 4. It reports the simulation result and asks for explicit confirmation before changing to a real execution, with an additional check when the target is mainnet. 5. After execution, it confirms the signature and re-reads the affected onchain state. ## Ask the Agent to Build an Integration For development work, name the product and the behavior you need. The agent should read the matching reference pack before it writes code. ```text theme={"system"} Use the Meteora skill's BUILD path to write a TypeScript service that quotes a DLMM swap, checks the minimum output, and returns an unsigned transaction for the caller to sign. Use the SDK version pinned by the skill. ``` ```text theme={"system"} Use the Meteora skill to add DBC graduation handling to this launchpad. Detect migration, find the successor DAMM v2 pool, and switch the trading route without changing the wallet-signing boundary. ``` If your project already uses a newer SDK version, tell the agent to compare the installed package with the reference pack and the SDK changelog. The skill's version fences are there to prevent older method names and signatures from being reused without checking them. ## Safety Rules The skill requires the agent to: * Use devnet for a first run unless you explicitly choose another network. * Simulate or quote every state-changing flow before sending it. * Obtain explicit confirmation before changing from a dry run to a real transaction, and confirm the network again for mainnet. * Keep private keys in `.env` or keypair files and refer to wallets by public address in chat. * Confirm whether each amount is in human token units or base units before execution. * Set explicit slippage and minimum-output protection for swaps. * Verify a submitted transaction and re-read state before reporting success. <Warning> Review every transaction before signing, especially one assembled by an SDK or remote service. Check the program IDs, token mints, amounts, receivers, and fee payer against the action you approved. </Warning> <Card title="Browse the Meteora Agent Skill" icon="github" href="https://github.com/MeteoraAg/meteora-invent/tree/main/skills/meteora"> Read the router, protocol references, studio action guide, and config templates on GitHub </Card> # Alpha Vault Configs Source: https://docs.meteora.ag/api-reference/damm-v1/alpha-vault/alpha-vault-configs /developer-guides/damm-v1/api-reference/openapi.json get /alpha-vault-configs # Alpha Vaults Source: https://docs.meteora.ag/api-reference/damm-v1/alpha-vault/alpha-vaults /developer-guides/damm-v1/api-reference/openapi.json get /alpha-vault # Fee Configs Source: https://docs.meteora.ag/api-reference/damm-v1/fee-configs/fee-configs /developer-guides/damm-v1/api-reference/openapi.json get /fee-config/{config_address} # Pool Configs Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pool-configs /developer-guides/damm-v1/api-reference/openapi.json get /pool-configs # Pool Metrics Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pool-metrics /developer-guides/damm-v1/api-reference/openapi.json get /pools-metrics # Pool Search Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pool-search /developer-guides/damm-v1/api-reference/openapi.json get /pools/search # Pool Search Deprecated Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pool-search-deprecated /developer-guides/damm-v1/api-reference/openapi.json get /pools/{version} # Pools Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pools /developer-guides/damm-v1/api-reference/openapi.json get /pools # Pools By A Vault LP Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pools-by-a-vault-lp /developer-guides/damm-v1/api-reference/openapi.json post /pools_by_a_vault_lp # Pools With Farms Source: https://docs.meteora.ag/api-reference/damm-v1/pools/pools-with-farms /developer-guides/damm-v1/api-reference/openapi.json get /farms # Group Source: https://docs.meteora.ag/api-reference/damm-v2/pools/group /developer-guides/damm-v2/api-reference/openapi.json get /pools/groups/{lexical_order_mints} Returns a paginated list of pools that belong to a specific pool group # Groups Source: https://docs.meteora.ag/api-reference/damm-v2/pools/groups /developer-guides/damm-v2/api-reference/openapi.json get /pools/groups Returns a paginated list of pool groups # Historical Volume Source: https://docs.meteora.ag/api-reference/damm-v2/pools/historical-volume /developer-guides/damm-v2/api-reference/openapi.json get /pools/{address}/volume/history Returns historical volume for a pool aggregated into time buckets **Notes** - If both `start_time` and `end_time` are provided, the result covers the range `[start_time, end_time]` - If only one of `start_time` or `end_time` is provided, the missing bound is inferred using the selected `timeframe` - If neither is provided, a default range is used based on `timeframe` # OHLCV Source: https://docs.meteora.ag/api-reference/damm-v2/pools/ohlcv /developer-guides/damm-v2/api-reference/openapi.json get /pools/{address}/ohlcv Returns OHLCV candles for a single pool over a time range **Notes** - If both `start_time` and `end_time` are provided, candles are returned in the range `[start_time, end_time]` - If only one of `start_time` or `end_time` is provided, the missing bound is inferred using the selected `timeframe` - If neither is provided, a default range is used based on `timeframe` # Pool Source: https://docs.meteora.ag/api-reference/damm-v2/pools/pool /developer-guides/damm-v2/api-reference/openapi.json get /pools/{address} Returns metadata and current state for a single pool # Pools Source: https://docs.meteora.ag/api-reference/damm-v2/pools/pools /developer-guides/damm-v2/api-reference/openapi.json get /pools Returns a paginated list of pools # Protocol Overview Source: https://docs.meteora.ag/api-reference/damm-v2/stats/protocol-overview /developer-guides/damm-v2/api-reference/openapi.json get /stats/protocol_metrics Returns aggregated protocol-level metrics across all pools # Get Bonus Claimed For Pool Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-bonus-claimed-for-pool /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/pools/{pool_address}/bonus_claimed Returns the total realized bonus a wallet has claimed on one DLMM pool, aggregated across every cancel event the wallet has on the pool. Includes cancels on orders that have not yet been closed (a cancel pays bonus immediately; the on-chain account is closed separately via `CloseLimitOrderIfEmpty`). USD/SOL values are derived using each cancel row's stored cancel-time price ratios — not current spot. # Get Closed Limit Order Pools Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-closed-limit-order-pools /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/closed/pools Paginated per-pool summary of the wallet's closed limit orders, sorted by `last_closed_at` DESC. A limit order is closed iff it has a row in `close_limit_orders` — cancel-only orders remain in `/open`. # Get Closed Limit Orders For Pool Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-closed-limit-orders-for-pool /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/closed/pools/{pool_address} Paginated per-order lifecycle view for the wallet's closed limit orders in one pool, sorted by `last_closed_at` DESC. # Get Limit Order Summary Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-limit-order-summary /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/summary Returns aggregate totals for a user's limit orders across all pools: open/closed order counts, total deposit value, and total bonus fees earned. "Open" means placed with no `close_limit_orders` row. "Closed" means the order has a `close_limit_orders` row (`CloseLimitOrderIfEmpty` was invoked). # Get Open Limit Order Pools Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-open-limit-order-pools /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/open/pools Paginated per-pool summary of the wallet's live limit orders, sorted by deposit USD DESC. A limit order is live until it has a `close_limit_orders` row — cancels do not remove it from this view. # Get Open Limit Orders For Pool Source: https://docs.meteora.ag/api-reference/dlmm/limit-orders/get-open-limit-orders-for-pool /developer-guides/dlmm/api-reference/openapi.json get /wallets/{wallet}/limit_orders/open/pools/{pool_address} Paginated per-order detail for the wallet's live limit orders in one pool, sorted by placement time DESC. "Live" = has no `close_limit_orders` row. # Group Source: https://docs.meteora.ag/api-reference/dlmm/pools/group /developer-guides/dlmm/api-reference/openapi.json get /pools/groups/{lexical_order_mints} Returns a paginated list of pools that belong to a specific pool group # Groups Source: https://docs.meteora.ag/api-reference/dlmm/pools/groups /developer-guides/dlmm/api-reference/openapi.json get /pools/groups Returns a paginated list of pool groups # Historical Volume Source: https://docs.meteora.ag/api-reference/dlmm/pools/historical-volume /developer-guides/dlmm/api-reference/openapi.json get /pools/{address}/volume/history Returns historical volume for a pool aggregated into time buckets **Notes** - If both `start_time` and `end_time` are provided, the result covers the range `[start_time, end_time]` - If only one of `start_time` or `end_time` is provided, the missing bound is inferred using the selected `timeframe` - If neither is provided, a default range is used based on `timeframe` # OHLCV Source: https://docs.meteora.ag/api-reference/dlmm/pools/ohlcv /developer-guides/dlmm/api-reference/openapi.json get /pools/{address}/ohlcv Returns OHLCV candles for a single pool over a time range **Notes** - If both `start_time` and `end_time` are provided, candles are returned in the range `[start_time, end_time]` - If only one of `start_time` or `end_time` is provided, the missing bound is inferred using the selected `timeframe` - If neither is provided, a default range is used based on `timeframe` # Pool Source: https://docs.meteora.ag/api-reference/dlmm/pools/pool /developer-guides/dlmm/api-reference/openapi.json get /pools/{address} Returns metadata and current state for a single pool # Pools Source: https://docs.meteora.ag/api-reference/dlmm/pools/pools /developer-guides/dlmm/api-reference/openapi.json get /pools Returns a paginated list of pools # Get total portfolio PnL across all pools Source: https://docs.meteora.ag/api-reference/dlmm/portfolio/get-total-portfolio-pnl-across-all-pools /developer-guides/dlmm/api-reference/openapi.json get /portfolio/total Returns the all-time total PnL in USD and percentage change across all user's pools. This aggregates data from all closed positions across the entire portfolio. # Arguments * `user` - The wallet address of the user # Returns * `200` - The user's total portfolio PnL * `400` - Invalid user address or query parameters # Get user portfolio with all pools containing closed positions Source: https://docs.meteora.ag/api-reference/dlmm/portfolio/get-user-portfolio-with-all-pools-containing-closed-positions /developer-guides/dlmm/api-reference/openapi.json get /portfolio Returns a paginated list of pools where the user has closed positions, sorted by most recent activity (last_closed_at DESC). The response includes: - Pool metadata (address, token symbols, icons, fees) - Aggregated PnL data (deposits, withdrawals, fees, total PnL) - Per-token breakdowns (X and Y) For detailed position history within each pool, call the /positions/{pool_address}/pnl endpoint. # Arguments * `user` - The wallet address of the user * `page` - Page number for pagination (default: 1) * `page_size` - Number of pools per page (default: 120, max: 365) * `days_back` - Only include pools with positions closed within this many days (default: 90) # Returns * `200` - The user's portfolio with pool metadata and aggregated PnL * `400` - Invalid user address or query parameters # Get user portfolio with all pools containing open positions Source: https://docs.meteora.ag/api-reference/dlmm/portfolio/get-user-portfolio-with-all-pools-containing-open-positions /developer-guides/dlmm/api-reference/openapi.json get /portfolio/open Returns a paginated list of pools where the user has open (active) positions. The response includes: - Pool metadata (address, bin step, base fee, token symbols, icons) - Current balances and unclaimed fees in USD and SOL - Pool metrics (TVL, 24h volume, fee/TVL ratio) - List of open position addresses for each pool - Aggregated total metrics acros
프로젝트로 돌아가기