Blockchain Investment Markets Tech

What Is a Flash Loan?

img-ads

A flash loan is relatively new type of uncollateralized lending that has become popular across a number of decentralized finance (DeFi) protocols based on the Ethereum network.

These types of loans have made headlines recently because they have been used to exploit a number of vulnerable DeFi protocols, leading to millions of dollars in losses. Yet, advocates argue flash loans introduce an innovative and useful tool to the world of finance for arbitrage and quick trades that weren’t possible before blockchains.

Most of us are familiar with normal loans. A lender loans out money to a borrower to be eventually paid back in full. The lender receives a payout from the borrower for temporarily parting with its money. 

Flash loans are similar, but they have the following unique properties:

  • Smart contracts: Flash loans use smart contracts, tools enabled by a blockchain that don’t let funds change hands unless certain rules are met. In the case of a flash loan, the rule is that the borrower must pay back the loan before the transaction ends, otherwise the smart contract reverses the transaction – so it’s like the loan never happened in the first place. 
  • Unsecured loan: Often lenders require borrowers to put up collateral to ensure that if the borrower can’t pay back the loan the lender is still able to get their money back. But in an unsecured loan, no collateral is required. This lack of collateral doesn’t mean the flash loan lender will not get its money back. It’s just sent back in a different way. Instead of offering collateral, the borrower needs to pay back the money right away, which brings us to our next point.
  • Instant: Usually, obtaining and fulfilling a loan is a long process. If a borrower gets approved for a loan, he or she typically has to pay it back steadily over a period of months or years. A flash loan, however, is instantaneous. The smart contract for the loan must be fulfilled in the same transaction that it is lent out. This means the borrower has to call on other smart contracts to perform instant trades with the loaned capital before the transaction ends, which is usually a few seconds.

This type of loan can be useful in certain instances, such as for traders looking to quickly profit from arbitrage opportunities when two markets are pricing a cryptocurrency differently. 

Ethereum lending platform Aave pioneered the idea in early 2020. The concept is new and still has a lot of kinks because new hacks are making abundantly clear. “There is no real-world analogy to Flash Loans,” as the Ethereum lending platform Aave puts it in its documentation

Flash loan FAQs


Where does Ethereum fit into flash loans?

This speed and other unique properties are enabled by Ethereum, which aims to expand blockchain to other use cases beyond simple transactions. Flash loans are one popular experiment amid Ethereum’s decentralized finance movement, which has cultivated financial alternatives without intermediaries. Instead, by using DeFi apps, users are supposed to be more in control of the financial instruments, such as loans, derivatives and other contracts. 

Advocates argue DeFi-style apps could give users more control over their finances, in contrast to big Wall Street corporations and other traditional financial institutions.

But that’s not why everyone is interested. DeFi has also drawn a lot of enthusiasm because a some traders have succeeded in making high returns from speculating on new coins.


Why would I want to use a flash loan?

In short, it’s one way to potentially make substantial gains without having to risk your own money.

There are times when the unheard-of speed of a flash loan makes sense.

Flash loans can be used for:

  • Arbitrage: Traders can make money by looking for price discrepancies across a number of different exchanges. Say two markets are pricing pizzacoin differently. It’s priced at $1 on Exchange A and $2 on Exchange B. A user can use a flash loan and call a separate smart contract to buy 100 pizzacoins for $100 at Exchange A, then sell them for $200 at Exchange B. The borrower then repays the loan and pockets the difference.
  • Collateral swaps: Quickly swapping the collateral backing the user’s loan for another type of collateral.
  • Lower transaction fees: In a sense, flash loans roll what would normally take several transactions into one. Each transaction costs a fee so flash loans potentially mean lower fees. 

Aave describes some other potential use cases here


Can I make money with a flash loan?

Potentially, provided you have thoroughly researched both the protocol you intend to borrow from and send the borrowed capital to. Some people have used these types of loans to earn money very quickly. But as attacks on flash loans have shown, the technology is definitely not without risks. 


