BTC PULSE
  • News
    • Altcoins
    • Blockchain
    • Bitcoin
    • Ethereum
    • NFT
    • Regulation
    • WEB 3.0
  • Price Prediction
  • Learn
  • Events
  • Advertise
No Result
View All Result
Play Now
  • News
    • Altcoins
    • Blockchain
    • Bitcoin
    • Ethereum
    • NFT
    • Regulation
    • WEB 3.0
  • Price Prediction
  • Learn
  • Events
  • Advertise
No Result
View All Result
BTC PULSE
No Result
View All Result
Play Now
Home Ethereum

This is How a DeFi Lending Protocol on Ethereum Lost $80 million

by Favour Ajibade
May 3, 2022 - 12:00 am
in Ethereum
This is How a DeFi Lending Protocol on Ethereum Lost $80 million

Rari Capital, a lending protocol, was hacked on April 30th between 9:00 and 9:35 a.m. (UTC) and lost approximately $80 million as the hacker drained seven of Rari’s fused pools.

The Rari Capital hack was a surprise because the protocol had recently patched its functions by adding a re-entrancy guard in all CToken about two months ago. Despite the added patch, an unknown hacker exploited the Rari’s re-entrancy vulnerability, according to a tweet by BlockSec, a team focused on the security of the blockchain ecosystem.

Our monitoring system detected that multiple pools related to @RariCapital @feiprotocol were attacked, and lost more than 80M US dollars. The root cause is due to a typical reentrancy vulnerability. @defiprime
https://t.co/Cbtilpbuw9

— BlockSec (@BlockSecTeam) April 30, 2022

Rari Capital acknowledged the hack of their various fused pools via Twitter, stating that borrowing has been paused globally, assured that no further funds are at risk, and announced a 10 million-dollar bounty to the hacker if the stolen funds are returned.

The DAO core contributors are still investigating the Fuse exploit alongside security experts.

Updates will be shared as they come in.

There is a $10M bounty to the hacker if they return the stolen funds.

Thank you everyone for your support.

— Rari Capital (@RariCapital) April 30, 2022

Rari is aware of an exploit on various Fuse pools. Borrowing has been paused globally and no further funds are at risk.

The Rari team, and the rest of the Tribe, are working mitigate the loss and recover exploited funds, and will provide updates as soon as they are available.

— Jack Longarzo (@JackLongarzo) April 30, 2022

The protocol’s vulnerability stems from its old Compound codebase, which has been known to have a broken check-effect-interaction pattern in the borrow function of re-entrancy, which can only be exploited if there’s an asset with a transfer hook, such as ERC-777. However, many forks, including Compound, are not exploited because the re-entrancy puzzle is incomplete as long as they check if a token has a transfer hook before adding it to the market.

Another issue is that Rari uses an old codebase is that it uses.call.value () instead of.transfer () to send out ETH, which is a re-entrance pattern because if the receiver is a contract, it can make a call to another/same contract via receive (). Therefore, it is possible to borrow all available funds by combining them.

After borrowing an asset, the transfer hook is triggered, but the debt balance is not immediately updated. As a result, it is possible to borrow again.

The patch, which was added to all CToken two months ago to prevent users from entering any other functions even if re-enterancy is available, did not protect functions in the comptroller, particularly the exit market. The hacker took advantage of this major vulnerability.

Calling the Comptroller.exitMarket() removes a deposited asset as collateral for the loan, allowing it to be withdrawn at any time. The function determines whether or not the current health factor allows an asset to be disabled. However, the check can be bypassed.

Here’s how the attack went down:

The hacker first flashloaned 150,000,000 USDC and 50,000 WETH before depositing 150,000,000 USDC as collateral into the fUSDC-127 contract, a vulnerable fork of the compound protocol.

