- Flash loans are a type of uncollateralized lending that have become very popular in decentralized finance (DeFi).
- While they've proved popular, flash loan exploits have been used to attack vulnerable DeFi protocols and steal millions of dollars.
To take out a normal loan, you need to provide proof of reserves, income, and more besides. Well, forget all that: flash loans are like lending on steroids.
But are they a good or a bad thing? That depends on who you ask. To some, because flash loans are both a hugely innovative and useful tool in decentralized finance (), primarily on the Ethereum Network. To their detractors, flash loans present an opportunity for unscrupulous actors to siphon off millions by exploiting poorly protected protocols.
Dig in and see why.
What are flash loans?
With a run-of-the-mill loan, the lender usually wants some kind of collateral to make sure they get their money back; the contract often takes a while to get approved, and the borrower pays back the loan, with interest, over a period of weeks, months or years.
Flash loans are the antithesis of that. They do what they say on the tin, and occur in an instant because the funds are both borrowed and returned within seconds—in the space of one transaction.
It’s made possible because of the innovative properties of 0.09% fee., which set out the terms, and also perform instant trades on behalf of the borrower with the loaned capital. Flash loans that result in a profit are typically charged a
If the borrower doesn't repay the capital, or the trade doesn’t make a profit, the conditions set out in the flash loan smart contract aren’t met, and the transaction is reversed—just like it never happened, with the funds returned to the lender. So—in theory, at least—there’s minimal risk for both parties.
In a nutshell, flash loans are:
- 🔓 Unsecured - Instead of providing collateral, the borrower immediately repays the loan.
- ⚡️ Instant - The capital is borrowed and repaid in one transaction.
- 🤖 Innovative - Flash loans use smart contracts to set out terms and perform instant trades.
Why have flash loans become so popular?
Flash loans were first introduced in 2018 by a forerunner to DeFi, open-source bank Marble.
They arrived on the Ethereum network in January 2020, courtesy of pioneering decentralized lending platform . By July of the same year, Aave was regularly issuing more than $100 million in flash loans each day. In June 2021, the platform had issued almost $4 billion in flash loans.
Traders have taken to them because they can be used to profit from arbitrage opportunities, such as when a token’s value varies on different markets. A 1% difference in value may not seem like much, but with a large loan used for arbitrage, the profits can be substantial.
Did you know?
The biggest flash loan Aave has processed to date was about $200 million.
Some traders have successfully employed flash loans to speculate on new coins, without having to risk their own funds.
And, because flash loans bundle several smart contract transactions into one, they can reduce transaction fees (which can add up to quite a bit).
Are flash loans safe?
Flash loans are still very much a work in progress; the flip side of their rapid adoption by the decentralized finance community is that they've been used to exploit vulnerable DeFi protocols, and steal millions of dollars.
In February 2020, lending protocol bZX was the focus of not one but two flash loan attacks. A borrower fooled a lender into thinking the loan had been repaid by temporarily pushing up the price of the stablecoin being used for repayment. Most flash loans are denominated in USD-pegged stablecoins; in July 2020, MakerDAO's and Circle's made up close to 95% of all flash loans issued.
The bZx hacker used a clever set of instructions, executed in the form of a flash loan, to leverage current weaknesses in the DeFi ecosystem for their own gain. By using several decentralized financial tools, and a small dose of price manipulation, they were able to make off with a lot of , netting around $1 million.
More flash-loan exploits followed in June and October 2020, when a hacker made off with $34 million from DeFi protocol Harvest Finance, due to an engineering error. Attacks have continued into 2021; in February, attackers were able to drain $37 million from the Cream Finance protocol for a cost of just $15,000 in transaction fees, using flash loans.
Where can you use flash loans?
Flash loans are used across decentralized finance protocols based on the Ethereum network, and more recently on Binance Chain (which has also seen flash loan attacks).
Aave is still the leading provider, but others such as dYdX and decentralized exchange (flash swaps, on Uniswap, allow users to withdraw Ethereum-based tokens paired with other tokens, do whatever they want with them, and then immediately return the equivalent amount.) have introduced flash loans. And
Flash loans were originally designed for developers, but since August 2020 platforms such as DeFi Saver and Furucombo have allowed less tech-savvy users to take advantage of DeFi and flash loans by removing the need for technical coding skills. Parts of the open-source smart contract code for Ethereum can be swapped out or connected together as a core feature of the protocol, technically termed “composability.”
The future of flash loans
Flash loans are still in their infancy, and are being used for ever more innovative purposes, such as borrowing funds to buy tokens in order to push through governance votes. Practices such as this could have long-standing repercussions for protocols, and some have made moves to curtail them.
Perhaps, as some believe, with the evolution of DeFi, these types of lending will be seen as a flash in the pan. But others argue for their evolution; with the design of ever more secure protocols, they have the potential to increase market efficiency by giving everyone money for nothing, and the opportunity to be a crypto whale—if only for a few seconds.
This article comes from our Decrypt DAO, where Decrypt NFT holders can vote using Snapshot on what educational content they want to see on our site. To take part, download the Decrypt app and join the conversation on Discord.