Pre-release · not yet deployed or audited

Swap on terms that never move.

Pina AMM is a permissionless constant-product market maker for Solana. A pool locks its fee rates when it is created, with no pause switch and no admin path to its funds, and a swap costs about 4,700 compute units.

ProgrampAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV

Try the curve

SOL / USDC pool

The pool's reserves on the curve x·y = k. Moving along the curve is a trade; fees stay in the pool and push the curve outward. x·y = k
You receive
7,125.85 USDC
Average price
142.52 USDC per SOL
Fee
0.125 SOL (0.105 to LPs)
Pool price
150 → 136.07 (−9.28%)

Fees stay in the pool. Replay a burst of trades to watch k grow.

Built to be read, not trusted

It keeps the shape of Raydium's CP-Swap and removes everything an integration does not need.

  • Nothing to trust after creation

    A pool copies its tier's fee rates when it is created. Updating a tier only affects new pools, and no instruction can pause a pool or reach its funds.

    Read more →
  • Small and fast

    A swap costs about 4,700 compute units including both token transfers, and the whole program is about 81 KB.

    Read more →
  • Creator fees built in

    Any tier can add a creator fee, paid to the pool's creator in the token they choose. A launchpad can route post-launch trading income without another program.

    Read more →
  • Token-2022 ready

    SPL Token and Token-2022 mints both work, as long as their extensions cannot change how many tokens a transfer moves.

    Read more →

Measured on the real program

per swap, both transfers included
4,700CU
deployed program
81KB
instructions with fixed account lists
10
admin paths to a pool's funds
0

The end-to-end suite runs every instruction against the compiled program and fails if a swap exceeds 6,000 compute units. See the measurements.

A client for your stack

Rust, TypeScript, Dart, and on-chain CPI clients are generated from the program's IDL, so they always match it. A hand-written CLI covers everything else.

import { fetchPool, getSwapExactInInstruction } from "@pina-rs/amm";
import { TOKEN_PROGRAM_ADDRESS } from "@solana-program/token";
import { createSolanaRpc } from "@solana/kit";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const { data: pool } = await fetchPool(rpc, poolAddress);

const instruction = getSwapExactInInstruction({
	trader: wallet,
	pool: poolAddress,
	inputToken: walletToken0,
	outputToken: walletToken1,
	inputVault: pool.vault0,
	outputVault: pool.vault1,
	inputTokenProgram: TOKEN_PROGRAM_ADDRESS,
	outputTokenProgram: TOKEN_PROGRAM_ADDRESS,
	amountIn: 1_000_000n,
	minimumAmountOut: 990_000n,
});
TypeScript guide →

Pools no one can front-run

A tier can be reserved for a single pool creator, such as a launchpad program's PDA. Only that program can open pools in it, so its graduation pools cannot be created first by someone else.

Built on thisPina Bonding CurveSelf-serve launchpads that graduate every launch into a Pina AMM pool at exactly the price it reached.