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

0xNineteen dcab329fb7 fix exchange rate %!s(int64=3) %!d(string=hai) anos
migrations c88658cc5f init %!s(int64=3) %!d(string=hai) anos
programs dcab329fb7 fix exchange rate %!s(int64=3) %!d(string=hai) anos
tests 32909c0944 add anchor constraints %!s(int64=3) %!d(string=hai) anos
.gitignore c88658cc5f init %!s(int64=3) %!d(string=hai) anos
Anchor.toml c88658cc5f init %!s(int64=3) %!d(string=hai) anos
Cargo.lock c88658cc5f init %!s(int64=3) %!d(string=hai) anos
Cargo.toml c88658cc5f init %!s(int64=3) %!d(string=hai) anos
README.md b5c11a7125 Update README.md %!s(int64=3) %!d(string=hai) anos
package.json c88658cc5f init %!s(int64=3) %!d(string=hai) anos
tsconfig.json c88658cc5f init %!s(int64=3) %!d(string=hai) anos
yarn.lock c88658cc5f init %!s(int64=3) %!d(string=hai) anos

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