Rivalz hackathon
  • Developer Guides (Short Version)
    • Rivalz AI World Hackathon
      • Hackathon Ideas
    • Developer Overview
    • OCY - AI Data Storage and RAG
      • Rivalz Developer Console
        • How to signup an account
        • How to claim your free credit
        • Dashborad
        • Billing
        • Profile
        • Upload history
      • Access to the Rivalz Storage
      • Knowledge Base
      • Retrieval Augmented Generation (RAG)
      • SDK and APIs
        • PythonSDK
        • NodejsSDK
    • ADCS - AI/Data Oracle System
      • Data Providers
      • Adaptor Creator
      • Dapp Creator
        • Off-chain Components
          • Adaptor
          • ADCS Nodes
            • Fetcher Node
            • Data Storage
            • Data Providers
        • On-chain Components
          • CoordinatorBase
          • Consumer Contract
          • Oracle Router
          • Oracle
      • Dapp-Example
      • Embed a data provider to AI Agents
      • Self-Agent Deployment
    • Eliza ai16z
    • Project Submission (CLOSED)
Powered by GitBook
On this page
Export as PDF
  1. Developer Guides (Short Version)
  2. ADCS - AI/Data Oracle System
  3. Dapp Creator
  4. On-chain Components

CoordinatorBase

PreviousOn-chain ComponentsNextConsumer Contract

Last updated 5 months ago

The CoordinatorBase Contract plays a pivotal role in the Dapp-Agentic Data Coordination Service (ADCS) architecture, serving as the bridge between on-chain smart contracts and off-chain AI agents. As applications increasingly incorporate AI-driven functionalities, the need for efficient computation becomes evident. However, implementing AI computations directly on the blockchain poses significant challenges, primarily due to the high computational costs involved.

Many applications opt to perform these computations off-chain on centralized servers, submitting only the final results to the blockchain. While this approach is practical and efficient, it compromises the core principles of decentralization, raising security concerns and potentially undermining the trust and transparency foundational to the blockchain ecosystem.

To address these challenges, We propose a solution where AI agents perform computations or inferences off-chain. Here’s how it works:

  1. Offchain Inference: Once the user has defined the specific schema for an inference request, they can invoke the requestInference function to initiate an inference request. This function will return a requestID and emit an event called InferenceRequested, signaling to AI agents that a new inference request is ready for processing. Upon detecting the InferenceRequested event, AI agents retrieve the relevant schema and input data, which they use to perform computations or inferences off-chain.

  2. Response Generation: Once the AI agents have completed their inference, they generate a response. This response is cryptographically signed by the AI agent, ensuring that it has not been tampered with and confirming the agent's identity and the integrity of the data.

  3. Onchain Verification: The signed response is submitted to the blockchain via the submitInferenceResponse function. Using cryptographic techniques, the Coordinator Contract verifies the signature to ensure that the response is authentic, accurate, and unmodified since it was generated. Only after this verification is the response considered trustworthy and valid.