What are flash loans in DeFi?
Similar to traditional loans, flash loans are expected to be repaid in full over time. However, there are also stark differences.
In typical lending processes, a borrower lends money to a lender. The amount should eventually be repaid in full, with interest, according to the conditions agreed between the lender and the borrower.
Flash loans operate on a similar framework but have unique conditions 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 is met.
With flash loans, the borrower is required to repay the full loan amount before the transaction is completed.
If this rule is not followed, the transaction is canceled by the smart contract and the loan is canceled as if it never took place.
Unlike a traditional loan, a flash loan is an unsecured loan, meaning no collateral is required.
However, this does not mean that the flash lender does not get their money back in case of non-payment. In a traditional loan, a guarantee is usually put in place to ensure that the lender receives the money in the event of non-payment.
Flash loans, however, happen in a very short time (usually seconds or minutes). This means that even if no collateral is required, the borrower must immediately return the full amount they borrowed.
Unlike longer processes for traditional loans, flash loans are processed faster, thanks to smart contracts.
Getting a traditional loan approved is usually a long process. A borrower has to submit documents, wait for approval and repay the loan in agreed installments within a stipulated time period which can last for days, months or years.
On the other hand, a flash loan is accelerated in an instant, which means that the loan’s smart contract must be fulfilled during the transaction for which it is loaned. Therefore, the borrower is required to use other smart contracts, using the loaned capital to make instant transactions.
The Kicker: All of this must be done within seconds before the transaction is complete. Hence the name: flash loans.