Sushi Swap New Routing Contract Bug

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 13:19, 3 May 2023 by Azoundria (talk | contribs) (Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/sushiswapnewroutingcontractbug.php}} {{Unattributed Sources}} thumb|Sushi SwapSushi is a decentralized exchange (DEX) that allows users to trade cryptocurrencies without the need for a central operator administrator. Users can buy and sell across 11,700 cryptocurrency pairs and trade tokens across ten crypto networks. Sushi’s products include a decentralized exchange, a de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources 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!

Sushi Swap

Sushi is a decentralized exchange (DEX) that allows users to trade cryptocurrencies without the need for a central operator administrator. Users can buy and sell across 11,700 cryptocurrency pairs and trade tokens across ten crypto networks. Sushi’s products include a decentralized exchange, a decentralized lending market, yield instruments, an auction platform, an AMM framework, and a payroll solution for vesting and streaming. The platform maintains decentralized governance of $SUSH token holders, while the day-to-day operations are done by a core team. However, over $3.3 million was stolen from SushiSwap users via a new routing contract. The attacker was able to create a fake Univ3 pool and drain tokens from any address which had approved it. Although the damage wasn't enormous or particularly widespread, this incident is a bad look for an already-embattled protocol.

This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10]

About Sushi Swap

"Buy and Sell Instantly on Sushi. Whenever. No registration needed. Over 400 tokens to trade at your fingertips."

"Sushi is a Decentralized Exchange (DEX) we aim to be a one-stop shop for all your decentralized finance (DeFi) needs. Sushi allows users to trade cryptocurrencies without the need for a central operator administrator, using their own preferred connected crypto wallet. Users can buy and sell across 11,700 cryptocurrency pairs and trade tokens across ten crypto networks (and counting) via the newly launched cross-chain swap (SushiXSwap). Next to trading you can: earn, stack yields, lend, borrow, leverage all on one decentralized, community driven platform."

"Sushi’s products are configured in a way that allows the entire platform to maintain decentralized governance of $SUSH token holders, while continuing to innovate on the collective foundations by design. Whereas major structural changes are voted on by the community, the day-to-day operations, rebalancing of pools and ratios, business strategy and overall development implementation is done by a core team.

Thus far, the core products, include:

a decentralized exchange (Swap) a decentralized lending market (Kashi) yield instruments (Onsen) an auction platform (Miso) an AMM framework (Trident) and a payroll solutions for vesting and streaming (Furo)"

"Your keys, your coins. Own your own crypto, just like cash in your wallet. Fully decentralized & self custody of your funds means your money in your wallet, as it should be."

"Move assets across networks in seconds. We will always find you the best rate, no matter what network you’re on, with no extra fees."

"Earn passive income with your coins. With multiple ways to passively earn yield on your coins, you can choose your own yield stack and make your money work for you, all in the background, 24/7."

"Over $3.3M was stolen from SushiSwap users over the weekend via a new routing contract.

All users who had approved Sushi’s 4 day old RouteProcessor2 contract at the time of the incident, were at risk, across 14 chains.

Sushi Head Chef, Jared Grey, acknowledged the bug, urging users to revoke approvals. He later stated that the protocol is now safe to use, and the exploited contract has been removed, as well as promising a full post-mortem on events.

Amongst the chaos, DeFi’s favourite villain got rekt for 1800 ETH, and there was plenty of whitehacking activity.

One user claimed to have targeted 0xSifu as a whitehat, though the attempt appeared to have been botched, with only 100 ETH eventually returned. BlockSec also got involved, adding to their impressive list of recent whitehacks.

Luckily, the days-old contract had relatively few approvers, and this didn’t turn out to be the AMM-ageddon it could have been."

"The new contract contained the function, processRoute, which is insufficiently protected against accepting arbitrary data.

The attacker was able to create a fake Univ3 pool, and insert their own contract address in place of a genuine liquidity pool. During the uniswapV3SwapCallback function, the contract is then able to drain (or 'yoink') tokens from any address which had approved it."

"SushiSwap router exploit comes from a bad callback. Although the line 328 comment is correct, line 340 does not check the pool deployer. So you can impersonate a V3Pool, do a no-op swap, call safeTransferFrom on an arbitrary ERC20 and arbitrary from address on line 347"

"The damage wasn’t enourmous, nor particularly widespread. Users were either drained or revoked quickly, and whitehat efforts certainly helped to soften the PR blow."

"But this is a bad look for an already-embattled protocol, nonetheless."

"Grey receiving an SEC subpoena, criticism of a paltry bug bounty programme, and large operating expenses (including 500k for Grey himself)...

It appears the drama is far from over for Sushi."

This is a global/international case not involving a specific country.

The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.

Include:

  • Known history of when and how the service was started.
  • What problems does the company or service claim to solve?
  • What marketing materials were used by the firm or business?
  • Audits performed, and excerpts that may have been included.
  • Business registration documents shown (fake or legitimate).
  • How were people recruited to participate?
  • Public warnings and announcements prior to the event.

Don't Include:

  • Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
  • Anything that wasn't reasonably knowable at the time of the event.

There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.

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 specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.

Key Event Timeline - Sushi Swap New Routing Contract Bug
Date Event Description
April 8th, 2023 8:35:23 PM MDT Exploit Transaction Transaction occurred exploiting the Sushi Swap contract.

Technical Details

This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?

Total Amount Lost

The total amount lost has been estimated at $3,300,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

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

Total Amount Recovered

There do not appear to have been any funds recovered in this case.

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