Multichain Hack

Reported loss $147K
Ethereum
Other

What happened

On 15 February 2023 an MEV bot exploited an old vulnerability in Multichain's AnyswapV4Router on Ethereum and took 87 WETH from a user wallet that still had a WETH approval to the router. Coverage at the time valued it at about $130K to $147K.

The bug was the router's anySwapOutUnderlyingWithPermit() function. It calls permit() on the underlying token to check the owner's signature and then pulls the tokens with safeTransferFrom. WETH has no permit() function, but its fallback function accepts the call without reverting, so no signature was ever checked. Anyone could pass a victim's address as from and move WETH the victim had already approved to the router.

Dedaub reported this flaw to Multichain on 10 January 2022. Multichain fixed the liquidity pool issue by moving liquidity to new contracts, but approvals already given to the old router could only be removed by users themselves. By 18 February 2022 over 61% of the 7,962 affected addresses had revoked, and Multichain said it would not reimburse losses after that date. This wallet was one that never revoked.

The transaction was sent by 0xfde0d1575ed8e06fbf36256bcdfa1f359281455a, which Etherscan labels an MEV frontrunner, through contract 0xd050e0a4838d74769228b49dff97241b4ef3805d. The same transaction paid about 69.86 ETH to the block builder builder0x69, so the bot kept only part of the 87 WETH.

How it happened

  1. The victim wallet had approved WETH to Multichain's AnyswapV4Router and had not revoked it after the January 2022 disclosure.
  2. The attacker's MEV contract called anySwapOutUnderlyingWithPermit() with the victim as from.
  3. The router called permit() on WETH. WETH has no permit(), so its fallback ran instead and the call succeeded without verifying any signature.
  4. The router then used the victim's existing approval to safeTransferFrom 87 WETH out of the victim's wallet into the attacker's contract.
  5. In the same transaction the bot paid about 69.86 ETH to block builder builder0x69, in tx 0x192e2f19ab497f93ed32b2ed205c4b2ff628c82e2f236b26bec081ac361be47f.

Protocol details

Classification Exchange (DEX) / Input Validation
Protocol Type Bridge
Category Bridge Hack
Implementation language Solidity
Protocol links Website @MultichainOrg

Security review history

Bug bounty Immunefi Protocol

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.