Slot Overwriting Risk
Slot overwriting risk is the danger that a logic contract will write to a storage slot that is already being used by another part of the system. This usually happens when an upgrade is performed without properly accounting for the existing storage layout.
The consequences include the accidental modification of user balances, the changing of collateral requirements, or the disabling of critical safety features. This risk is exacerbated in complex protocols where many different variables are stored in a dense, compact format.
It is a primary vector for attacks on upgradeable decentralized finance protocols. Developers mitigate this risk through rigorous audits and by using standard patterns like EIP-1967.
Understanding how the EVM manages storage is essential for identifying and preventing this class of vulnerability. It represents a significant intersection of systems risk and smart contract security.