Delegatecall storage collisions
Delegatecall executes code against the caller's storage layout. A slot interpreted differently after an upgrade can silently corrupt state.
Risk assessment
Delegatecall executes code against the caller's storage layout. A slot interpreted differently after an upgrade can silently corrupt state.
Mitigation
Append storage fields or reserve a stable namespace. Compare storage layouts and review implementation permissions before upgrade.
Solidity mitigation excerpt
struct VaultStorage {
address owner;
uint256 totalAssets;
uint256 newLimit; // appended field
}Foundry · Regression check
Write representative owner, balance, and packed fields before upgrading and assert every value survives the supported upgrade.
Mitigation
Related topics
What should I verify first?
Write representative owner, balance, and packed fields before upgrading and assert every value survives the supported upgrade.