Table of Contents

What is a flash loan? 

Flash loans are unsecured (uncollateralized) loans where a borrower must repay their entire loan back to a lender in the same transaction. They are unique financial products, only available in the DeFi world because smart contracts can force a user to pay the loan back immediately. 

How does a flash loan work?

The mechanics of flash loans are straightforward. Here is an example of a flash loan of USDC (a dollar-pegged stablecoin), end to end:

  1. A lender decides to lend $1,000 USDC.some text
    1. They deposit $1,000 in a smart contract that includes the code for flash loans.
  2. A user decides to take out a flash loan 
  3. In a single transaction, the user calls a flashloan function on the smart contract, which executes the following actions  either “all at once” or “none at all”:some text
    1. The user is given $1,000 USDC
    2. They do whatever they want with it (in the same transaction) 
    3. Then, they repay the $1,000 + a small fee

For a deeper dive into flash loans, how they work, the mechanics involved, and how they can be used, see Cyfrin’s blog post “Flash Loans: Everything You Need To Know

Related Terms

No items found.