Skip to content

WIP: Added support for USD based price oracle#10

Merged
davekay100 merged 1 commit into
graphprotocol:masterfrom
protofire:price-oracle-fix
Aug 24, 2020
Merged

WIP: Added support for USD based price oracle#10
davekay100 merged 1 commit into
graphprotocol:masterfrom
protofire:price-oracle-fix

Conversation

@juanmardefago
Copy link
Copy Markdown

This changes should fix the PriceOracle breaking changes introduced in block 10678764, adding USD based underlying price calculations. Currently indexing on a dev subgraph to test this.

@davekay100
Copy link
Copy Markdown

Let me know when the syncing is done so we can see it working!

@juanmardefago
Copy link
Copy Markdown
Author

Let me know when the syncing is done so we can see it working!

Currently at 86.8%, unfortunately this subgraph is quite slow to index :(

@juanmardefago
Copy link
Copy Markdown
Author

Currently at 92,7%.
https://thegraph.com/explorer/subgraph/juanmardefago/compound-v2?version=pending

Most likely will be fully indexed within the weekend

@juanmardefago
Copy link
Copy Markdown
Author

@davekaj Fully indexed now, underlying price in ETH seems to be working ok now ;)

   "markets": [
      {
        "id": "0x158079ee67fce2f58472a96584a73c7ab9ac95c1",
        "name": "Compound Augur",
        "underlyingName": "Reputation",
        "underlyingPrice": "0.062561456989953534",
        "underlyingPriceUSD": "24.495"
      },
      {
        "id": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
        "name": "Compound USD Coin",
        "underlyingName": "USD//C",
        "underlyingPrice": "0.00245",
        "underlyingPriceUSD": "1"
      },
      {
        "id": "0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",
        "name": "Compound Ether",
        "underlyingName": "Ether",
        "underlyingPrice": "1",
        "underlyingPriceUSD": "408.055"
      },
      {
        "id": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "name": "Compound Dai",
        "underlyingName": "Dai Stablecoin",
        "underlyingPrice": "0.002475124676820526",
        "underlyingPriceUSD": "1.009987"
      },
      {
        "id": "0x6c8c6b02e7b2be14d4fa6022dfd6d75921d90e4e",
        "name": "Compound Basic Attention Token",
        "underlyingName": "Basic Attention Token",
        "underlyingPrice": "0.000991979022435701",
        "underlyingPriceUSD": "0.404782"
      },
      {
        "id": "0xb3319f5d18bc0d84dd1b4825dcde5d5f7266d407",
        "name": "Compound 0x",
        "underlyingName": "0x Protocol Token",
        "underlyingPrice": "0.00183288772346865",
        "underlyingPriceUSD": "0.747919"
      },
      {
        "id": "0xc11b1268c1a384e55c48c2391d8d480264a3a7f4",
        "name": "Compound Wrapped BTC",
        "underlyingName": "Wrapped BTC",
        "underlyingPrice": "28.76412493",
        "underlyingPriceUSD": "11737.345"
      },
      {
        "id": "0xf5dce57282a584d2746faf1593d3121fcac444dc",
        "name": "Compound Dai",
        "underlyingName": "Dai Stablecoin v1.0 (DAI)",
        "underlyingPrice": "0.005284998345811226",
        "underlyingPriceUSD": "2.15657"
      },
      {
        "id": "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9",
        "name": "Compound USDT",
        "underlyingName": "Tether USD",
        "underlyingPrice": "0.00245",
        "underlyingPriceUSD": "1"
      }
    ]
  }

@juanmardefago
Copy link
Copy Markdown
Author

Also quick heads up @davekaj, last PR we merged required a restart of the wrapper service for the compound v2 subgraph, otherwise the subgraph wouldn't get properly updated (specially the schema). In this case we didn't modify the schema, but it still would probably be better if the wrapper gets restarted anyways

@davekay100
Copy link
Copy Markdown

Ah good point, i will look into this before me merge it

@davekay100
Copy link
Copy Markdown

Yep we will do the restart

@davekay100 davekay100 merged commit 81a9c99 into graphprotocol:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants