What is a Diamond

facet ?

Know these things to understand diamonds:

  1. A diamond is a smart contract. Its Ethereum address is the single address that outside software uses to interact with it.
  2. Internally a diamond uses a set of contracts called facets for its external functions.
  3. All state variable storage data is stored in a diamond, not in its facets.
  4. The external functions of facets can directly read and write data stored in a diamond. This makes facets easy to write and gas efficient.
  5. A diamond is implemented as a fallback function that uses *delegatecall* to route external function calls to facets.
  6. A diamond often doesn’t have any external functions of its own — it uses facets for external functions which read/write its data.