Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dt6120/uniswap-v2-playground
Foundry based Uniswap V2 playground to try and test out available functionalities of the protocol
https://github.com/dt6120/uniswap-v2-playground
arbitrage flashswap foundry solidity uniswap-v2
Last synced: 20 days ago
JSON representation
Foundry based Uniswap V2 playground to try and test out available functionalities of the protocol
- Host: GitHub
- URL: https://github.com/dt6120/uniswap-v2-playground
- Owner: dt6120
- Created: 2024-10-05T05:54:14.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-13T11:54:30.000Z (about 1 month ago)
- Last Synced: 2024-10-17T22:11:49.466Z (about 1 month ago)
- Topics: arbitrage, flashswap, foundry, solidity, uniswap-v2
- Language: Solidity
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
git clone https://github.com/dt6120/uniswap-v2-playground.git
```
- Install dependencies and compile contracts
```bash
forge build
```
- Export Ethereum mainnet RPC url
```bash
export ETH_RPC=""
```### Running the test suite
- Run forge test command with fork url
```bash
forge test --fork-url $ETH_RPC -vvv
```