Skip to content

Identity Oracle

Serving as a decentralized intermediary, the Identity Oracle bridges blockchain smart contracts with off-chain identity and credential data. Utilizing zero-knowledge proofs (ZKP), it ensures secure, private, and trustless verification and management of digital identities, enabling seamless interaction between on-chain contracts and external identity information

Key Functions

  • Cross-Chain Data Relay: Relays verifiable presentation from Moca to destination chain supporting multi-chain decentralized applications (DApps).
  • Decentralized Validation Network: identity oracle uses a decentralized validation network (Oracle or Relayer) to transmit messages, avoiding single points of failure. It utilizes BLS (Boneh-Lynn-Shacham) aggregated signature mechanisms to ensure the security and accuracy of cross-chain messages.
  • Supports asynchronous & synchronous messages: Can handle one way or two way messaging thus supporting both asynchronous or synchrnous use cases.

How it Works

Below is the step by step messaging flow

  1. Verification Completion
    The verification contract on Moca Chain generates a verification result (e.g., Verified or Failure).
  2. Cross-Chain Message Generation
    If the verification result is successful, an event is generated in the smart contract, packaged into a message by the identity oracle, and attached with the unique identifier of the claim set.
  3. Message Transmission & Target Chain Record
    The message is aggregated with BLS signatures through the Moca verification network. Once the identity oracle collects enough signatures (>2/3), it calls the contract interface on the target chain to record the verification result.
  4. Data Feedback (Optional)
    If events on the target chain need to be synchronized to Moca Chain, the identity oracle triggers data feedback.

Technical Details

The Moca Identity Oracle consists of three main components: Listener, Vote Processor, and Transaction Assembler.

  • Listener Component: Actively monitors any cross-chain events on the blockchain and stores them in the database.
  • Vote Processor Component: Implements the following functions:
    • Fetches unprocessed cross-chain events from the database, signs them, and broadcasts votes to the Moca P2P network.
    • Collects enough valid cross-chain votes from the Moca P2P network and stores them in the database.
  • Transaction Assembler Component: Prepares transactions by aggregating votes and signatures from cross-chain events with enough consensus and submits them to the target chain.

The Moca identity oracle continuously monitors cross-chain events on EVM-compatible chains and Moca Chain, storing them in the database. Once a few blocks are confirmed and reach finality, the identity oracle signs the event with the BLS private key. This signed event (also known as a "vote") is then broadcast via Moca Chain’s P2P network. Once enough votes are collected, the identity oracle assembles a cross-chain transaction and submits it to the EVM-compatible chain or Moca Chain network.