Skip to content

RE: Adding DIA docs to boba docs. #356

@GianBobarino

Description

@GianBobarino

Feature request to add dia docs to Boba Docs.
https://www.diadata.org/docs/guides/chain-specific-guide/boba-network

Documentation Index

Fetch the complete documentation index at: https://www.diadata.org/docs/llms.txt
Use this file to discover all available pages before exploring further.

Boba Network

dApps built on Boba Network can leverage DIA oracles to access up-to-date asset price information.

DIA is a cross-chain, trustless oracle network delivering verifiable price feeds for Boba Network. DIA sources raw trade data directly from primary markets and computes it onchain, ensuring transparency and data integrity.

Key Features

  • Complete verifiability from source to destination smart contract.
  • Direct data sourcing from 100+ primary markets eliminating intermediary risk.
  • Support for 20,000+ assets across all major asset classes.
  • Custom oracle configuration with tailored sources and methodologies.

Oracle Contracts

Chain Address
Boba ETH Mainnet 0xB3519a1760F3A16934a890F19E67A98cBF1e0859
Boba ETH Sepolia 0x907e7f6bd9653e4188da89e4f2d3ea949dcec076

Oracle Configuration

Parameter Value
Pricing Methodology VWAPIR
Deviation (%) & Refresh Frequency Mainnet: 0.2% and 60 seconds, Testnet: 0.2% and 15 seconds
Heartbeat 1h

Available Asset Feeds

Asset Ticker AssetQuery Key Asset Markets
BTC BTC/USD BTC Markets
ETH ETH/USD ETH Markets
USDC USDC/USD USDC Markets
USDT USDT/USD USDT Markets
DAI DAI/USD DAI Markets
BOBA BOBA/USD BOBA Markets

How to Access Data

getValue Method

Call the getValue() function on the oracle contract with the Query Symbol (e.g., "BTC/USD"). The function returns the asset price with 8 decimal precision and the timestamp of the last update.

Solidity Example

pragma solidity ^0.8.13;

interface IDIAOracleV2 {
    function getValue(string memory) external view returns (uint128, uint128);
}

contract DIAOracleV2Consumer {
    // E.g. Boba Sepolia Oracle Address: 0x907e7f6bd9653e4188da89e4f2d3ea949dcec076
    address immutable ORACLE = 0x907e7f6bd9653e4188da89e4f2d3ea949dcec076;

    function getPrice(string memory key)
    external
    view
    returns (
        uint128 latestPrice,
        uint128 timestampOfLatestPrice
    ) {
        (latestPrice, timestampOfLatestPrice) =
                 IDIAOracleV2(ORACLE).getValue(key);
    }
}

Request a Custom Oracle

DIA offers highly customizable oracles that are individually tailored to each dApp's needs. Each oracle can be customized in the following ways, including:

  • Data Sources & Asset Feeds
  • Pricing Methodologies
  • Update Triggers (Frequency, Deviation, Heartbeat, ...etc)

Get a tailored oracle for your dApp, request one below:

Support

For developer assistance, connect with the DIA team directly on Discord or Telegram.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions