🎒How is it stored?
Last updated
Last updated
Fetcch Identities are stored using an efficient onchain storage system that ensures verifiability, interoperability, and minimal gas costs. This approach enables Fetcch to cover the gas expenses for users, contributing to a seamless experience.
Versioned Format: Identities are stored in a version-based format, such as v1, v2, etc. This allows tracking of historical changes to identities, ensuring changes adhere to protocol rules.
Content Identifier (CID): The metadata of each identity is stored using a CID from IPFS or Arweave. This CID provides a reference to the offchain location of the identity's metadata.
Default Address: The default address associated with the identity is stored as bytes.
Secondary Addresses: An array of secondary addresses related to the identity is stored as bytes.
Timestamp: The timestamp indicating when the identity was created.
Merkle Root: For each identity version, a Merkle root is generated. This root serves multiple purposes:
It enables verification of whether an address is part of an identity by generating Merkle proofs.
It verifies the validity of identities obtained from offchain sources.
User Interaction: Wallets initiate either a POST or PATCH request to /v1/identity
to create or modify identities.
Private Data Encryption: Fetcch encrypts private data within the identity and stores all data on decentralized storage platforms like IPFS or Arweave.
Proof Generation: Necessary proofs for the identity, requests, and address books are generated. These proofs contribute to the overall integrity and security of the identity.
Data Sequencing: All required data, including metadata, proofs, and roots, are organized into a sequence, ensuring coherent and structured storage.
Regular Onchain Updates: At regular intervals of approximately 10 minutes, Fetcch initiates onchain transactions to update each identity present in the sequence. This keeps the onchain identity information up to date and aligned with offchain changes.
This meticulous storage mechanism ensures that Fetcch Identities maintain a high degree of security, verifiability, and interoperability while effectively managing gas costs for users. For further technical details, you can refer to the associated resources.