Zapper Hack
Incident Overview
The team of whitehat hackers (AndreiKei and VV) identified a loophole in the old Polygon bridge smart contract, which could lead to the possible exploit and lost of the users funds.
The vulnerability allows possible attacker to transfer tokens from users’ accounts, for which they had previously granted unlimited approval, via the Zap. This was possible due to a function, which executes external swaps and Zaps (via 0x, Paraswap, etc), accepting non-validated calldata:
(bool success, ) = swapTarget.call.value(valueToSend)(swapCallData)
The Zap lacked an appropriate pause function which meant that the Zapper team was unable to prevent the vulnerability from being exploited.
Zapper team together with the team of whitehat hackers (AndreiKei and VV) executed whitehat hack to withdraw funds from the old contract to the safe distribution contract, where users could successfully reclaim their funds.
Deprecated Polygon bridge:
https://etherscan.io/address/0x1f0d1927…9527ec
Smart contract used for the exploit:
https://etherscan.io/address/0x7284e5cd…d7eff6
Received funds were transferred to the safe smart contract for further distribution to the affected users:
https://etherscan.io/address/0x63cd1f35…d94b84
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to Zapper, these are the critical security checks that could have prevented this incident (June 2021).
- Verify all logic paths related to Other are guarded by proper access controls and input validation
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialFunds Recovery
Recovered
$2.5M
Net Loss
0
Sources & References
Learn to Prevent the Next Zapper
The Zapper hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.