Avato Wallet Dual Graph Architecture

bohemianbohemian
4 min read

Overview

Avato Wallet adopts a dual-layer graph structure designed to serve two distinct purposes:

  • Local Private State Graph (Local Stash Graph): Built on Neo4j Community Edition, this resides entirely on the user's device, enabling private visualization, verification, and tracing of RGB contract states and asset structures.

  • Opt-In Supergraph Plugin (Public Annotated Graph): Built on Dgraph and deployed on Avato Cloud, this system stores user-authorized annotations and trust metadata, used to enhance ecosystem visualization, compliance assistance, and social signal propagation.

This architecture prioritizes privacy and user sovereignty. The Supergraph plugin operates strictly on an opt-in basis—no data is uploaded or queried without explicit user consent.


I. Local Private Graph (Neo4j)

🎯 Objectives

To provide users with a secure, offline, and self-sovereign visualization of their RGB stash and contract state history, supporting:

  • Transition path tracing

  • Smart contract execution graphing

  • UTXO and seal state queries

  • Local governance history and asset state evolution

🧱 Technical Implementation

  • Engine: Neo4j 5.x Community Edition

  • Deployment: Launched as an embedded or subprocess during wallet runtime

  • Data Model:

(:Contract {schema_id, issuer, timestamp})  
(:Transition {txid, block_height, index})  
(:Seal {utxo_ref, status})  
(:Consignment {id, hash})  
(:Anchor {block_hash, height})  

(Contract)-[:INITIATES]->(Transition)  
(Transition)-[:USES]->(Seal)  
(Transition)-[:OUTPUTS]->(Seal)  
(Consignment)-[:INCLUDES]->(Transition)  
(Transition)-[:ANCHORED_IN]->(Anchor)

🛡 Security & Isolation

  • All graph data is stored locally (e.g., ~/.avato/stash.db)

  • No network connectivity by design

  • Exportable as read-only snapshots (.graphml or .cypher)

  • Integrates with zk-ticket module for anonymized state projections


II. Supergraph Plugin (Dgraph)

🎯 Objectives

To construct a user-consensual, ecosystem-wide trust+governance+compliance annotation graph, embedded in the wallet as an Avato Cloud plugin.

Key use cases:

  • Trust and reputation propagation between DIDs

  • Ecosystem labeling of contract schemas (e.g., “Recommended”, “Audited”, “High-risk Stablecoin”)

  • Visualization of anonymized governance participation paths

  • Public display of user-issued SBTs, tags, and scores

🧱 Technical Implementation

  • Engine: Dgraph distributed graph database (horizontally scalable)

  • Deployment: Accessed via wallet plugin REST interface or embedded WebView

Sample Schema:

type DID {
  uid: ID!
  did: string! @index(hash)
  trust_score: float
}

type Contract {
  uid: ID!
  schema_id: string! @index(hash)
  creator: DID
  tags: [Tag]
}

type Tag {
  uid: ID!
  label: string! @index(term)
  issuer: DID
  weight: float
  timestamp: datetime
}

🔐 Authorization Mechanism

  • All Supergraph uploads require explicit user authorization:

    • ❗️Upload is disabled by default

    • Users can opt in via UI to share:

      • Governance votes and proposal summaries

      • Created schema IDs and intended usage

      • Tags/labels manually added to contracts (e.g., "Recommended", "Risky")

  • All shared content is locally signed by the wallet prior to off-chain upload

🚦 Permission Matrix

Use CaseDefault BehaviorNotes
Aggregate tag queries✅ AllowedNon-traceable, used for frontend display
Display of user-created schema tags⚠️ Requires opt-inShows "Created by X"
SBT issuance and governance history⚠️ Aggregated uploads allowedIdentities anonymized
Reputation scoring & network graphing❌ Disabled by defaultRequires explicit opt-in to join the reputation network

III. Architecture Diagram

+---------------------------+                 +------------------------------+
|        Avato Wallet       |                 |       Avato Supergraph       |
|   (Local Neo4j Engine)    |                 |    (Dgraph Cloud Cluster)     |
+---------------------------+                 +------------------------------+
|  stash.db (Neo4j local)   |                 |  schema_id, tag, issuer DID  |
|  RGB contract graph       |                 |  tag graph, reputation edges |
|  transition chain         |   <authorize>   |  contract governance mapping |
|  seal usage chain         | --------------> |  public label propagation    |
+---------------------------+                 +------------------------------+
        ↑                                ↑
        |                                |
Local Queries                    Authorized Uploads / Queries

IV. Future Extensions (Planned)

  • Generate "Trust Recommendations" based on interactions with the Supergraph (e.g., suggested contracts or platforms)

  • Support ZK Tags: encrypted user-submitted labels, verifiable by Dgraph but not visible in plaintext

  • Enable cross-importing of external trust graphs (e.g., from DIDComm, Lens, Farcaster)


✅ Summary

Avato Wallet's graph system follows a “Private Local + Authorized Public” dual design:

  • The Local Graph gives users full visibility and sovereignty over their RGB smart contract state history and validation, privately stored and processed on-device.

  • The Supergraph provides an opt-in infrastructure for ecosystem-wide trust signaling, governance traceability, and open annotation—all under strict user consent.

This structure ensures privacy by default while building a public data layer to support long-term ecosystem transparency, auditability, and social coordination.

0
Subscribe to my newsletter

Read articles from bohemian directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

bohemian
bohemian