Polynomial Protocol Hack
What happened
Starting on November 18, 2022, an attacker drained about $7,000 in USDC from Optimism wallets that had approved Polynomial Protocol's zap contract, 0xB162f01C5BDA7a68292410aaA059E7Ce28D77c82. The zap was a helper that swapped a user's tokens and deposited them into Polynomial in one call. Its swapAndDeposit() function did not restrict the swapTarget and swapData inputs, so anyone could make the zap spend other users' approvals.
The attacker used contract 0xf682e302f16c9509ffa133029ccf6de55f4e29a8 to sweep USDC from users who had approved the zap but never deposited. Damage stayed small because Polynomial's interface never requested unlimited approvals. Polynomial had already disclosed the bug to its users and announced reimbursement for those affected a few weeks before the theft drew wider attention.
On December 12, 2022, a user publicly reported missing USDC, and Polynomial's statement that day put the loss at about $7,000, pointed back to its earlier reimbursement announcement, and asked everyone to revoke approvals to the old zap. Polynomial removed the zap from its website, but the vulnerable contract is still on-chain, so any approval left on it is still at risk.
How it happened
- Users who wanted to deposit into Polynomial approved USDC to the PolynomialZap contract. Some approved it and never deposited, which left an allowance open.
swapAndDeposit()accepted a caller-suppliedswapTargetandswapDataand executed that call from the zap without checking where it went or what it did.- The attacker deployed a contract that called the zap with crafted swap parameters. The zap then moved USDC out of wallets that still had an allowance to it, and the attacker collected the tokens.
- The attacker repeated this for several victims between November 18 and 23, 2022, taking about $7,000 in USDC in total.
Protocol details
Evidence
- report @0xpoor4ever incident report twitter.com
- report Report mobile.twitter.com
- report Polynomial on X: ~7k USDC stolen, reimbursing users, revoke approvals twitter.com
- report Polynomial on X: exploiter swept USDC from users who approved and never deposited (2/x) twitter.com
- report 0xPoor4ever on X: friend's USDC mysteriously transferred twitter.com
- address Optimism Etherscan: attack contract 0xf682...29a8 optimistic.etherscan.io
- address optimistic.etherscan.io address 0xB162…code optimistic.etherscan.io
- address optimistic.etherscan.io address 0xf682…code optimistic.etherscan.io
- analysis Web Archive archive.ph
- analysis DeFiLlama defillama.com
- analysis 2022 Polynomial Protocol Hack: Check If You're Affected revoke.cash
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.