What are Defi flash loans? Besides yield farming, the world of decentralized finance brought one more innovative feature that A lot of beginners cannot wrap their heads around flash loans.
To best understand what a flash loan is and how it works forget everything you know about traditional bank loans. A Defi flash loan is a type of cryptocurrency loan that can be obtained without the need for collateral. Users can request millions of dollars anonymously and Defi platforms will send their funds without asking any questions sounds weird.
While the premise may sound attractive there is an important catch that imposes a limitation upon flash loans. Within the same transactional block, the loan must be paid back. Flash loans are atomic meaning that if the entire process is not completed instantly the loan will not go through. Which completely minimizes the risk that platforms have for offering this feature.
If someone asks for a flash loan but fails to repay it before the next transaction block is confirmed the blockchain network will revert the transaction as if it was never requested in the first place.
Use cases of Defi Flash Loans
With the previous explanation in mind, it becomes obvious that flash loans are designed for quick actions. Some of which are arbitrage trading, and debt refinancing.
In the case of arbitrage trading, traders can make money with flash loans by capitalizing on the price difference of an asset across multiple exchanges. For instance, the trader in question might purchase a cryptocurrency at a discounted rate on one exchange and sell it at a premium rate on another. This leaves the trader with his loaned assets and the bonus that he gained from arbitrage trading. Once done the user can repay the flash loan and enjoy the newly gained profits. In the case of debt refinancing, users can take out flash loans if they have an existing loan.
The goal is to pay off a loan in order to take out another loan from a different Defi platform that offers better interest rates. Essentially you’re profiting from switching between competitive lending platforms and flash loan risks. One major issue with flash loans is that they tend to be highly vulnerable due to their complexity. All flash loans are automated with the help of smart contracts but not all smart contracts are coded correctly. As a result, a simple mistake grants a hacker the window of opportunity to exploit the flash loan and drain funds from a project’s liquidity pools.
We refer to this event as a flash loan exploit and there are more than enough of them to write an entire history book. The bzx protocol in the first Defi platform to suffer from such a hack lost almost a million dollars worth of cryptocurrencies. This is such a gigantic issue in the blockchain industry that developers have created special platforms that enable users to insure their assets.
Related: What Is Yield Farming? Defi Basics Explained
If a decentralized exchange suffers from an exploit and it does not manage to retrieve the stolen assets the other platform will reimburse those who have insured their funds on time.
What are your thoughts on flash loans are they good for defy or should developers remove the feature to create a safer market? Let us know in the comments below.