Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeiwan/zuniswapv2
UniswapV2 clone made in educational purposes
https://github.com/jeiwan/zuniswapv2
blockchain defi ethereum solidity
Last synced: about 3 hours ago
JSON representation
UniswapV2 clone made in educational purposes
- Host: GitHub
- URL: https://github.com/jeiwan/zuniswapv2
- Owner: Jeiwan
- Created: 2021-12-19T11:55:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-27T16:36:21.000Z (over 1 year ago)
- Last Synced: 2024-03-17T20:46:44.516Z (8 months ago)
- Topics: blockchain, defi, ethereum, solidity
- Language: Solidity
- Homepage: https://jeiwan.net/posts/programming-defi-uniswapv2-1/
- Size: 102 KB
- Stars: 155
- Watchers: 6
- Forks: 46
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZUniswapV2, a clone of UniswapV2 made in educational purposes
## Using this repo
1. `git clone [email protected]:Jeiwan/zuniswapv2.git`
1. Ensure you have installed Rust and Cargo: [Install Rust](https://www.rust-lang.org/tools/install)
1. Install Foundry:
`cargo install --git https://github.com/gakonst/foundry --bin forge --locked`
1. Install dependency contracts:
`git submodule update --init --recursive`
1. Run tests:
`forge test`## Blog posts
1. [Part 1](https://jeiwan.net/posts/programming-defi-uniswapv2-1/), architecture of UniswapV2, adding liquidity, first tests in Solidity, removing liquidity.
1. [Part 2](https://jeiwan.net/posts/programming-defi-uniswapv2-2/), tokens swapping, re-entrancy attacks and protection,
price oracle, integer overflow and underflow, safe transfer.
1. [Part 3](https://jeiwan.net/posts/programming-defi-uniswapv2-3/), factory contract, CREATE2 opcode, Router contract, Library contract
1. [Part 4](https://jeiwan.net/posts/programming-defi-uniswapv2-4/), LP-tokens burning bug, liquidity removal, output amount calculation, swapExactTokensForTokens, swapTokensForExactTokens, fixing swap fee bug, flash loans, fixing re-entrancy vulnerability, protocol fees