Normal ERC20 implementations allow derived contracts to add state variables without considering proxy compatibility. Token-0x's storage layout starts at slot 0 with _balances, but derived contracts can inadvertently add variables that collide with ERC-1967 proxy implementation slots, allowing proxy takeover attacks.
The vulnerability occurs because Solidity automatically assigns storage slots sequentially, and developers may not realize their variables are occupying critical proxy infrastructure slots.
Likelihood:
Any derived contract that adds an implementation variable will trigger this collision
DeFi protocols using Token-0x as a base and deploying behind proxies are at risk
The collision occurs during contract deployment, making it a systemic issue
Impact:
Complete proxy takeover allowing attackers to change implementation contract
Bypass of all access controls and token economics
Total loss of funds and protocol control
The ProxyCollisionToken contract demonstrates how a derived contract can intentionally or accidentally collide with ERC-1967 proxy slots. We add this contract to the PoC because:
It creates the collision: The implementation variable is crafted to occupy the ERC-1967 implementation slot
It proves the vulnerability:
Shows that storage collision is possible in Token-0x derived contracts
It demonstrates the attack vector: Any proxy using this contract would have its implementation overwritten
Implement ERC-7201 namespaced storage pattern to reserve slots for proxy infrastructure and prevent collisions with derived contract variables.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.