Labyrinth
WhitepaperResearchGet Private Access
  • 🔭Labyrinth Overview
    • Introduction
    • Why Labyrinth?
    • Who can use Labyrinth?
    • Reward and Fee in Labyrinth
    • Compliance
  • ⭐Use Labyrinth web App
    • How to use the Labyrinth app?
  • 📦Labyrinth SDK
    • ❓What is Labyrinth SDK?
    • ⚒️Quickstart
      • Setup Environment
      • Initialization
      • Private Transactions
      • Balance And Transaction History
      • Protocol Integration
    • 1️⃣Getting Started
    • 🔐Shielded Account
    • 📈Transaction
    • ▶️Initializing SDK
    • 💰Balances And History
    • 📤Sending Transaction
    • 🔌Integrating with DeFi Protocols
    • Labyrinth fee structure
  • Compliance Solution
    • Overview of Compliance
    • How Compliance Works
  • 💻CLI
    • ▶️Running SeDe CLI
  • Technical Implementation
    • Cryptographic Primitives
    • Shielded Account
    • Shielded Address
    • Account Abstraction
    • 🔵Core Architecture
      • 💵Note
      • 🌲Merkle Tree
      • 🔀JoinSplits
      • 🛡️Shielded Transaction
    • 🔄Protocol Interoperability
  • Resource and support
    • Roadmap
    • FAQs
    • Whitepaper
    • Selective De-Anonymization Compliance Paper
  • Contact and socials
    • Labyrinth Website
    • Twitter
    • Discord
    • Contact Us
Powered by GitBook
On this page
  1. Technical Implementation
  2. Core Architecture

Note

PreviousCore ArchitectureNextMerkle Tree

Last updated 9 months ago

A note represents some value of a particular asset attached to an owner's address (related to a shielded account) who has the authority to spend it. A user can zero or more notes in their shielded account. The asset balance of a shielded account is simply the sum of the values of all notes of that asset.

In our protocol, a Note is a tuple of multiple items:

  • assetId: Identifier for the asset (ETH, WBTC, MATIC, etc.) this note represents the value of.

  • value: Value or amount the note represents.

  • leafIndex: The leaf index of the commitment merkle tree where this note will be inserted.

  • blinding: A random blinding factor.

  • rootAddress: The root address of a user having the authority to spend it.

  • revoker: The chosen revoker's public key point.


 return new Note({
      assetId,
      value,
      leafIndex,
      blinding,
      rootAddress: account.rootAddress,
      revoker: tx.revoker,
    });

All the notes to ever exist have their commitments stored in a data structure called . This is essential for bookkeeping as will be clear in the next sections.

The so-called commitment of a note is defined Poseidon hash of:

commitment = H(assetId, owner, value)

owner = H(rootAddress, revoker.x, revoker.y, blinding)

where owner is the generated using the blinding of the note:

🔵
💵
Merkle tree
blinded address