CPMM
A Constant Product Market Maker with a full swap + liquidity UI.
- Year
- 2025
- Role
- Solo — on-chain program & front-end
Overview
A constant-product (x·y=k) AMM on Solana. The on-chain swap and pool program is written in Rust/Anchor and paired with a TypeScript client and a Next.js front-end for swapping tokens and providing liquidity.
The challenge
Before tackling concentrated liquidity, I wanted to build the simpler constant-product model end to end — to nail the on-chain swap/pool mechanics, LP accounting and the wallet-connected trading flow on Solana.
What I built
- An on-chain constant-product swap and pool program in Rust/Anchor.
- Liquidity provision and removal with LP token accounting.
- A TypeScript client and a Next.js UI for swapping tokens and managing pools.
Outcome
A working CPMM deployed and live — and the conceptual foundation for the CLMM that followed.
More work
Syncro
A high-performance Solana indexing platform: write a transform in the browser, and stream structured on-chain data straight into your own Postgres — no proprietary schema, no lock-in.
AMM SolanaCLMM
A Concentrated Liquidity Market Maker built from scratch on Solana.
dApp Web3Solana Sync Hub
A Solana web app for connecting wallets and surfacing on-chain data.