Cryptonomics: What Are Flash Loans

The flash loan concept is relatively new and is already generating good interest from users worldwide. Despite its apparent positive impact on DeFi, it can also be hijacked for malicious intentions.

Introduction

Many people have a time when they have to make some expenditure, and they don’t have sufficient funds of their own to execute the need. It becomes obvious to you that you have to reach out to some other person who is in a better financial position to bail you out: welcome to the world of loans.

Generally speaking, it’s safe to assume that everyone knows how the regular loan process goes: a borrower first approaches a lender and makes a request to be given some funds. The lender presents conditions with embedded caveats for providing the funds to the borrower. The borrower agrees to the given conditions, and the lender disburses the funds to the borrower. If the borrower fails to pay back the loan at the arranged time, the caveats kick in.

That’s the standard picture we see when the word loan is mentioned. In Decentralized Finance,  a radical rebranding of loans as we know it has appeared on the horizon, pushing the limits once more of what is possible with DeFi. 

What is a Flash Loan

In DeFi terms, a flash loan is a risk-free instantaneous loan whose time of borrowing and payback happens within one blockchain transaction. They do not require the borrower to pledge collateral, and there’s no necessary test of creditworthiness. Also, there is almost no limit to the amount that can be borrowed; the amount is only limited by the service provider’s pool of funds. The sole requirement is that the borrowed funds and the service fee must be returned within the same blockchain transaction’s execution time. 

The term was originally coined in 2018 by the founder of an ethereum ‘open-source’ bank, Marble Protocol. They introduced the brilliant idea of using a smart contract to provide swift loans within the span of one transaction. 

Flash loans are a fascinating addition to options available in DeFi. It is getting attention because it potentially makes it possible for anyone to access huge sums of cryptocurrencies. It is a new service that has unlocked what is practically impossible in traditional finance. 

The Mechanics

As at the time of writing, flash loans are only available on Ethereum-based blockchain platforms, Ethereum is the only blockchain at the moment that has the feature on which flash loans can run. It takes advantage of Ethereum’s state-reversing feature, making it possible for a smart contract to reverse a transaction if some encoded conditions are not met. 

A simple way of describing how it works is to say that the smart contract calls a block of codes where the borrow function is at the beginning. The transaction that will use the loan is in the middle of the code, while the loan repayment function is at the end. During execution, if the transaction will not return a value higher than the loan amount, the smart contract detects it, reverses the process, and returns the borrowed funds back to the pool. On the other hand, if the smart contract checks the middle function and detects that the final output will cover the loan plus fees, it releases the funds, and the transaction is executed.

Features of Flash Loans.

Flash loans possess some unique attributes that make them different from conventional loans. These include 

They are insecure because no security deposit like collateral is required to prequalify for a loan. You don’t need a guarantor. 

They run on Smart Contracts: Smart Contracts are blockchain programs that ensure that rules governing a transaction are adhered to before funds change hands. Applied to flash loans, the governing rule is that the borrower must pay back the loan before the end of the transaction. The smart contract enforces this rule. 

Trustlessness: A prospective borrower does not need to be subjected to any creditworthiness test. The only measure of eligibility is the contract’s capacity to return a value that is greater than the loan amount plus fees combined. 

Instantaneity: the entire process of consummating a flash loan is virtually instantaneous. An average transaction in the Ethereum blockchain takes about 16 seconds. It thus means that the whole process will not take more than the time of one transaction. The implementation of this is that flash loans are only useful for transactions that will be finalized within a concise time frame.

It is free of risk: though there are no collateral or prequalification requirements, the lender is not exposed to a payment default risk. The smart contract is smart enough to detect if the use to which the loan is being applied would pay it back. The smart contract will release the funds if so; if it cannot, the smart contract returns the borrowed funds to the source-pool. 

Typical Uses of Flash Loans

Uses of flash loans abound in DeFi, including the following 

Arbitrage: This is a strategy where one takes advantage of the difference in the price of a particular commodity/token that is traded in two different markets or exchanges. If the token is slightly cheaper in Exchange A than Exchange B, a trader can take a flash loan, buy the token from Exchange A and sell on Exchange B. He will then pay back the loan and pocket the profit.

 Debt Refinancing: Flash loans make it possible to quickly pay off a high-interest loan to switch to another whose interest rate is lower. 

While these are two of the most established uses, other uses would inadvertently arise as more and more people pick interest in this novel application of DeFi.

Summary 

The flash loan concept is relatively new and is already generating good interest from users worldwide. Despite its apparent positive impact on DeFi, it can also be hijacked for malicious intentions, as can be seen in this report. A group of researchers explored some of the ways flash loans can be manipulated. That being said, flash loans are a highly promising application of DeFi. As the technology evolves and as efforts grow towards plugging potential loopholes that pose risks of malicious use, it will likely be a core part of decentralized lending.

Source : bsc.news

Leave a Reply

Your email address will not be published. Required fields are marked *