Bloom On Blast Update Margin Vulnerability

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search

Notice: This page is a freshly imported case study from an original repository. While the original content had a similar format, some sections may not have been fully completed. Please help fill in any empty sections or any missing information you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!

Bloom on Blast Logo and Homepage

Bloom allows users on the Blast blockchain to make leveraged bets on the future price of different assets, which are called perpetuals. These require margin collateral to be held in the smart contract. There was an issue involving the timestamps of withdrawals on accrued yield for positions that have have a pnl below 0. This issue allowed the accrued yield to be withdrawn repeatedly, draining the protocol. It was resolved by disabling an UpdateMargin method. The team was able to negotiate with the attacker to get a return of 90% of the funds, with the attacker keeping a 10% bounty.[1][2][3][4][5][6][7][8][9][10]

About Bloom On Blast

"Powerful leverage, simplified trading Stacked yields. Decentralized. Trade with up to 50x leverage on crypto assets."

"With both ETH and USDB (Blast's native stablecoin) auto-rebasing on Blast and smart contracts, our liquidity providers gain yield from their rebasing USDB as well as a portion of platform fees.

Similarly, our traders will earn the same rebasing yield on their collateral, but additionally enjoy the best liquidation price possible and rebates on their losses made possible through rebasing yield earned on their bets."

"The first perps DEX for rebasing assets, powered by Blast" "Whether you're an LP or a trader, invest in your beliefs and stack rebasing stablecoins. That's the Bloom effect." "A CEX-like experience with fully onchain execution and self-custody. We don't compromise on security or UX."

"Stacked yields make your trades more powerful. Native yield is earned on the Blast network from using rebasing USDB as collateral.

This means better lower opportunity cost, and better liquidation prices for traders. Similarly, as a liquidity provider, you can stack auto-compounding, rebasing rewards and you’ve got yield on yield."

"On Bloom, traders can place "bets" (positions) and either bet "up" (go long) or bet "down" (go short). To open a bet, traders will need to use USDB as collateral, Blast's native yield bearing stablecoin. We offer gas-sponsored, 1-click transactions, which allow traders to open and close bets with a single signature."

"Bloom is developed by Avantis Labs, a blockchain development company backed by some of the world's best investors across crypto, traditional finance and frontier tech, such as Pantera Capital, Galaxy Digital, and Founders Fund."

The Reality

This sections is included if a case involved deception or information that was unknown at the time. Examples include:

  • When the service was actually started (if different than the "official story").
  • Who actually ran a service and their own personal history.
  • How the service was structured behind the scenes. (For example, there was no "trading bot".)
  • Details of what audits reported and how vulnerabilities were missed during auditing.

What Happened

"The Blast ecosystem project Bloom was attacked, resulting in a loss of approximately $540,000. On May 10th, Bloom announced that they had successfully recovered most of the stolen funds. The Bloom team stated that after paying a 10% bug bounty, they had retrieved $486,000 of the stolen funds, which accounts for 90% of the total amount ($540,000). All recovered funds will be redistributed to liquidity providers."

Key Event Timeline - Bloom On Blast Update Margin Vulnerability
Date Event Description
May 7th, 2024 7:28:41 PM MDT First Attack Transaction The very first transaction which occurs by the attacker of the Bloom on Blast protocol.
May 8th, 2024 8:45:37 PM MDT Start Of Exploit The very start of the exploit happening.
May 9th, 2024 12:48:19 AM MDT End Of Exploit The exploit is finished.
May 9th, 2024 1:21:00 AM MDT Team Investigating According to the postmortem, the team was already aware and investigating the transaction at this point.
May 9th, 2024 2:05:00 AM MDT Root Cause Identified The team reportedly identified the root cause and starts drafting a fix.
May 9th, 2024 2:21:03 AM MDT Patch Fix On Contract Team reportedly patches a fix on the smart contracts.
May 9th, 2024 10:21:00 AM MDT Initial Morning Announcement The team shares an announcement, with the problem having been isolated and that they've located where the funds are currently stashed and that the hacker has an acocunt on Binance.
May 9th, 2024 4:21:00 PM MDT Fund Recovery Announcement The Bloom on Blast project announces the recover of funds from the exploit. They were able to recover 90% of the funds, with the rest being a 10% bounty to the attacker. They announce plans for reimbursements within 48 hours, a detailed post-mortem to be released, and upgrades to their rebasing yield feature to account for edge cases.
May 13th, 2024 10:31:00 AM MDT Tweet Post-Mortem In a tweet update, Bloom on Blast provides a link to their post-mortem analysis of the exploit.
May 15th, 2024 1:12:00 PM MDT Bloom Further Update In a further update, Bloom announces integration with another security vendor, the impacts of the exploit on their bUSDB vault, and the distribution of Blast Gold upcoming on May 24th. They are looking forward to the future.

Technical Details

"The exploit was due to an issue with how Blast-native yields were handled when updating cash for a position, specifically for positions that are in a loss during withdrawal."

"The core problem was located in the method updateTrade(Trade memory _t) inside of TradingStorage.sol . This method updates relevant data for an existing trade during cash deposit / withdrawals through updateMarginCallback inside of TradingCallbacks.sol .

The timestamp variable that defines the pending yield accrued for a position was not being updated correctly when positions have pnl < 0. Because the timestamp wasn’t updated appropriately, this allowed the attacker to continuously withdraw USDB equivalent amounts of accrued yield on their positions over and over again."

"The UpdateMargin method was the entry point of the attack, and upon discovering the cause, the Bloom team proceeded to make an upgrade to remove the functionality from the smart contracts. The feature was effectively disabled to avoid further damage."

Total Amount Lost

The total amount lost has been estimated at $540,000 USD.

How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?

Immediate Reactions

How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?

Ultimate Outcome

"We couldn’t have done this without the help of key onchain sleuths like ZachXBT and security firms like Hexagate. Bloom recovered funds in record time for our users by negotiating a 10% bounty for the exploiter. We prioritize our user safety and will do our best to always communicate in a timely and transparent manner."

"Out of the total exploited funds ($540K), we've recovered $486K (net of a 10% bug bounty), all of which will be re-distributed to LPs. We have agreed to a 10% bug bounty, in return for not pursuing legal charges against the exploiter.

The team's been working around the clock to ensure we get LPs their funds back. We could not have done this without the help of @zachxbt, @RiverRunnner, @PacmanBlur and of course our incredible community's patience and support."

A bounty of $54,000 USD was paid for the discovery.

Total Amount Recovered

The total amount recovered has been estimated at $486,000 USD.

What funds were recovered? What funds were reimbursed for those affected users?

Ongoing Developments

What parts of this case are still remaining to be concluded?

Individual Prevention Policies

No specific policies for individual prevention have yet been identified in this case.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

Policies for platforms to take to prevent this situation have not yet been selected in this case.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

No specific regulatory policies have yet been identified in this case.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References