Skip to content

Storage Collision in Proxy / Delegatecall

SAFE-0033 Upgradeability Checked automatically by the scanner
1

What goes wrong

Proxy and implementation (or two delegatecall partners) define storage variables at the same slots with different meanings. Writes intended for one variable corrupt another, including admin/owner slots.

2

How to fix it

the pattern that is safe
// EIP-1967: admin/impl at keccak-derived slots; logic storage starts clean
bytes32 constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
Use EIP-1967 / OZ TransparentProxy; preserve layout.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0033 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs