Lab: free tools · size first · stock scanner · crypto scanner · journal

Tokenomics

Diamond Standard Erc2535

Diamond Standard Erc2535 is a crypto market concept used to structure analysis, execution, and risk decisions with measurable rules. It helps practitioners translate noisy data into consistent portfolio actions over time.

The Diamond standard, ERC-2535, lets one contract address route calls to many separate logic contracts called facets. That gets around Ethereum's contract size limit and allows parts of a system to be upgraded independently. It also makes the system harder to audit and reason about, because the code behind any function can change. If a protocol uses diamonds, who controls upgrades matters as much as the code.

How a diamond routes calls

A diamond keeps a table that maps each function selector, the first four bytes of a call, to a facet address. When a call comes in, the diamond's fallback looks up the selector and delegatecalls the facet, so all facets share the diamond's storage. Upgrades go through diamondCut, which can add, replace or remove any number of functions from any number of facets in one transaction, so a multi-part change can't be left half done. Every change must emit a DiamondCut event. Ethereum caps a single contract at 24KB of code, and a diamond has no such cap.

Seeing inside one

The standard requires loupe functions, named after a jeweler's magnifying glass, which list every facet and the selectors it serves. Block explorers and diamond tools use them to show what a diamond can do right now. The DiamondCut event history shows how that changed over time. Reading both is the closest thing to reading a normal contract's source.

Facet risks and use cases

Facets share one storage space, so a careless facet can overwrite another's data. Auditors have to review every facet and the way they interact, and the picture changes with each cut. The standard also lets a diamond become immutable, either from the start or by removing diamondCut later. For users, the questions are the same as for any upgradeable contract, with more surface: who can call diamondCut, behind what delay, and whether the team plans to lock it. We'd only use diamonds where a system truly outgrows one contract.