Skip to content

Foundry based Uniswap V2 playground to try and test out available functionalities of the protocol

Notifications You must be signed in to change notification settings

dt6120/uniswap-v2-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniswap V2 Playground

This is a Foundry project developed to play around with Uniswap V2 protocol. It has contracts that implement flash swap and arbitrage functionality using the pair and router contracts. There are various unit and fuzz tests written to run features like swapping tokens, adding removing liquidity to more advanced setups for flash swaps and arbitrage.

Getting started

  • Clone the repo
git clone https://github.com/dt6120/uniswap-v2-playground.git
  • Install dependencies and compile contracts
forge build
  • Export Ethereum mainnet RPC url
export ETH_RPC="<ETH_RPC_URL_HERE>"

Running the test suite

  • Run forge test command with fork url
forge test --fork-url $ETH_RPC -vvv

About

Foundry based Uniswap V2 playground to try and test out available functionalities of the protocol

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published