:Allows borrower to access liquidity of multiple reserves in single flashLoan transaction. The borrower also has an option to open stable or variabled rate debt position backed by supplied collateral or credit delegation in this case. NOTE: flash loan fee is waived for approved
flashBorrowers(managed by ACLManager)
flashLoanSimple: Allows borrower to access liquidity of single reserve for the transaction. In this case flash loan fee is not waived nor can borrower open any debt position at the end of the transaction. This method is gas efficient for those trying take advantage of simple flash loan with single reserve asset.
Pooltransfers the requested
reservesto your contract, then calls
amount(s), executes any arbitrary operation in its code.
interestRateModepassed for the asset, either the Pool must be approved for flash loaned amount + fee or must or sufficient collateral or credit delegation should be available to open debt position.
FLASHLOAN_PREMIUM_TOTALrepresents the total fee paid by the borrowers of which:
FLASHLOAN_PREMIUM_TOTAL - FLASHLOAN_PREMIUM_TO_PROTOCOL
Poolto pull those funds to pay back the flash loan amount + premiums.
receiverAddressparameter in the flash loan method.
executeOperation()function), you will need to pay back the flash loaned amounts if you used
flashLoan()for any of the assets in
premiumsarray passed into the
Pool. The funds will be automatically pulled at the conclusion of your operation.
mode=2for any of the assets in the
modesparameter, then the address passed in for
onBehalfOfwill incur the debt if the
onBehalfOfaddress has previously approved the
msg.senderto incur debts on their behalf.