Skip to content

vbi-academy/amm_dex_algorand

Repository files navigation

AMM - Auto Market Maker

  • ETH <> ALGO
  • Contracts Pool
  • ETH/ALGO (Pool)
    • 1 Eth -> 10 Algo -> 1 Eth <> 0.95 Algo
    • 20 Algo -> 0.95 Eth
    • input -> output
  • x_token * y_token = K (constants) -> constant product formular - CPF
  • x_token + x_new * y_token - y_new = K
  • 100 Eth * 1000 Algo = 100_000 (k)
  • 5 eth mua algo

CheckList function

bootstrap -> contract với token ban đầu

tokens_to_mint: tinh toan so luong token pool can add liquidity

x+x1 * y+y1 = K

tokens_to_burn: tinh toan so luong token withdraw

x-x1 * y-y1 = K

tokens_to_swap: tinh toao so luong token swap

x+x1 * y-y1 = K

Custom Fees

Governance - Admin

mint - add liquidity

Burn - withdraw liquidity

Swap - swap 2 tokens

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published