Diamond Standard (EIP-2535)
An Ethereum smart contract pattern letting a single contract address delegate calls across multiple logic contracts ('facets'), enabling modular, piecewise upgrades.
The Diamond Standard, formalized as Ethereum Improvement Proposal 2535, is a smart contract pattern built on top of the proxy contract (see Kaavon's "Proxy Contract" glossary definition) concept, where a single "diamond" contract address routes function calls to one of several separate logic contracts called "facets," each implementing a distinct subset of the overall contract's functionality. A central lookup table inside the diamond maps each function to the facet that implements it.
Where a standard upgradeable contract (see Kaavon's "Upgradeable Contract" glossary definition) typically swaps out its entire logic implementation at once, a diamond can add, replace, or remove individual facets independently — making it well suited to very large or complex protocols that need to upgrade specific pieces of functionality without redeploying or risking the entire contract, and that would otherwise bump against the EVM's contract size limit if all logic lived in a single contract.
Examples
- A protocol using the Diamond Standard can upgrade just its fee-calculation facet without touching or redeploying any of its other logic facets.
- The Diamond Standard's facet-based design is partly a response to the EVM's maximum contract bytecode size, which can be limiting for protocols with extensive functionality.