Skip to content

Calyptus-Learn/Uniswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniswapV2 Pool

Features

  • Create a UniswapV2 Liquidity pool for a token pair (Calyp token, Tus token)
  • Add first liquidity to the pool, earn liquidity token.

    The first liquidity provider to join a pool sets the initial exchange rate by depositing what they believe to be an equivalent value of Calyp and Tus tokens. If this ratio is off, arbitrage traders will bring the prices to equilibrium at the expense of the initial liquidity provider.

  • Swap Calyp token for Tus token by any of the following methods:
    • swapSingleHopExactAmountIn (sells all tokens for another)
    • swapSingleHopExactAmountOut (buys specific amount of tokens set by the caller)
  • Burn Liquidity tokens and remove liquidity you had provided.

Note: The tests depend on contracts deployed on mainnet and can only be performed by forking the mainnet. Please create an .env file and set up the following for the same:

URL=YOUR RPC PROVIDER URL

PRIVATE_KEY=PRIVATEKEY OF YOUR TEST-WALLET

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published