dekfixthai / anchor-uniswap-v2

Uniswap V2 / constant-product AMM implemented in Solana's Anchor -- add and remove liquidity, swap tokens, earn fees! :D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uniswap V2 AMM implemented in Anchor

  • programs/ammv2/src/draft.rs: outline of program with comments -- drafted before implementation

Supported Instructions

  • programs/ammv2/src/
    • instructions/
      • init_pool.rs: initialize a new pool
      • liqduidity.rs: add and remove liquidity
      • swap.rs: perform a token swap

Implemented Tests

  • tests/ammv2.ts:
    • intialize a new pool
    • add liquidity (x3)
    • remove liquidity
    • swap
    • remove liquidity

About

Uniswap V2 / constant-product AMM implemented in Solana's Anchor -- add and remove liquidity, swap tokens, earn fees! :D


Languages

Language:Rust 55.5%Language:TypeScript 44.5%