Cryptocurrency Flash Loans – Key Concepts, Use Cases and Security Risks

Key takeaways:

  • A flash loan is a rather new uncollateralized lending mechanism that has become popular across several decentralized financial (DeFi) protocols
  • The borrower needs to repay the loan plus fees within the same transaction or the whole loan is reversed as if it never even took place
  • The most common use case for flash loans is arbitrage, but flash loans can also be used for collateral swaps and saving on the transaction fees
  • The exploitation of vulnerabilities in the various flash loan smart contracts has incurred large losses and made headlines quite a few times in the last year

Flash loan is a rather new lending instrument that has made its way into many decentralized financial (DeFi) protocols. Debuting in 2020 on Aave, crypto flash loans allow advanced users to instantly borrow large sums of crypto without having to deposit any collateral. However, as the name implies, these loans need to be repaid straight away, this is within the same block.

Nevertheless, flash loans have several important use cases despite their short-lasting nature. The problem arises when vulnerabilities in the flash loan smart contracts are exploited, potentially leading to huge financial losses. Sadly, these kinds of exploitations have occurred before and are still happening from time to time. In this article, we will clarify how flash loans work, list protocols that support flash loans, and shine a light on how flash loan attacks and the consequences they can have on the DeFi space. 

Best Crypto-Backed Loans

Key characteristics of cryptocurrency flash loans

There are quite a few properties that differentiate cryptocurrency flash loans from ordinary bank loans and even crypto-backed DeFi loans. While getting a loan approved by a bank is usually a very long process, flash loans are instantaneous blockchain-based loans. The issuance and repayment of the flash loan is overseen by the loan’s smart contract – a set of code-written rules that define the loan terms and conditions.

The flash loans also stand out from other loans in the repayment period, as they must be repaid within the same block, which usually takes from just a few seconds to a few minutes to be mined. If the funds are not repaid within the same block, the smart contract reverses the initial transaction as if no capital had ever been loaned. This unique mechanism allows users to take out flash loans without having to deposit any collateral whatsoever. 

Admittedly, the concept of a flash loan is not an easy one to completely understand, likely because there is no real-world analogy for this blockchain-based instrument. Naturally, questions such as why would anyone take out a loan for merely a few seconds, arise.


There are several flash loan use cases

Contrary to the first impression, this type of loan proves to be very useful in several situations. If used wisely, one can even make substantial profits without having to risk your own money. 

Flash loans are probably most often used to perform arbitrage trades. Arbitrage opportunities arise when two markets are pricing the same cryptocurrency differently. When there is a high enough discrepancy, say ChainLink (LINK) is trading for $28 at one exchange and $27 at another, advanced traders can set up and trigger a special smart contract that borrows the funds to buy LINK at the price of $27, sells them at the price of $28 at another exchange and repays the borrowed amount, all within the same block. If the trade is completed successfully, the trader pockets in the $1 per LINK difference minus a small fee that needs to be paid to the protocol that issued the flash loan. Arbitrage mechanisms like this are essentially what keep the prices of a token roughly the same across different exchanges.

In addition to performing arbitrage trades, flash loans can also be used for collateral swaps and lowering transaction fees, as several transactions, which would otherwise each incur a network fee, can be merged into a single one using a flash loan.

Protocols that support flash loans 

Flash loans are available on a variety of DeFi lending protocols, such as Aave, dYdX, Uniswap, and bZx.  The first two operate with flash loan lending pools larger than $20 million and are therefore the most popular. While Aave charges an interest rate of 0.09% per flash loan, its competition, dYdX only demands the loan repayment plus 1 Wei in fees. An experienced user that has researched the market mechanisms and is very familiar with both the sending and receiving DeFi protocols can make lucrative sums of money using flash loans. Reports of five-figured gains with zero initial investment using flash loans have taken the cryptocurrency community like a storm.

While several user-friendly (or at least friendlier) interfaces are being developed at the moment, this uncollateralized lending instrument is as of now still accessible only to the very tech-savvy cryptocurrency investor subgroup. So, while using flash loans does not require a large financial investment, you do need to possess quite a bit of programming skills as well as economic knowledge.

Vulnerabilities in flash loan contracts can lead to significant losses

Since flash loans have only been around for a bit more than a year, the smart contracts defining these loans are still not perfect. Occasionally, a malicious actor finds a vulnerability in the smart contract and uses the loophole for his own benefit. Flash loans have been the subject of several attacks over the course of the past few months, incurring millions of dollars in losses.

In just a bit more than one year, flash loans had already suffered a long line of attacks, each using a slightly different strategy to tamper with the loan’s smart contract. On Valentine’s day of 2020, an anonymous attacker was able to trick lenders into thinking that he or she repaid them in full, while the borrower really had not. The attack took place on the Ethereum trading and lending protocol bZX and the attacker temporarily inflated the price of the stablecoin being used to repay the loan to trick the flash loan smart contract. In another event, someone took out a flash loan to secure extra votes in a MakerDAO governance vote, which consequently impacted the whole MakerDAO community.

The bottom line

Flash loans represent an innovative and useful tool to the world of finance, facilitating arbitrage and quick trades in a way that was not possible before blockchains. However, as with any new technology, flash loans also need time to mature. Several experts believe that flash loan attacks could soon be eliminated as the DeFi protocol developers patch loopholes after every attack. Increasing the security of the flash loan mechanism could further boost the feature’s integration into other protocols as well as the instrument’s adoption and use cases.



Show More