Instant Loans or Flash Loans are a feature in a number of popular DeFi-protocols that allow you to borrow cryptocurrency assets without collateral, with the condition that the debt will be repaid in the same block of transactions.
Flash loans have become one of the most significant developments in the world of decentralized finance in 2020, bringing profits to some market participants and losses to others.
Since the beginning of decentralized lending, all crypto-asset loans required the borrower to provide excess collateral (collateral). This changed in January 2020, when UK-based lending company Aave launched a decentralized lending protocol based on liquidity pools. Instant unsecured loans were opened to third-party DeFi developers.
The basic requirement for a flash loan is simple: loan receipt and repayment transactions, as well as any intermediate transactions of disbursed funds, must take place within a single block of transactions. For this reason, only a few seconds pass from borrowing to repayment. At the same time, the size of an instant loan can reach tens of millions of dollars, and the commission for its issuance - only 0.09% of the amount (in addition to the cost of gas to address the smart contracts).
DeFi-app developers appreciated the huge potential of instant loans almost immediately after Aave opened documentation on the feature. However, they became truly in demand a few months later, with the multifold increase in the number of DeFi-services users and the ensuing increase in commissions on the Ethereum network. Conventional DeFi-protocol transactions were too expensive, and the use of instant loan-based strategies allowed to significantly reduce transaction costs and find new revenue opportunities.
Aave's lending platform processed $2 billion in flash loans in 2020, and by the end of the first half of 2021, that amount had grown to $4.2 billion. According to AaveWatch, the largest instant loan was $195 million.
In the first half of 2020 the function of flash loans became available to users of the decentralized trading platform dYdX. The analogue of instant loans can be considered a function of flash swaps, which was offered in May 2021 by a popular decentralized cryptocurrency exchange Uniswap in v2 protocol version.
Users were able to borrow more than 100 tokens without collateral, which can be used for arbitrage transactions (for example, between Uniswap and SushiSwap) and other strategies. This feature can only be accessed via smart contracts, as there is no user interface. The cost of borrowing is 0.3% (excluding gas fees and Uniswap commissions).
The ability to get cheap unsecured loans has opened up many opportunities for DeFi users to both capitalize on market inefficiencies and reduce the cost of lending and other transactions. Below are the most common scenarios for using flash loans.
Making profits from the exchange rate differences of the same asset on different trading venues involves using a large amount of your own funds. Instant loans become a source of cheap funding for such operations under the following scheme:
take a flash loan for a given asset from DeFi-protocol;
use the borrowed funds to buy the asset on that DEX, where it is cheaper;
sell the asset on the DEX, where it is more expensive;
pay back the flash loan with commissions and interest.
It is arbitrage trading that is considered the most popular scenario for using flash credits.
When the value of the collateral falls below the value of the borrower's debt, the lending protocols trigger a self-liquidation procedure. Part of the collateral is sold to repay the debt and a liquidation penalty is charged, which, for example, on Aave is 5% or 10% (depending on the type of collateral) and in the case of MakerDAO service Vaults is 13%.
Using instant loans allows you to do a much cheaper self-liquidation without penalties without waiting for this expensive procedure, using the following scheme:
take out a flash loan on the asset in question;
repay the debt with the borrowed funds and thus free up the security deposit;
use part of the security deposit to repay the flash loan with the appropriate fees and interest.
Quick replacement of collateral
Replacing loan collateral may be necessary, for example, when the price of the collateral asset falls, when the risk of liquidation increases. In such a case, it is prudent to replace a cheapening asset with a rising or less volatile crypto-asset.
Conventional collateral replacement requires full repayment of the debt and then reopening it, which increases transaction fees and requires the full amount of debt to be available. Flash credits allow you to do this much faster and cheaper by bundling all transactions into
Not only developers and crypto-traders have begun to take advantage of instant loans, but also attackers. In February 2020, there were two attacks on DeFi-protocols using Flash Loans, with a combined loss of $1 million. They used a vulnerability in the bZx protocol that allowed them to manipulate the prices of cryptoassets and artificially inflate them for profit. The instant loans themselves had no vulnerabilities, but served as a very cheap source of funding for the attacks.
During 2020, flash loan attacks became one of the most common ways to steal funds from various DeFi-protocols. Most of the attacks undertaken exploited vulnerabilities related to the unreliability of the pricing oracles used and the ability to manipulate asset prices.
In the spring of 2021, instant loans became available in several EVM-compatible networks at once - and this triggered a whole series of attacks on DeFi-protocols, primarily in the Binance Smart Chain (BSC) network.
In May 2021 alone, as a result of attacks in the BSC network, decentralized services lost a total of $167 million. The largest attacks were on Belt Finance projects ($50 million damage) and Pancake Bunny, which lost $45 million in assets. Other victims include BurgeSwap, ApeRocket, bEarnFi and a number of other DeFi-projects based on BSC.