How do I use a flash loan?

Flash loans are available on a variety of Ethereum-based DeFi lending platforms, such as Aave and dYdX. 

They started off as a tool solely for those tech-savvy enough to use the command line, a method for developers to send textual commands to a computer. But now more user-friendly interfaces are emerging, too. 


What if I don’t pay back a flash loan?

Then you won’t get the loan in the first place.

Remember that the entire flash loan takes place within just a single transaction. If both parties, the lender and the borrower, fail to follow the rules, the loan won’t be issued. That’s the advantage of a smart contract. It won’t allow money to move unless a condition is met. 

So if the money isn’t paid back by the borrower instantly in the transaction, the smart contract will simply reverse the transaction and hand the money back to the lender.


How secure are flash loans?

Flash loans have been the subject of several attacks leading to millions of dollars in losses. There are an array of ways that malicious actors can game the loaning mechanism.

This highlights a broader problem with Ethereum and DeFi. The problem is that smart contracts can be gamed if they aren’t written to execute exactly as intended or if the data flowing into them is corrupted or exploitable. But the technology is new. Some argue that these kinds of issues will evaporate as the technology matures, while others believe these attacks will remain a persistent challenge. 


How does a flash loan ‘attack’ work?

Flash loans are less than a year old and there have already been a long line of attacks, with different characteristics. 

Ethereum trading and lending protocol bZX was the subject of a flash loan attack where the borrower was able to trick the lender into thinking he or she repaid them in full, but the borrower really hadn’t. This was done by temporarily pushing up the price of the stablecoin being used to repay the loan.  

In another recent event, one entity used a flash loan to secure extra votes in a MakerDAO vote impacting the whole community. 

Meanwhile, computer science researchers wrote a post at security blog Hacking Distributed exploring some of the ways to attack flash loans “for fun and profit.” 

These are just a couple of examples of flash loans not being used as intended. Engineers are looking into various ways to ensure they work without unexpected loopholes. 

img-ads

Leave a Comment

Your email address will not be published.

You may also like

Bitcoin Tech

Bank of Korea chief says crypto has no intrinsic value, expects volatility

Amid a major downward correction in the cryptocurrency market, the head of South Korea’s central bank is skeptical about digital currencies like Bitcoin (BTC).

Bank of Korea Governor Lee Ju-yeol said that crypto assets like Bitcoin have no intrinsic value, local news agency Yonhap reports Tuesday. The official said that he expects more price swings on the market, stating, “It is very difficult to predict the price, but its price will be extremely volatile.”

Speaking at the National Assembly, Lee also addressed possible reasons behind the recent sharp crypto rally, which led Bitcoin to become a $1 trillion asset. The BOK governor cited a number of factors including global concerns over excessive inflation, growing institutional interest, as well as a massive $1.5 billion Bitcoin purchase by Elon Musk’s Tesla.

“These assets saw a steep rise in the shortest period of time,” Lee stated. “I would…

View More Article
Bitcoin Business

Whale who sold Bitcoin before 2020 crash cashed out $156M before this week’s 20% dip

Bitcoin (BTC) lost 20% in a day partly thanks to the actions of a single whale, new research suggests. 

Data from on-chain analytics firm Santiment on Feb. 23 showed that BTC/USD dipped to $47,400 after Bitcoin’s second-largest transaction of 2021 took place.

Ghost of Bitcoin sell-offs past returns

The transaction, 2,700 BTC worth $156.6 million at $58,000 per token, resulted in a sale which piled pressure on the market, this snowballing into the largest one-hour candle in Bitcoin’s history.

“As we noted yesterday, there was an 11x exchange inflow spike that initiated #Bitcoin’s price correction from its $58.3k #ATH,” Santiment wrote in accompanying comments on Twitter.

“Further data combing revealed that an address was responsible for the 2nd largest $BTC transaction of the year, an import of 2,700 tokens to the wallet before a quick sell-off.”

