Superfluid Hack
What happened
On February 8, 2022, an attacker exploited Superfluid's Polygon host contract to impersonate Super Token holders and drain assets from their wallets. Crafted calldata let the attacker create distribution indexes on behalf of victim accounts, move the resulting assets through Polygon exchanges, and swap part of the proceeds into ETH. Superfluid temporarily disabled agreement calls, deployed a patched host and agreement implementation, and contacted affected teams.
Agreement contracts authenticated the Host contract but did not validate the decoded ctx supplied through it. Duplicate ABI-encoded ctx values allowed a forged context, including a victim sender address, to be decoded before the legitimate stamped context.
How it happened
Superfluid's callAgreement passes a serialized ctx object between the host and agreement contracts. The attacker supplied call data containing a forged ctx in the agreement-specific payload. When the host replaced the placeholder ctx, the final byte string contained both the attacker-controlled ctx and the legitimate host-generated ctx.
ABI decoding used the injected first ctx and ignored the remaining legitimate context. Because the agreement trusted calls from the Host without validating that decoded ctx against the Host's stored hash, it accepted an arbitrary spoofed sender. The attacker used that identity to create Instant Distribution Agreement indexes and distribute victims' Super Tokens to controlled accounts.
Protocol details
Security review history
- PeckShield View report
Evidence
- report Post-mortem rekt.news
- report @QiDaoProtocol incident report twitter.com
- report @Superfluid_HQ incident report twitter.com
- report 08/02/22 Exploit Post-Mortem medium.com
- analysis Website reference beincrypto.com
- analysis DeFiLlama defillama.com
- analysis Explained: The Superfluid Hack (February 2022) halborn.com
- analysis Superfluid: Learn EVM Attacks coinspect.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.