🎒How is it stored?

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.

Storage Structure

  1. 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.

  2. 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.

  3. Default Address: The default address associated with the identity is stored as bytes.

  4. Secondary Addresses: An array of secondary addresses related to the identity is stored as bytes.

  5. Timestamp: The timestamp indicating when the identity was created.

  6. Merkle Root: For each identity version, a Merkle root is generated. This root serves multiple purposes:

    1. It enables verification of whether an address is part of an identity by generating Merkle proofs.

    2. It verifies the validity of identities obtained from offchain sources.

Storage Process

  1. User Interaction: Wallets initiate either a POST or PATCH request to /v1/identity to create or modify identities.

  2. Private Data Encryption: Fetcch encrypts private data within the identity and stores all data on decentralized storage platforms like IPFS or Arweave.

  3. 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.

  4. Data Sequencing: All required data, including metadata, proofs, and roots, are organized into a sequence, ensuring coherent and structured storage.

  5. 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.

Last updated