Projects
Main concepts
On-Chain Metadata

ODC Metadata Management

The Nexera Protocol features a unique approach to handling metadata, which is stored on-chain. This management is facilitated by the MetaTokenMetadata facet and the IMetadataGenerator interface, making the metadata handling highly modular and customizable.

IMetadataGenerator

Any Property Manager contract that serves as a metadata contract, simply requires inheritance from the IMetadataGenerator interface, which includes the following function:

function generateMetadata(bytes32 prop, uint256 ouid) external view returns (Metadata.ExtraProperties memory);

This function generates metadata for a given Property of an On-chain Data Container (ODC).

Metadata Library

A library for generating metadata has already been implemented. With this library, it's possible to store any information in the metadata and dynamically update it. For example, it can be used to store updated prices through an oracle, providing real-time data to the metadata.

By utilizing the IMetadataGenerator interface and the provided Metadata Library, various use cases can be implemented, such as:

  1. Dynamic Pricing: Implementing a dynamic pricing mechanism that updates metadata with the current market price of a property or an associated asset.
  2. Real-Time Data: Storing real-time data from IoT devices, sensors, or other external sources directly in the metadata.
  3. Chain of Ownership: Maintaining a history of the ownership chain of an ODC, allowing for provenance tracking and verification.
  4. Custom Attributes: Adding custom attributes, such as unique traits or characteristics, to the metadata, enhancing the uniqueness and value of the ODC.

This highly modular and customizable approach to metadata management enables a wide range of use cases and applications, making the protocol more versatile and adaptable to various industries and scenarios.