Onchain AI Oracle: DPrompt

Overview

DPrompt is an innovative AI inference oracle service that bridges the gap between computationally intensive AI inference tasks and blockchain’s on-chain operations. By leveraging an oracle-based design, DPrompt enables seamless integration of AI-powered functionalities within smart contracts, empowering decentralized applications (dApps) with advanced AI capabilities while maintaining the efficiency and security of blockchain operations.

An MVP demo of DPrompt is deployed at: https://revox.ai/?dprompt

Why DPrompt?

The Challenge of On-Chain AI Inference

Performing AI inference directly on-chain is impractical due to its computational intensity and resource requirements. Blockchains, by design, are optimized for consensus and decentralized verification, not heavy computation. This limitation creates a significant gap for developers who want to incorporate AI insights into their decentralized applications.

Oracles as a Solution

Oracle frameworks are widely used in blockchain ecosystems to bring off-chain data, such as real-world events and market prices, to on-chain services. This well-established model can be extended to handle AI inference, providing a trusted, efficient way to deliver AI-driven results to smart contracts.

DPrompt Design Principles

1. Decentralized Oracle Network

DPrompt operates within a decentralized oracle network, ensuring reliable delivery of AI inference results to the blockchain. This design reduces the risk of single points of failure and ensures trustless operations.

2. Off-Chain AI Inference

The heavy lifting of AI inference occurs off-chain within a secure, scalable infrastructure. These computations are performed by verified nodes, leveraging state-of-the-art AI models and hardware accelerators to deliver fast and accurate results.

3. Smart Contract Integration

DPrompt provides a seamless interface for smart contracts to request and receive AI inference results. Developers can write contracts that interact with the oracle to access AI-powered insights without leaving the blockchain environment.

4. Scalability and Cost Efficiency

By moving AI inference off-chain, DPrompt significantly reduces the computational burden on blockchain nodes, allowing for greater scalability and lower operational costs for dApps.

5. Verifiability

DPrompt ensures that all inference results are auditable and verifiable. It incorporates cryptographic proof mechanisms to guarantee the integrity and authenticity of the data delivered on-chain.

Key Components of DPrompt

AI Inference Layer

Model Repository

  • Role: A library of pre-trained and fine-tuned AI models optimized for different use cases.

  • Capabilities:

    • Availability: A general DA for models

    • Customization: Allows developers to upload custom-trained models or request model fine-tuning for specific applications.

    • Versioning: Supports version control to ensure consistency in inference results and facilitate upgrades.

Inference Engine

  • Role: Executes AI computations using high-performance hardware and algorithms.

  • Capabilities:

    • Resource Optimization: Dynamically allocates GPU, TPU, or other accelerators based on the complexity of the task.

    • Fault Tolerance: Ensures uninterrupted operation by rerouting tasks in case of node failures.

    • Latency Minimization: Optimizes response times to meet real-time application needs.

Oracle Network

Dispatcher Nodes

  • Role: The dispatcher node acts as the central coordinator for the oracle network. It collects inference requests from the blockchain and distributes them to appropriate nodes for processing.

  • Capabilities:

    • Request Management: Receives inference requests from smart contracts and validates them.

    • Task Allocation: Dispatches requests to a set of available and verified oracle nodes based on workload, specialization, or geographic proximity.

    • Result Aggregation: Collects the inference results from nodes and ensures they meet the required standards of quality and accuracy before relaying them back to the requesting smart contract.

    • Incentive Calculation: Calculates rewards for inference nodes

Inference Nodes

  • Role: Decentralized containers responsible for performing inference tasks using Infernce Engines.

  • Capabilities:

    • Inference Execution: Execute computationally heavy AI tasks using pre-trained models provided by DPrompt.

    • Result Submission: Send results back to the dispatcher node along with cryptographic proofs to ensure the authenticity and integrity of the results.

Consensus Protocol

  • Purpose: A mechanism (e.g. Proof-of-Stake) to ensure the correctness of results provided by oracle nodes.

Smart Contract Interface

The Smart Contract Interface is the primary touchpoint for developers to interact with DPrompt’s AI inference capabilities. It provides an intuitive and secure way to request and receive AI-powered insights directly within blockchain applications.

API Design

  • Purpose: Simplifies communication between smart contracts and the oracle network.

  • Features:

    • Request Submission: Smart contracts can invoke DPrompt by specifying the task type, input data, and any additional parameters required for the AI model.

    • Output Specification: Developers can define the expected format and type of the AI inference result (e.g., text, JSON, numerical values).

    • Error Handling: Built-in mechanisms to notify smart contracts of invalid requests, inference errors, or delays.Intuitive APIs that allow developers to request specific AI tasks and retrieve the results.

Event Notifications

  • Role: Provides asynchronous updates to smart contracts once inference results are ready.

  • Mechanism:

    • Event Logs: Emits blockchain events to signal the completion of a request.

    • Callback Functions: Supports user-defined callback functions for handling the returned data.

Last updated