Skip to content

dhedge/dhedge-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dHEDGE Subgraph

dHEDGE is a non-custodial, decentralised asset management and trading protocol on Ethereum, enabling investors to gain exposure to actively-managed and algorithmic investment pools from a Web 3 wallet such as MetaMask. Investors can gain exposure to other pools with a demonstrated history of success, whilst remaining in possession of their assets.

This subgraph dynamically tracks any fund created by the dHEDGE factory. It tracks the current state of dHEDGE Mainnet contracts and contains stats for data such as:

  • aggregated data across pool activity
  • data on individual pools
  • data on assets traded
  • data on deposits & exchanges
  • data on transfers & withdrawals

Queries

List of Pools

{
  pools {
    id
    fundAddress
    name
    fundValue
  }
}

A Pools exchanges, deposits, withdrawals

{
  pools(where: { name: "Pool 1" }) {
    id
    fundAddress
    name
    managerName
    manager
    deposits {
      id
      investor
      valueDeposited
      fundTokensReceived
      time
    }
    exchanges {
      id
      sourceKey
      sourceAmount
      destinationKey
      destinationAmount
      time
    }
    withdrawals {
      id
      investor
      valueWithdrawn
      fundTokensWithdrawn
      time
    }
  }
}

Rates

{
  rateUpdates(orderBy: block, orderDirection: desc, where: { synth: "sETH" }) {
    block
    synth
    rate
  }
}