Skip to main content




function flashLoan(address receiverAddress, address[] assets, uint256[] amounts, uint256[] modes, address onBehalfOf, bytes params, uint16 referralCode) external nonpayable

Allows smartcontracts to access the liquidity of the pool within one transaction, as long as the amount taken plus a fee is returned. IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration. For further details please visit


receiverAddressaddressThe address of the contract receiving the funds, implementing the IFlashLoanReceiver interface
assetsaddress[]The addresses of the assets being flash-borrowed
amountsuint256[]The amounts amounts being flash-borrowed
modesuint256[]Types of the debt to open if the flash loan is not returned: 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the onBehalfOf address 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the onBehalfOf address
onBehalfOfaddressThe address that will receive the debt in the case of using on modes 1 or 2
paramsbytesVariadic packed params to pass to the receiver as extra information
referralCodeuint16Code used to register the integrator originating the operation, for potential rewards. 0 if the action is executed directly by the user, without any middle-man*


function getReservesList() external view returns (address[])