A minimal Automated Market Maker (AMM) implementation built using the Anchor framework on Solana. This project serves as a boilerplate for developers looking to understand or extend the fundamentals of on-chain liquidity pools.
This repo provides a clean, readable foundation for an Anchor-based AMM, ideal for:
- Learning how to build token swap mechanisms
- Understanding liquidity pool dynamics
- Prototyping custom AMMs on Solana
- AMM Pool initialization
- Liquidity provisioning (deposit/remove)
- Token swapping logic
- Anchor framework structure
- Rust
- Solana CLI
- Node.js & Yarn
- Anchor CLI
anchor build
anchor test
This boilerplate is learning purposes. This can be extended and you can add features such as:
- Fee mechanics
- Time-weighted average pricing
- LP token tracking
- Advanced invariant curves (e.g., stable swaps)
MIT License