A flashloan is uncollateralized loan that exists only during a single blockchain transaction. The borrowed amount must be repaid by the end of the same blockchain transaction.
How flashloans work:
- You request to borrow a large amount of tokens
- The protocol instantly sends you those tokens
- Do something with the borrowed amount(arbitrage, liquidation etc.)
- Before the transaction ends, you must repay the loan plus a small fee
- If you don't repay by the end of the transaction, the entire transaction reverts (fails) like nothing happened
Why it's possible:
Smart contracts can execute complex logic within a single transaction. If any step fails, the entire transaction rolls back. So the protocol can safely lend massive amounts because it knows the loan will either be repaid or the whole thing gets undone.
Top comments (0)