Ribbon Finance
  • Introduction to Ribbon Finance
  • Aevo
  • FAQ
    • General
    • DOV Deposits
    • DOV Withdrawals
    • DOV Trading and options
    • Ribbonomics
  • Dune dashboards
  • Contribute
  • Security
  • Ribbon Theta Vaults
    • Introduction to Theta Vaults
      • Strike Selection and Expiry
      • Options Architecture
      • Options Settlement
      • Auctions
      • Risk profile
      • Fees
    • Theta vaults architecture
    • User guides
      • How to deposit
      • How to withdraw
      • How to pause and resume
      • How to stake, unstake vault shares and claim rewards
      • How to transfer vault positions
      • How to participate in Paradigm Auctions
      • How to redeem oTokens
  • RIBBON EARN
    • Introduction to Ribbon Earn
    • Ribbon Earn USDC
      • Risk-Free Rate
      • Twin win strategy
      • Vault specifications
      • Eligibility
      • Fees
    • Ribbon Earn stETH
      • What is a dolphin strategy?
      • Vault specifications
      • Risk profile
      • Fees
  • RIBBON LEND
    • Introduction to Ribbon Lend
      • Yields from unsecured lending
      • No lockups
        • Pool status
        • Default
      • Off-chain enforcement / credit underwriting
      • Built-in insurance
      • Fees
  • ribbon treasury
    • Introduction to Ribbon Treasury
      • Why Ribbon Treasury?
      • Partners
      • How to get involved
  • Ribbonomics
    • Overview and RBN tokenomics
      • Vote-Escrowed RBN
      • Fee Collection and Distribution
      • Liquidity Gauges and RBN Emissions
      • Gauge Weight Voting
      • Bribes
        • Guide to Boost Bribing
          • For Bribers
          • For veRBN Holders
      • Upgrades
    • How to lock RBN, boost and claim protocol revenues
  • Developers
    • Deployed Contracts
    • Ribbon Subgraph
Powered by GitBook
On this page
  • Querying Vaults
  • Querying Vault APY
  • Querying Vault Fees

Was this helpful?

  1. Developers

Ribbon Subgraph

Ribbon's subgraph is hosted on The Graph. If you need any additional data, feel free to raise an issue at the ribbon-subgraph repo, or contribute a change.

We have two subgraphs hosted on the legacy Graph explorer:

  1. Ribbon v2 Subgraph

  2. Ribbon v1 Subgraph

Querying Vaults

This query returns the first 5 vaults and vital statistics about the vault.

{
  vaults(first: 5) {
    id
    totalPremiumEarned
    underlyingAsset
    underlyingSymbol
  }
}

Querying Vault APY

This query returns a chronological list of pricePerShare values for the vault. pricePerShare represents how much a vault share is worth in the collateral asset. For example, for the ETH Theta Vault, if the value of pricePerShare is more than 1*10**18, the vault is profitable.

{
  vaultPerformanceUpdates(
    where:{vault:"0x25751853eab4d0eb3652b5eb6ecb102a2789644b"},
    orderBy:timestamp, orderDirection:asc) {
    id
    pricePerShare
    timestamp
  }
}

Querying Vault Fees

This query returns fee information for the vaults.

{
  vaults(first: 5) {
    id
    totalFeeCollected
    managementFeeCollected
    performanceFeeCollected
    underlyingAsset
    underlyingSymbol
  }
}
PreviousDeployed Contracts

Last updated 3 years ago

Was this helpful?