Slow and tedious financial processes are an absolute nightmare. No one wants to go through several third parties and sign various documents just to obtain a loan.
Have you sought a loan before and know this process all too well? If yes then you’ll be happy to know that DeFi has a provided solution.
Since waiting and going through grueling processes when seeking a loan isn’t at the top of anyone’s “top fun things to do” list, decentralized tech is now looking to create a less painful process.
You may call this DeFi solution, flash loans.
In this article we will cover:
What is a Flash Loan?
A flash loan is a financial technology used through DeFi platforms that allow users to obtain a loan at the speed of light. You can think of DeFi flash loans like “The Flash” of loan applications.
With flash loans, loan seekers can obtain a loan of any available amount with no collateral! (although there is a catch). Those seeking a loan over a decentralized platform can turn to the Aave or dYdX platforms to find loan providers.
Three different actions are executed within one single action in a flash loan. Receiving, executing the transaction, and refunding the money are all conducted in one transaction and all within seconds.
The speed that makes flash loans so convenient has caused it to become one of the many benefits to DeFi technology.
How do flash loans work?
Let’s take a look under the hood and see just how flash loans work. To better understand flash loans, one must understand the Ethereum blockchain, smart contracts, and the lending process.
Transactions on the Ethereum blockchain are conducted through peer-to-peer smart contracts. When one party/person wishes to conduct a transaction using a smart contract, the Ethereum network will use several smart contract “functions” to execute the transaction as quickly as possible.
Smart contracts are what allows flash loans to be executed. Through smart contract-based lending protocols, flash loans allow a borrower to receive ETH tokens and uphold the condition that the tokens must be repaid to the lender. You can borrow ETH or any supported ERC20 token through a flash loan.
While it’s previously stated that flash loans can be obtained without collateral, well…they need to be repaid within the next blockchain transaction, roughly 15 seconds. That’s the catch.
If either party does not uphold their side of the agreement, such as the borrower not having collateral to repay, the transaction fails, is rolled back, and the borrower only pays the gas fee.
Why would you want a flash loan?
So while the “catch” of a flash loan is that it allows a loan to be obtained with no collateral, well you basically need to repay it right there. This may seem like it benefits the lender, but actually the borrower has the opportunity to benefit through arbitrage.
Arbitrage is the process of taking advantage of an asset’s price (in this case a cryptocurrency) in two different markets. The borrower can use a loan to buy up cheap tokens on one DEX and then sell them on a different DEX at a profit. After paying back the loan, they can keep the profit for themselves.
Since flash loans have no limit to the amount of funds a user can borrow that means some big profits can be made.
Flash loan attacks
While the method above can result in lucrative profits for a borrower, there have been many who exploited it.
Let’s look at the case from Warp Finance. The team noticed irregular activities in the protocol their flash loan smart contract was executed in. Someone used multiple transactions in the flash loan scheme to empty the protocol’s USDC and DAI vaults.
Considering with flash loans anyone can get credit instantly and without collateral, the hacker used a complex scheme to lend more than the collateral value, causing the lender to lose money.
In this transaction, the hacker made over $360,000 in seconds.
There have been various cases of attacks carried out using flash loans which caused platforms to lose up to millions of dollars. Considering DeFi is still in its infancy, exploits like these are commonly found so be sure to practice your due diligence.
What do you think of flash loans? Would you enter into a smart contract for one? Let us know in the comments below!
And now a meme from our community…