Delegatecall Vulnerability

Architecture

Delegatecall is a low-level EVM opcode facilitating cross-contract execution by allowing a calling contract to invoke code from a secondary target address while maintaining its own storage context. This design choice fundamentally decouples logic from state, which, if improperly implemented, exposes the caller’s storage slots to unintended overwrites or unauthorized function execution. Security architects must ensure that the target contract’s storage layout aligns precisely with the caller to prevent critical state corruption within decentralized financial protocols.