Skip to main content

IFlashBorrower

Methods

onFlashLoan

function onFlashLoan(address sender, contract IERC20 token, uint256 amount, uint256 fee, bytes data) external nonpayable

The flashloan callback. amount + fee needs to repayed to msg.sender before this call returns.

Parameters

NameTypeDescription
senderaddressThe address of the invoker of this flashloan.
tokencontract IERC20The address of the token that is loaned.
amountuint256of the token that is loaned.
feeuint256The fee that needs to be paid on top for this loan. Needs to be the same as token.
databytesAdditional data that was passed to the flashloan function.