Multichain Hack
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
- The victim wallet had approved WETH to Multichain's
AnyswapV4Routerand had not revoked it after the January 2022 disclosure. - The attacker's MEV contract called
anySwapOutUnderlyingWithPermit()with the victim asfrom. - The router called
permit()on WETH. WETH has nopermit(), so its fallback ran instead and the call succeeded without verifying any signature. - The router then used the victim's existing approval to
safeTransferFrom87 WETH out of the victim's wallet into the attacker's contract. - In the same transaction the bot paid about 69.86 ETH to block builder builder0x69, in tx
0x192e2f19ab497f93ed32b2ed205c4b2ff628c82e2f236b26bec081ac361be47f.
Protocol details
Security review history
- SlowMist View report
- PeckShield View report
- Trail of Bits View report
Evidence
- report Multichain Contract Vulnerability Post Mortem medium.com
- report @BlockSecTeam incident report twitter.com
- report How was Multichain Exploited? (Neptune Mutual, 17 Feb 2023) medium.com
- report Without Permit: Multichain's exploit explained (ZenGo) medium.com
- transaction Etherscan transaction 0x192e2f19...be47f etherscan.io
- address etherscan.io address 0xd050…805d etherscan.io
- address etherscan.io address 0xfde0…455a etherscan.io
- analysis DeFiLlama defillama.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.