Ethereum-Solidity Quiz Q9: What is a flashloan?

Published: (December 31, 2025 at 04:08 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

What is a flashloan?

A flashloan is an 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

  1. You request to borrow a large amount of tokens.
  2. The protocol instantly sends you those tokens.
  3. Do something with the borrowed amount (arbitrage, liquidation, etc.).
  4. Before the transaction ends, you must repay the loan plus a small fee.
  5. If you don’t repay by the end of the transaction, the entire transaction reverts (fails) as if 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. This allows the protocol to safely lend massive amounts because it knows the loan will either be repaid or the whole operation will be undone.

Back to Blog

Related posts

Read more »

Ethereum UX: Account Abstraction (AA)

Introduction If you have been in the Web3 community for a while, you might have heard about Account Abstraction AA. If you are just a Web2 user, stepping into...