/FlashMEV

Generic flash-loan contract to execute on any MEV opportunity. Loan hierarchy: Balancer (0% fee), BentoBox (0.05% fee), Aave (0.09% fee).

Primary LanguageSolidity

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

Usage

Example usage:

flashMev.flash(DAI, amountIn, transactions);

Development and testing

Tests were built on Foundry.

Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

Setup .env

Copy .env.example to .env and fill out env vars e.g.

export MAINNET_RPC_URL=...

Build and run tests

./script/test.sh

Output

Deploy

./script/deploy.sh

Engineering log

Log of goals, development, challenges etc