How meteoraag/damm-v2 works
Project type and purpose
• This is a blockchain smart-contract project (an on-chain AMM program for Solana) with complementary off-chain clients and SDKs.
• Purpose: Implement a Constant-Product Automated Market Maker (AMM) with advanced features (dynamic fees, concentrated liquidity, customizable configs) using Anchor + Rust.
File structure
• Top-level:
• .github/ – CI workflows & custom actions for Anchor/Solana setup
• programs/cp-amm/ – on-chain Rust/Anchor program (all instruction handlers, state, math, tests)
• rust-sdk/ – off-chain Rust SDK for interacting with the program
• scripts/ – shell wrappers (CLI helpers)
• tests/ – TypeScript/Node test suite, integration tests & bank-run utilities
• Config and manifest files: Anchor.toml, Cargo.toml, package.json, tsconfig.json
README for additional insights
• Describes key use cases & stakeholders (Admin, Keeper, Token team, Partner, Liquidity provider, Trading bot)
• Lists all on-chain “endpoints” (instructions) and state schema (config keys, pools, positions)
• Specifies tech stack: Anchor 0.31.0, Solana 2.1.0, Rust 1.85.0, TS tests
Capturing essential elements
• Separate user roles and their distinct flows (Admin vs LP vs Trader)
• Make PDAs explicit to illustrate how state is organized on-chain
• Detail the off-chain SDK/CLI/test harness to show the full dev/test lifecycle