Import chart for suspect whale sell-off address. Source: Santiment/…

View More Article
Blockchain Latest

Solana-powered AMM Raydium proposes SushiSwap integration to reduce fees

Major decentralized exchange SushiSwap is the latest to consider action to mitigate Ethereum’s extreme transaction fees, and it involves a potential port to the Solana blockchain.

A proposal, which was posted to the SushiSwap forum on Feb. 22 under the codename ‘Bonsai,’ suggests building out the platform on the Solana ecosystem. The integration is intended to mitigate Ethereum’s skyrocketing transaction fees, which have spiked to new all-time highs over the past 24 hours.

The proposal would involve integrating SushiSwap with Raydium’s platform, with the Solana-based automated market maker having launched on Feb. 21.

The proposal’s author, “Handroll,” notes Raydium already features support for SushiSwap’s liquidity pools:”

“We have been working on Raydium’s AMM and liquidity pool protocols since the fall of 2020 and have just launched on our platform […] Raydium’s protocol is already able to support SushiSwap liquidity pools for the Serum orderbook.”

Handroll proposes the integration begins…

View More Article
Bitcoin Markets

$24 million lost in second-largest day of DeFi liquidations

The Feb. 22 crypto crash has sparked the second-largest volume of DeFi liquidations in the sector’s history, with more than $24.1 million worth of loans being forcefully closed within 24 hours.

According to crypto data aggregator DeBank, $13.7 million, or nearly 60% of the losses occurred on Compound, followed by Aave with $5.4 million worth of liquidations.

Yesterday’s liquidations were the second-largest to hit DeFi, trailing behind the $93 million in margin calls that were triggered by a sudden increase in the price of DAI on Nov. 26. 2020. The incident saw DAI spike by 30% on Coinbase Pro — the source of Compound’s price oracle — liquidating more than $88 million worth of crypto loan collateral on the protocol.

DeBank also reported a decline in total value locked from $44.5 billion to $38.8 billion over the past 24 hours. The 12.8% decline marks the largest single daily…

View More Article
Bitcoin

Crypto influencer warns Ethereum fees will drive users away

Prominent crypto influencer Lark Davis, or “The Crypto Lark,” has warned that Ethereum’s competitors will continue to syphon away users should Eth2 fail to launch soon amid ever-increasing gas fees.

Despite predicting five-figure Ether prices in 2021, Davis’ Feb. 19 video, Davis asserts Ethereum’s skyrocketing fees has meant that only “rich investors” can afford to the network, prompting smaller users to switch to competitors like Binance Smart Chain (BSC).

Davis noted BSC is currently enjoying a surge in popularity, with volumes for BSC-based DApps catching up to their Ethereum-based rivals.

Describing the current gas fees prices as “totally loco,” Davis urged Ethereum’s developers to expedite the launch of Eth2 in response to the skyrocketing to prevent a further exodus of users to cheaper alternatives:

“But we’re now to the point where ETH 1.0 – oh we need ETH 2.0 so soon, come on Vitalik, get it going, man –…

View More Article
Bitcoin Investment Markets

Kraken users demand refunds over flash-crash liquidations

Kraken users are demanding compensation after violent flash crashes localized to the exchange resulted in leveraged trades being liquidated amid the sharp retracements recorded across the crypto markets on Feb. 22.

Feb. 22 saw the single largest daily candle in the history of both Bitcoin and Ethereum by linear value, with BTC dropping around $9,500 from $57,500, while ETH plummeted by $400 from $1,940 within the span of 24 hours on Coinbase.

However, it appears that a combination of weak buy support and cascading liquidations resulted in particularly heavy losses on Kraken — with BTC falling 22% to less than $45,000 while ETH declined 64% to find support at just $700.

The public reaction on subreddit r/Krakensupport has seen many traders voice their frustrations. Some traders are even threatening to organize legal action against the exchange, with Reddit-user “dtk6802” claiming to have lost the majority of their…

View More Article
%d bloggers like this: