Search…
About Bancor Network
Bancor V3
Bancor Basics
Resources for DAOs
Security & Audits
Contracts & Functions
Contracts
Write Functions
Transaction Prerequisites
Trading
Adding Liquidity
Removing Liquidity
Flashloan
flashLoan()
Flashloan Troubleshooting
Migrating Liquidity to v3
Rewards
Read Functions
Data & Events
Developer Guides
Bancor Vortex Burner
Bancor Etherscan Guide
REST API
Marketing
Brand Guide
Powered By
GitBook
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.
​
Previous
Flashloan
Next
Flashloan Troubleshooting
Last modified
2mo ago
Copy link