Skip to content

Jars1987/anchor-amm

Repository files navigation

💧 Anchor AMM Boilerplate

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.


🎯 Purpose

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

⚙️ Features

  • AMM Pool initialization
  • Liquidity provisioning (deposit/remove)
  • Token swapping logic
  • Anchor framework structure

🧪 Usage

Prerequisites

Build the Program

anchor build

Run Tests

anchor test

🔍 Notes

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)

📜 License

MIT License

About

Solana AMM program in Anchor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published