Good idea, bad design: How the Diamond standard falls short
Summary: Trail of Bits audited an implementation of the Diamond standard (EIP 2535), a draft proposal for contract upgradeability built on delegatecall, and said it cannot recommend it in its current form because the code is over-engineered and hard to review. The review found two instances of function-shadowing in the contracts and showed that a malicious contract can collide with a variable from another implementation despite the proposal's claim that different base pointers prevent collisions.
Key Takeaway: The audit describes how a malicious owner could push an upgrade that looks benign but contains a backdoor, and the EIP offers no guidelines for preventing these malicious storage collisions.
Read the original at Trail of Bits Blog ↗