https://github.com/controlcpluscontrolv/arbitrage-example
https://github.com/controlcpluscontrolv/arbitrage-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/controlcpluscontrolv/arbitrage-example
- Owner: ControlCplusControlV
- License: agpl-3.0
- Created: 2022-08-21T01:21:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T01:53:04.000Z (over 3 years ago)
- Last Synced: 2025-08-12T06:57:09.905Z (7 months ago)
- Language: Solidity
- Size: 57.6 KB
- Stars: 113
- Watchers: 1
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arbitrage-Example
There were just no good up to date Uniswap V2 Arbitrage Examples so I made one
Test via
```
forge test --fork-url
```
## Notes on Effiency
- Rewrite in Yul+ since the repayment math does need to be safe but solidity safemath is horrible in effiency
- getPair can be derived inside the contract through a function like [this](https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol#L18) but including factory init code hash is confusing for people