What are Flash Loans?
Flash loans are a relatively new type of loaning option that was introduced in decentralized finance or DeFi sector. These do not work like traditional loans where the borrowers have to provide a given amount of digital currencies as collateral.
Flash loans are much faster and they often complete in one full cycle rather than consisting of various separate steps.
Working Mechanism of Flash Loans
Flash loans are classified as unsecured loans since they do not require any type of collateral. However, unlike unsecured loans, the borrowers in this case do not have to pass a credit check or verify their credit score etc.
Instead, the borrowers have to initiate a new request for borrowing a given amount of digital currencies. However, flash loans do not work in various separated steps. Therefore, the investors have to repay the given loan in the same transaction.
A typical flash loan is made up of three distinct parts such as receiving the loan, perform more transactions with the loan, and repay the loan. All of these steps have to take place in a single step and within a few seconds.
The borrowers have to determine the transactions and swaps and other details for the entire flash loan transaction beforehand. If the return of a flash loan transaction does not match the calculated return amount, the network does not process the transaction.
What are Flash Loan Attacks?
Flash loans are innovative and grant some degree of security for both borrowers and lenders. However, they are not wholly fool-proof. Hackers often look for technical blind spots in flash loan protocols to steal massive amounts of cryptocurrencies.
The first ever flash loan attack was launched on dYdX lending protocol. The attackers stole loaned ETH from the protocol and sent them to two different decentralized protocols namely Compound and Fulcrum.
On Fulcrum, the attackers shorted ETH against WBTC. On this account, Fulcrum had to add WBTC from Kyber and Uniswap. However, the liquidity on Uniswap is considerably low therefore WBTC prices inflated suddenly.
Therefore, Fulcurm purchase WBTC at inflated price. On the other hand, the hackers applied for a WBTC loan on Compound using ETH loan from dYdX. They swapped the borrowed WBTC on Uniswap and generated massive profits. They returned ETH loan on dYdX and kept the additional ETH.
Risks associated with Flash Loans
There are various instances where investors have managed to use flash loans attacks to inflate the prices of a given cryptocurrency. In some cases, DeFi protocols can use data oracles to prevent flash loan attacks.
However, flash loan attacks are common because they are not expensive to execute. Furthermore, there is no collateral that would prevent the attackers.
With traditional loans, the investors are required to comply with the credit requirements and maintain the value of their collateral reserves. In this manner, the borrowers are prevented from conducting any type of foul play.
On the other hand, DeFi Oracle protocols can also have technical limitations and require additional updates to prevent foul play. The attackers were able to exploit ease of flash loan process to their advantage and exploit the DeFi lending protocols.
Advantages of Flash Loans
Here are some noteworthy advantages of Flash loans that have the potential to add new utilities in the protocol:
Flash Loans are collateral-free and they do not require the borrowers to accumulate massive capital to qualify for a borrowing request.
Flash loans do not have any credit checks that mandate the investors to maintain a healthy credit score. By design, they do not require to depend on the lending history of a given investor.
Flash loans take place in a few seconds or minutes and within a single blockchain transaction. Flash loans allow investors to use arbitrage trading and take advantage of price differences of a token on different trading markets.
Flash loans offer liquidity for decentralized exchanges and LPs. Flash loans are also utilized as risk management tool since the transaction is processed if the predetermined loan return amount is generated.
Flash loans expose the investors to a certain degree of risks on account of flash loan attacks. However, they are not costly and do not require a massive amount of capital investment that paves the way for greater financial inclusion.