simple-arbitrage
simple-arbitrage copied to clipboard
[WIP] Add a flashloan and make contract callable by anyone
This PR does the following:
- Adds a flashloan from Aave to "BundleExecutor.sol," as well as importing all the necessary libraries
- Moved the previous bundle executor to "BundleExecutorNoFlashloan.sol"
- Ups the minimum volume and profits in arbitrage.ts to make more sense with flashloans
- Packs variables in ABI encoded params for passing in to our bundle executor post-Flashloan
Some remaining tasks I could use help on:
- Does it make sense to use
tx.originto send profits to the caller of the contract? I thinkmsg.senderwill be Aave calling back our contract after sending the flashloan - Testing to ensure this works. It's very similar to the previous version, but we should probably test it.
@epheph a gentle ping on this, I addressed your comments above!