Skip to Content
DocumentationRadixDataFeed Architecture

Radix DataFeed Architecture

The Morpher DataFeed on Radix is designed as a pull-based data feed system that provides secure, verifiable price data for blockchain applications. This page explains the overall architecture and components of the system.

System Components

Key Components

  1. Off-Chain Data Sources

    • Exchange APIs: Direct connections to cryptocurrency exchanges like Gate.io
    • Market Data Providers: Services that aggregate and normalize market data
    • Price Aggregators: Systems that combine multiple price sources for reliability
  2. DataFeed Infrastructure

    • DataFeed Backend: The core service that:
      • Collects and validates data from multiple sources
      • Processes subscription requests
      • Signs price data with the DataFeed’s private key
      • Verifies NFT ownership and public key validity
    • DataFeed Database: Stores historical price data and subscription information
  3. DApp Infrastructure

    • DApp Backend: A service operated by the DApp developer that:
      • Securely stores the DApp’s private key
      • Creates and signs requests to the DataFeed Backend
      • Forwards signed price data to the Frontend
    • Private Key Storage: Secure storage for the DApp’s private key
    • Frontend/User: The user interface and wallet connection that:
      • Initiates transactions requiring price data
      • Constructs transaction manifests with signed data
      • Submits transactions to the Radix network
  4. On-Chain Components

    • DataFeed Component: The smart contract that:
      • Verifies signatures from the DataFeed Backend
      • Validates data authenticity
      • Provides verified price data to other smart contracts
    • Smart Contract: The DApp’s on-chain logic that:
      • Calls the DataFeed Component to verify signed data
      • Validates data freshness for its specific use case
      • Uses verified price data for its business logic
      • Applies additional validation rules as needed
    • Subscription NFT: A non-fungible token that:
      • Represents a paid subscription to the DataFeed service
      • Stores the subscriber’s public key
      • Controls access to DataFeed services

Security Model

The Morpher DataFeed employs a multi-layered security approach:

  1. Data Signing: All price data is cryptographically signed by the DataFeed, ensuring data integrity and authenticity.

  2. Subscription Verification: Access to DataFeed services requires ownership of a subscription NFT, preventing unauthorized usage.

  3. On-Chain Verification: Signatures are verified on-chain before data is used in transactions, preventing manipulation.

  4. Timestamp Validation: Price data includes timestamps that are checked on-chain to ensure data freshness.

  5. Market Status Checks: The system validates that price data is consistent with the current market status (open/closed).

This architecture ensures that price data is:

  • Authentic (signed by the DataFeed)
  • Fresh (recent timestamps)
  • Authorized (linked to a valid subscription)
  • Verifiable (signature checked on-chain)

In the next section, we’ll explore the Pull DataFeed Flow in detail.