subgraphs icon indicating copy to clipboard operation
subgraphs copied to clipboard

dForce QA all chains

Open ishraq8 opened this issue 2 years ago • 3 comments

I'll do a QA on all chains that have a dForce subgraph and pass on to @dmelotik & @tnkrxyz when complete.

Use this issue for QA reports, updates and discussion/improvements to the subgraph.

ishraq8 avatar Oct 04 '22 00:10 ishraq8

Here are some related threads: https://github.com/messari/subgraphs/issues/1106 https://github.com/messari/subgraphs/issues/868

Note that dForce is pretty difficult as most sources have issues. Would good to sync up with @tnkrxyz on this.

this-username-is-taken avatar Oct 04 '22 14:10 this-username-is-taken

I am working on the QA for all chains, but did want to raise the issue of the CDP/synth market they have. I personally think it may need it's own subgraph as this component functions more like Synthetix (not entirely) than a traditional CDP (maker). The purpose of dForce's CDP (USX & EUX) seems primarily in their synthetics market and not as a stablecoin (dai, LUSD ect). Feel free to share thoughts. I don't think we have a subgraph for synthetix.

Screen Shot 2022-10-05 at 10 55 08 PM

ishraq8 avatar Oct 06 '22 03:10 ishraq8

Gotcha, @nemani is working on a subgraph for Synthetix. Should probably discuss how to handle synthetic tokens in the general case then. Maybe we can bring this to Discord?

this-username-is-taken avatar Oct 06 '22 03:10 this-username-is-taken

@tnkrxyz Finally got a chance to go through all of subgraphs. Overall our schemas are good there are only two issues:

  1. TVL and pool level TVL is off for BSC (almost double) and Ethereum (about 5% higher on the front end). Both of these schemas are older version and the newer versions on 1.1.4 and dont have this issue. Alternatively it could be a pricing issue, but i doubt it, because it is all the pools
  2. Rewards are off on all the pools and minting is showing zero on all subgraphs. See if you can fix it. It is not a high priority for Protocol Metrics, but it would be nice to have accurate rewards.
  3. I have excluded the synthetic market data for this. Likely we will need an independent subgraph for that similar to synthetix (that will be similar to the CDP schema).
  4. Avalanche has not been deployed and should not be ingested.

notes: publicly available data for this is kind of a mess. Token terminal is wrong across the board and Defillama amalgamates the synthetics market and lending platform. Front end and on chain data generally conform with our subgraph.

Let me know if you have questions or concerns. I think if these issues are addressed we can finally ingest dforce!

ishraq8 avatar Nov 01 '22 02:11 ishraq8

@ishraq8 , I just realized that there is a discrepancy in the deployed version (1.1.4) & the current code version (1.2.2). And the ethereum and bsc deployment failed at ~95%. Would you mind verifying when the new deployment is done? Also, it seems I don't have access to the google sheets listed above ([email protected]).

tnkrxyz avatar Nov 01 '22 04:11 tnkrxyz

@tnkrxyz Looks like the (1.2.2) resolved all issues on Ethereum, BSC, and Arbitrum! Looks great, thank you for resolving this. I do see there is still a discrepancy in rewards for Optimism and Polygon. Do you think it might be pricing oracle on those networks or something?

I shared the files as well, though most of the issues raised were resolved with 1.2.2.

ishraq8 avatar Nov 01 '22 13:11 ishraq8

@ishraq8 , were you not able to see these reward emission data/charts? they load all right for me - you indicate there was "Reward Token output error on subgraph (Code Error)" in the speadsheet. The example below are for USDC on polygon:

https://subgraphs.messari.io/subgraph?endpoint=messari%2Fdforce-polygon&tab=pool&poolId=0x5268b3c4afb0860d365a093c184985fcfcb65234&view=marketDailySnapshots-rewardTokenEmissionsAmount%2520%5B0%5D

image image

tnkrxyz avatar Nov 01 '22 23:11 tnkrxyz

@ishraq8 , were you not able to see these reward emission data/charts? they load all right for me - you indicate there was "Reward Token output error on subgraph (Code Error)" in the speadsheet. The example below are for USDC on polygon:

Thanks for this, wasn't showing before but is correct now

ishraq8 avatar Nov 03 '22 15:11 ishraq8

Hey @ishraq8 the rewards were fixed for Optimism and Polygon by @tnkrxyz ! They are still slightly off from their FE 🤷, but I will let you decide what our room for error is and if it is acceptable.

Here are the deployments:

  • Optimism: https://okgraph.xyz/?q=tnkrxyz%2Fdforce-optimism
  • Polygon: https://okgraph.xyz/?q=tnkrxyz%2Fdforce-polygon

melotik avatar Nov 18 '22 01:11 melotik

@tnkrxyz @dmelotik Dforce looks great!We are finally ready for prod with this!

ishraq8 avatar Nov 18 '22 14:11 ishraq8