simple-arbitrage icon indicating copy to clipboard operation
simple-arbitrage copied to clipboard

[WIP] Add a flashloan and make contract callable by anyone

Open bertmiller opened this issue 4 years ago • 1 comments

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.origin to send profits to the caller of the contract? I think msg.sender will 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.

bertmiller avatar Jun 10 '21 21:06 bertmiller

@epheph a gentle ping on this, I addressed your comments above!

bertmiller avatar Jun 18 '21 14:06 bertmiller