Flash Loan Meaning
What is a Flash Loan in Crypto?
A flash loan is an unsecured loan available on some DeFi protocols. No collateral is needed, because the loan is paid back instantly, within the same transaction.
As a loan that doesn’t require collateral, flash loans work differently than loans in the traditional finance sector. First, they are part of the DeFi ecosystem, so they are entirely decentralized and not run through a bank.
Flash loans are executed incredibly fast: the borrowing and repayment of a flash loan happen on the same transaction. Whereas traditional loans can last for decades, a flash loan requires repayment in minutes. Typically, a smart contract executes the loan and immediately repays it with interest.
It usually takes seconds to a few minutes to validate/ mine a block containing proposed details of the flash loan. During this period, the network must agree that a transaction is valid for it to be stored permanently on the blockchain. If the network rejects a transaction, it becomes void, and there is no record of it on the blockchain.
The network rejects and cancels the transaction if a user can’t repay the loan before a block is completed. In this case, the asset is returned to the lender as if the transaction never happened. This is possible because the blockchain didn’t reassign the tokens to the borrower in the first place.
How Do Flash Loan Work Differently Than Traditional Loans?
Typically, you can’t think of flash loans in terms of traditional loans; they are unsecured and decentralized.
Flash loans are unsecured: you don’t need collateral to get one. Instead, smart contracts on the blockchain enforce the loan. If you can’t pay back the loan immediately, the blockchain doesn’t confirm the transaction. The loan doesn’t go ahead.
Smart contracts are code that run on a blockchain, executed when its predetermined conditions are met. Flash loans are executed by smart contracts, which execute the loan only on the condition that the borrower can immediately pay back with interest.
Flash Loan and Arbitrage Use Cases
The most popular use of flash loans is arbitrage trading. In this case, users take advantage of the difference in the price of cryptocurrencies across trading platforms.
- Say a token trades for $1 on DEX A but for $1.50 on DEX B. If a user buys 100,000 tokens on A and immediately sells them on B, they would earn a profit of $50,000.
- To take advantage of that, an arbitrage trader borrows $100,000 flash loan to buy from DEX A and resell on DEX B. The smart contract sets up the buying and reselling, takes back $150,000, and returns $100,000 with fees to protocol A. The rest of that profit is for the arbitrage trader.
Read more about flash loans and their use case in this article.