https://github.com/manifoldfinance/flashmev
Generic flash-loan contract to execute on any MEV opportunity. Loan hierarchy: Balancer (0% fee), BentoBox (0.05% fee), Aave (0.09% fee).
https://github.com/manifoldfinance/flashmev
Last synced: 11 days ago
JSON representation
Generic flash-loan contract to execute on any MEV opportunity. Loan hierarchy: Balancer (0% fee), BentoBox (0.05% fee), Aave (0.09% fee).
- Host: GitHub
- URL: https://github.com/manifoldfinance/flashmev
- Owner: manifoldfinance
- Created: 2023-02-24T13:41:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-17T11:22:37.000Z (over 2 years ago)
- Last Synced: 2025-09-30T02:46:46.154Z (16 days ago)
- Language: Solidity
- Size: 22.5 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FlashMEV
### Generic flash-loan smart contract for executing any MEV opportunity
Herein contains source code and example usage for `FlashMEV` contract.
Loans are made in a preferential order, based on lowest fees first then token availability. The following protocols are used:
- Balancer (0% fee)
- BentoBox (0.05% fee)
- Aave (0.09% fee)## Deployed at
- Mainnet [0x60CFf949c22b7136dc750Af1F1a8e0a2D2A7556F](https://etherscan.io/address/0x60CFf949c22b7136dc750Af1F1a8e0a2D2A7556F)
## Usage
Example usage:
```solidity
flashMev.flash(DAI, amountIn, transactions);
```## Development and testing
Tests were built on Foundry.
### Install Foundry
```bash
curl -L https://foundry.paradigm.xyz | bash
```
```bash
foundryup
```### Setup .env
Copy `.env.example` to `.env` and fill out env vars e.g.
```bash
export MAINNET_RPC_URL=...
```### Build and run tests
```bash
./script/test.sh
```
[Output](docs/backrun-test-results.md)### Deploy
```bash
./script/deploy.sh
```### Engineering log
[Log of goals, development, challenges etc](doc/engineer-log.md)