With deposited collateral, the attacker borrowed 1,977 ETH using the borrow() function, which transferred ETH to the hacker’s contract before updating the attacker’s actual borrow records. Because the hacker’s record was not immediately updated, the hacker made a re-entrant call to the vulnerable exitmarket() function in the fallback function, allowing the attacker to withdraw all of his collateral, 150M USDC.

The steps were repeated up to five times on different tokens before the attacker repaid the flash loan, sent the remainder to his address and routed some of the funds to Tornado Cash.

Information credit: Hacxyk and CoinCodeCap.

Tags: DeFiEthereum
Favour Ajibade

Favour Ajibade

Favour Ajibade is a content writer and crypto lover from Nigeria who is passionate about introducing Web3 and cryptocurrency-based technologies to the world through writing. He was first introduced to crypto in 2020 and was immediately intrigued. He is a student biomedical researcher and enjoys spending his free time reading and learning new things.

Related Posts

Freysa AI and DeepBook logos on a rising crypto chart against a backdrop of blockchain visuals.

Institutions Accumulate $4.17B in Ethereum as Price Surges Past $4,000

August 9, 2025

Institutions and whales snapped up $4.17B in ETH over the past month, pushing prices past $4,000 and fueling...

Vitalik Buterin proposes gas cap to improve Ethereum security and stability

Vitalik Buterin Proposes Gas Cap to Strengthen Ethereum Security and Stability

July 6, 2025

Vitalik Buterin proposes capping Ethereum transaction gas at 16.77M to reduce DoS risks, enhance stability, and support zkVM...

Ethereum logo over a digital network representing global trustware infrastructure

Vitalik Buterin Proposes ‘Pluralistic’ Digital IDs to Defend Privacy and Fair Access

June 28, 2025

Vitalik Buterin warns that rigid digital IDs can erode pseudonymity. He proposes pluralistic systems to protect privacy, fairness,...

Ethereum logo over a digital network representing global trustware infrastructure

Ethereum Whales Bet Over $100M on Price Rebound Amid US-Iran Conflict

June 23, 2025

Ethereum whales bet $100M on price rebound amid US-Iran conflict, defying bearish sentiment and rising geopolitical risks in...

Press Releases

png 115

BTC Miner: Earn $100-$100,000 Daily – The Fastest Growing Crypto Mining Platform of 2025!

June 25, 2025

BTC Miner, the fastest growing platform in 2025, opens a new era of inclusive cryptocurrency mining, allowing everyone to participate...

image2

Could XYZVerse Overtake DOGE and SHIB? Analysts Say $0.003333 Could Explode to $10!

March 30, 2025

XYZVerse aims to outpace DOGE and SHIB, with bold $10 price goals, strong community rewards, and rising demand as it...

image1 1

Massive Institutional BTC Buys Could Launch the Next Bull Market: 5 Altcoins to Watch

March 29, 2025

Institutional Bitcoin buys may trigger a market surge. Five altcoins, including $XYZ, stand to gain—early investors could see major ROI...

image1

XRP Faces Strong Resistance While XYZVerse Gains Early Investor Attention With 10 Billion $XYZ Airdrop

March 28, 2025

XRP struggles at resistance, while XYZVerse grabs early investor attention with a 10B token airdrop and rapid growth toward a...

View All
BTC-Pulse LogoTransparent

© 2024 BTC-PULSE. Disclaimer: The content is for informational purposes only, you should not construe any such information or other material as legal, tax, investment, financial, or other advice.

News

  • Altcoins
  • Bitcoin
  • Ethereum
  • NFT
  • Regulation
  • WEB 3.0

Info

  • Learn
  • Price Prediction
  • Events
  • Press Releases
  • Sitemap

Company

  • About Us
  • Terms of Service
  • Privacy Policy
  • Contact Us
  • Advertise

©2024 BTC-PULSE – All right Reserved.

No Result
View All Result
  • News
    • Altcoins
    • Blockchain
    • Bitcoin
    • Ethereum
    • NFT
    • Regulation
    • WEB 3.0
  • Price Prediction
  • Learn
  • Events
  • Advertise