What are flash loans in DeFi?
Similar to traditional loans, flash loans are expected to be paid back in full eventually. However, there are also marked differences.
In typical lending processes, a borrower loans money from a lender. The amount is expected to be paid back in full eventually, with interest, depending on the terms discussed between the lender and the borrower.
Flash loans operate on a similar framework but have some unique terms and premises:
Use of smart contracts
A smart contract is a tool used in most blockchains to ensure that funds do not change hands until a specific set of rules are met.
When it comes to flash loans, the borrower is required to repay the full amount of the loan before the completion of the transaction.
If this rule is not followed, the transaction is reversed by the smart contract and the loan is nullified as if it never took place at all.
Unsecured loan
Unlike a traditional loan, a flash loan is an unsecured loan, meaning no collateral is needed.
However, this does not imply that the flash loan lender does not get their money back in case of non-payment. In a traditional loan, collateral is typically put up to ensure that the lender receives the money back in the event of non-payment.
Flash loans, however, happen within a very short timeframe (usually a few seconds or minutes). This means that while no collateral is needed, the borrower must return the full amount they borrowed right away.
Instantaneous transactions
As opposed to longer processes for traditional loans, flash loans are processed faster, thanks to smart contracts.
Getting a traditional loan approved usually is a long process. A borrower must submit documents, wait for approval, and pay the loan back in agreed increments within a stipulated period that may run into days, months or years.
On the other hand, a flash loan is expedited in an instant, which means that the loan’s smart contract must be fulfilled during the transaction for which it’s lent out. Therefore, the borrower is required to call on other smart contracts, using the loaned capital to perform instant trades.
The kicker: All this must be done in a few seconds before the transaction ends. Hence, the name: flash loans.