Search…
flashLoan()
Borrow an indicated amount from the liquidity pool

Function flashLoan()

1
function flashLoan(
2
Token token,
3
uint256 amount,
4
IFlashLoanRecipient recipient,
5
bytes calldata data
6
)
7
external
Copied!
Triggers a flashloan where the indicated amount is borrowed from the pool to execute the calldata and returned within an atomic transaction.
Name
Type
Description
token
Token
The address of the token deposited into the pool
amount
unit256
The amount to borrow from the pool
recipient
IFlashloanRecipient
The address of the flash loan recipient
bytes
calldata
This parameter is included for the caller to pass arbitrary information to the receiver, without impacting the utility of the flashLoan standard
Flash loans must be returned in the same transaction they are borrowed.
Copy link