DIVA Protocol
  • 👋Welcome
  • 🔅Introduction
    • Derivative contracts
    • What is DIVA Protocol
      • What problem does it solve
      • How it works
        • Reference assets
        • Payoff curves
        • Collateral
        • Oracles
        • Settlement
          • Timelines
          • Challenge
          • Status
          • Fast settlement
          • Fallback data provider
        • Fees
        • Compliance feature
      • Vision
      • Terminology
    • What is DIVA Token
      • Owner election mechanism
      • Token distribution
    • DIVA Development Fund
    • FAQ
  • 🌈DIVA App
    • What is DIVA App
    • Overview
    • Create position tokens
    • Trade position tokens
    • Add liquidity
    • Remove liquidity
  • ⚙️Guides
    • DIVA App Training
      • Prepare
      • Testnet
      • Create
      • Trade
      • Add
      • Remove
      • Settle
      • Redeem
      • Fees
    • Quiz
  • 🪄Use cases
    • Overview
    • Insurance
      • Credit default protection
      • Agrarian insurance
      • DeFi Hack insurance
      • Peg insurance
    • Yield optimization
      • Bullish accumulation
      • Bearish accumulation
    • Risk management
      • Downside protection
      • Increasing cost protection
    • Directional bets
      • Downside bet
      • "Bottom-Is-In" bet
      • Upside bet
      • "Top-Is-In" bet
    • Leverage
  • 👨‍🎓Pricing derivatives
    • Introduction
    • Underlying value
    • Volatility
    • Time
  • ⚓Oracle integrations
    • Overview
    • Tellor
  • ⚒️For developers
    • Overview
    • Technical resources
    • Smart contracts
      • Functions
        • Core protocol functions
        • Getter functions
        • Setter functions
        • ABI
      • Contract addresses
      • Example scripts
    • TheGraph
      • DIVA subgraphs
      • Whitelist subgraph
    • Project ideas
  • 📱Contact & Media Links
    • Social media
  • 👨‍🎓Technical Blog
    • Flash loans in DIVA Protocol
    • NDVI outcome reporting guide for Tellor Reporters
    • Enabling capital efficiency in DeFi
Powered by GitBook
On this page
  • Data providers
  • Data feeds
  • Collateral tokens
  1. For developers
  2. TheGraph

Whitelist subgraph

PreviousDIVA subgraphsNextProject ideas

Last updated 2 years ago

The whitelist stores trusted data providers, their individual data feeds and the collateral tokens that have to be used in order to be eligible for the oracle services:

The whitelist subgraph can be accessed here:

  • Ropsten (deprecated):

  • Goerli:

Data providers

Data providers can be and their offered data feeds can be queried as follows (here querying the first two data providers in the whitelist):

{
  dataProviders(first: 2) {
    id
    name
    publicTrigger
    dataFeeds {
      id
      referenceAsset
      referenceAssetUnified
      active
    }
  }
}

Sample output of above query:

{
  "data": {
    "dataProviders": [
      {
        "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78",
        "name": "Individual 1",
        "publicTrigger": false,
        "dataFeeds": [
          {
            "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78-0",
            "referenceAsset": "DIVA/USD",
            "referenceAssetUnified": "DIVA/USD",
            "active": true
          },
          {
            "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78-1",
            "referenceAsset": "BTC/USD",
            "referenceAssetUnified": "BTC/USD",
            "active": true
          }
        ]
      },
      {
        "id": "0xed6d661645a11c45f4b82274db677867a7d32675",
        "name": "Tellor",
        "publicTrigger": true,
        "dataFeeds": [
          {
            "id": "0xed6d661645a11c45f4b82274db677867a7d32675-0",
            "referenceAsset": "ETH/USD",
            "referenceAssetUnified": "ETH/USD",
            "active": true
          },
          {
            "id": "0xed6d661645a11c45f4b82274db677867a7d32675-1",
            "referenceAsset": "BTC/USD",
            "referenceAssetUnified": "BTC/USD",
            "active": true
          }
        ]
      }
    ]
  }
}

Data feeds

The following query shows all data providers that can provide a given data feed (here ETH/USD):

{
  dataFeeds(where:{referenceAssetUnified:"ETH/USD", active:true}) {
    id
    referenceAsset
    referenceAssetUnified
    dataProvider {
      id
      name
      publicTrigger
    }
    active
  }
}

Sample output of above query:

{
  "data": {
    "dataFeeds": [
      {
        "id": "0xed6d661645a11c45f4b82274db677867a7d32675-0",
        "referenceAsset": "ETH/USD",
        "referenceAssetUnified": "ETH/USD",
        "dataProvider": {
          "id": "0xed6d661645a11c45f4b82274db677867a7d32675",
          "name": "Tellor",
          "publicTrigger": true
        },
        "active": true
      }
    ]
  }
}

Collateral tokens

The following query returns all collateral tokens that are supported by whitelisted data providers:

{
  collateralTokens(first:2){
    id
    name
    symbol
    decimals
  }
}

Sample output of above query:

{
  "data": {
    "collateralTokens": [
      {
        "id": "0x384a78a65189c696a009681b20880cd9af01bc16",
        "name": "WAGMI20",
        "symbol": "WAGMI20",
        "decimals": 20
      },
      {
        "id": "0x867e53fede91d27101e062bf7002143ebaea3e30",
        "name": "WAGMI18",
        "symbol": "WAGMI18",
        "decimals": 18
      }
    ]
  }
}
⚒️
https://thegraph.com/hosted-service/subgraph/divaprotocol/diva-whitelist-ropsten
https://thegraph.com/hosted-service/subgraph/divaprotocol/diva-whitelist-goerli