Cross Context Identities
Demos Network employs a variety of techniques for different chains and protocols, which is a core aspect of numerous Demos protocol mechanisms, including the Gas Tanks mechanism and the overall reputation score for a node or user. The primary mechanism for achieving this is known as Cross Context Identities (CCI). Within the blockchain — specifically in the GCRMain entity of the GCRv2 schema — each address carries a JSON object calledidentities. This serves as a registry for the user’s various identities across contexts.
The column is declared on GCRMain:
StoredIdentities keys are context-scoped identifiers; values describe the identity payload per context. The StoredIdentities type currently defines seven identity contexts:
| Context | Source |
|---|---|
xm | Cross-chain wallet identity (EVM, Solana, Aptos, etc.) |
web2 | Web2 social identity (Twitter, GitHub, Discord, Telegram) |
pqc | Post-quantum key bindings (Falcon, ML-DSA) |
ud | Unstoppable Domains |
nomis | Nomis wallet score |
humanpassport | Human Passport humanity proof |
ethos | Ethos reputation profile |
src/libs/blockchain/gcr/gcr_routines/. (TLSNotary attestations are tracked separately in the dedicated gcr_tlsnotary table rather than in the identities object.)
Upon each user transaction on a different chain or context (e.g., a cross-chain transaction or a Web2 transaction involving an API key), the public portion of that identity is saved inside the aforementioned table.
It should be noted that the private key or API key is not stored on the blockchain. Instead, it is stored locally, if specified, through the use of wallets or dApps that utilize the Demos SDK.
Leveraging identities
This approach offers a significant advantage in managing multiple identities. To illustrate, consider a scenario where User A wishes to execute a Demos transaction, paying gas with their Solana native tokens. As the user has already interacted with Demos using Solana (e.g., a cross-chain transaction), the blockchain is aware of its Solana public key. The RPC will then request a Solana payment from A to one of our designated gas tanks and will verify that A’s public key has successfully completed the transaction. Once this is confirmed, the RPC can proceed with the execution.It’s all SDK
It is important to note that the process described can and should ideally be automatic. Once A has its local Demos wallet with its Solana identity loaded (so without sharing the private key with the blockchain but keeping it locally), the wallet is perfectly able to execute the transaction autonomously after a quick confirmation by the user. This allows for a seamless and easy cross-context system to be applied and executed without hassle.Example Schema
