LendingPoolcontract, requesting a Flash Loan of a certain
LendingPooltransfers the requested
reserveto your contract, then calls
executeOperation()on your contract (or another contract that you specify as the
amount, executes any arbitrary operation in its code. When your code has finished, you transfer the Flash loaned
reserveback to our
LendingPoolcontract compares the balance of the
reservebefore and after your code execution, ensuring that the balance of the
reserveis exactly the same as before plus the Flash Loan fee.
reservebefore and after your code execution is correct, then the
LendingPoolfunction continues to completion.
reserveafter your code execution is incorrect, then the function reverts, undoing any state changes your contract made.