An audit of a standard delegatecall pattern — one of the most dangerous primitives in Solidity.
delegatecall executes code in the calling contract's storage context:
target.delegatecall(data) where target/data is user-influencedUnlike call, delegatecall doesn't isolate state. One unchecked delegatecall = full takeover.
Critical — "delegatecall executes code in this contract's storage context — high risk." Also pairs it with storage-collision checks (implementation slot vs proxy state).
Every proxy and upgradeable contract uses delegatecall. Mis-using it — unvalidated target, wrong storage layout — has cost protocols hundreds of millions.