Mirror, decentralized and on-chain verification for 0xNineteen/anchor-uniswap-v2

0xNineteen dcab329fb7 fix exchange rate 3 년 전
migrations c88658cc5f init 3 년 전
programs dcab329fb7 fix exchange rate 3 년 전
tests 32909c0944 add anchor constraints 3 년 전
.gitignore c88658cc5f init 3 년 전
Anchor.toml c88658cc5f init 3 년 전
Cargo.lock c88658cc5f init 3 년 전
Cargo.toml c88658cc5f init 3 년 전
README.md b5c11a7125 Update README.md 3 년 전
package.json c88658cc5f init 3 년 전
tsconfig.json c88658cc5f init 3 년 전
yarn.lock c88658cc5f init 3 년 전

README.md

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