# Identity Embedding Module

To effectively aggregate data around users across various chains, applications, and platforms, we require a standardized and flexible system that uniquely represents and evolves over time. This document outlines the use of multi-dimensional user embeddings within a graph structure to contextualize individuals in the Web3 ecosystem. These embeddings are implemented as Non-Fungible Tokens (NFTs) within a knowledge graph system, collecting identity, engagement, interaction, and holdings data into a single node.<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc9XaXo3q43y31iSHEOeKFOKbS-UuneA8iharizWhACgSb7GasYctsq3m-G4LVschxWa2VfwYDxtLMEwjbDk2xSgImIXWK1NjE4egM8QIHXSFcmleKa5rQjCBStB8aiu77EPwMQP-gGzL5ZRH1phHwVUQ8?key=NoDcrV0KOx41porEYZ9yFw" alt=""><figcaption></figcaption></figure>

#### Key Concepts

**User Embeddings**

* Multi-dimensional Space: Users are represented in a graph structure that allows for the storage and contextualization of various data points.
* Non-Fungible Tokens (NFTs): These embeddings exist as NFTs in the graph system, encapsulating user identity, engagement, interactions, and holdings.

**Identity Binding**

* Web2 and Web3 Identities: Users' Web2 and Web3 identities are linked to NFTs and Soulbound Tokens (SBTs).
* Aggregated Identity Information: By binding multiple identities, we can verify comprehensive and composable identity information, which enables enhanced on-chain scenarios such as self-authentication, social overlap, and commercial value generation through user targeting.

#### Implementation Details

**Metadata Schema**

* Custom Schema: The binding process involves adding a custom schema in the metadata.
* Schema Hash: The schema hash is updated and verified within the contract to complete the binding of NFT and identity information.

**Merkle Tree Structure**

* Merkle Tree Configuration: In an enhanced version, identities are structured within a Merkle tree, where each leaf represents a distinct ID.
* Selective Disclosure: Users can disclose specific IDs as needed, concealing their full identity spectrum from the computation layer. This minimizes data leakage risk and enhances data transfer efficiency.

#### Benefits

* Self-Authentication: Users can authenticate themselves on-chain using their aggregated identity information.
* Social Overlapping: The system facilitates social interactions and connections based on verified identity data.
* Commercial Value: Aggregated identity data enables targeted user engagement, generating commercial value.

#### Conclusion

The proposed system for user identity aggregation in Web3 leverages NFTs, SBTs, and Merkle tree structures to create a robust and flexible representation of user data. By standardizing and evolving this system, we can ensure secure and efficient data transfer while enabling new on-chain scenarios that benefit individual users.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluwhale.gitbook.io/bluwhaleai/architecture/identity-embedding-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
