subgraphs icon indicating copy to clipboard operation
subgraphs copied to clipboard

Gamma Strategies QA (Ethereum) Schema Version 1.2.1 Subgraph Version 1.0.0 Methodology Version 1.0.0

Open bye43 opened this issue 3 years ago • 4 comments

Description Value
Subgraph Reviewed https://subgraphs.messari.io/subgraph?endpoint=https://api.thegraph.com/subgraphs/name/messari/gamma-ethereum
Date Reviewed June 29 2022
Schema Version 1.2.1
Subgraph Version 1.0.0
Methodology Version 1.0.0
Evidence Spreadsheet https://docs.google.com/spreadsheets/d/1R7zUw68xAlzHYwjzj2Y1PuXkkFeCAiTd3FTT1guyGA0/edit?usp=sharing

Metrics To Review

Protocol Metrics

Section Metric Issue
financialsDailySnapshots totalValueLockedUSD Trend and data for most points matches up. Between 10/01/2021 - 12/14/2021 Defillama has a max TVL of 25m and the subgraph is showing 35m ... not sure if this is wrong, but big enough discrepancy to take a look

Vault Overview

Pool Metric Issue
ALL POOLS ALL METRICS No outputting anything here

Vault Metrics

Pool Section Metric Issue
xWBTC-ETH05 vaultDailySnapshots totalValueLockedUSD Values are good, but daily time series is skipping weeks at a time
xWBTC-ETH06 vaultDailySnapshots inputTokenBalance - xWBTC-ETH05 Negative values on 04/04/2022 and 03/30/2022. Rest of values look good, but daily time series is skipping weeks at a time
xWBTC-ETH07 vaultDailySnapshots outputTokenSupply - xWBTC-ETH05 Negative values on 04/04/2022 and 03/30/2022. Rest of values look good, but daily time series is skipping weeks at a time
xWBTC-ETH08 vaultDailySnapshots outputTokenPriceUSD - xWBTC-ETH05 Values are good, but daily time series is skipping weeks at a time
xWBTC-ETH09 vaultHourlySnapshots totalValueLockedUSD Values are good, but daily time series is skipping weeks at a time
xWBTC-ETH10 vaultHourlySnapshots inputTokenBalance - xWBTC-ETH05 Negative values on 04/04/2022 and 03/30/2022. Rest of values look good, but daily time series is skipping weeks at a time
xWBTC-ETH11 vaultHourlySnapshots outputTokenSupply - xWBTC-ETH05 Negative values on 04/04/2022 and 03/30/2022. Rest of values look good, but daily time series is skipping weeks at a time
xWBTC-ETH12 vaultHourlySnapshots outputTokenPriceUSD - xWBTC-ETH05 Values are good, but daily time series is skipping weeks at a time

bye43 avatar Jun 30 '22 00:06 bye43

This has been fixed here (also upgraded to 1.3.0): https://github.com/messari/subgraphs/pull/829 Also fully indexed so can be reviewed again.

this-username-is-taken avatar Aug 19 '22 02:08 this-username-is-taken

Description Value
Subgraph Reviewed https://subgraphs.messari.io/subgraph?endpoint=https://api.thegraph.com/subgraphs/name/messari/gamma-ethereum&tab=protocol
Date Reviewed August 22 2022
Schema Version 1.3.0
Subgraph Version 1.1.1
Methodology Version 1.0.0
Evidence Spreadsheet https://docs.google.com/spreadsheets/d/1oJJ5WpaST6qQuPbEE7s9m7FN3BNQCt-qeLDLMPOpM6o/edit?usp=sharing

Metrics To Review

Protocol Metrics

Section Metric Issue
financialsDailySnapshots totalValueLockedUSD The trend generally looks ok, but between 11/2021 - 1/2022 the max TVL is 25M on defiLlama and the subgraph's is 35m (roughly 50% difference in TVL)
usageMetricsDailySnapshots totalPoolCount We have 77 pools listed when the Gamma UI only has 16. I am guessing we are counting historic and low TVL pools, while the Gamma UI is filtering them out. But could use a second look.

Vault Overview Comments - The Gamma UI (https://app.gamma.xyz/dashboard) only has 16 pools in it and the largest TVL pool is 100k. I am not sure if the pools we are reporting are correct or not, but going to make a table of the larger pools (100k+ TVL) missing from the Gamma UI. It does seem that the pools that Gamma is showing, we are reporting the correct TVL for them. If these pools exist and the TVLs seem correct, then Gamma UI is most likely incorrect. Based on my quick smart contract scan, looks like these vaults exist and the TVL is correct, but good to get a second look.

Vault name Vault ID
Visor WBTC-ETH Uni v3 0x97491b65c9c8e8754b5c55ed208ff490b2ee6190
LQTY-ETH Uni .3% 0x586880065937a0b1b9541723619b75739df8ef13
rETH-THETA - ETH 0x24fe0b138d9b10a7f0502e213212ee6648926ecb
Visor ETH-THX Uni .3% 0xe065ff6a26f286ddb0e823920caaecd1fcd57ba1
GAMMA-ETH Uni .3% 0x33412fef1af035d6dba8b2f9b33b022e4c31dbb4
xH2O-USDC05 0xe1ae05518a67ebe7e1e08e3b22d905d6c05b6c0f
Visor ETH-BABL.2 Uni .3% 0x5e6c481de496554b66657dd1ca1f70c61cf11660
Visor ETH-BABL Uni .3% 0xf19f91d7889668a533f14d076adc187be781a458
xagEUR-USDC01 0x717a3276bd6f9e2f0ae447e0ffb45d0fa1c2dc57
Visor ETH-TRU Uni v3 0xc92ff322c8a18e38b46393dbcc8a7c5691586497
Visor ARCX-ETH Uni 1% 0x1b56860eaf38f27b99d2b0d8ffac86b0f1173f1a
xPSDN-ETH1 0x0ec4a47065bf52e1874d2491d4deeed3c638c75f
Visor ENS-ETH Uni .3% 0x5230371a6d5311b1d7dd30c0f5474c2ef0a24661

Vault Metrics

Vault Section Metric Issue
xWBTC-ETH05 vaultDailySnapshots inputTokenBalance - xWBTC-ETH05 Subgraph.xyz is outputting an error that there is negative values being output. Looks like from 03/30/2022 on there are slight negative values. When querying the subgraph it seems like there are larger negative values. Link to query - https://api.thegraph.com/subgraphs/name/messari/gamma-ethereum/graphql?query=%7B%0A++vaultDailySnapshot+%28id%3A+%220x35abccd8e577607275647edab08c537fa32cc65e-19081%22%29+%7B%0A++++inputTokenBalance%0A++++timestamp%0A++++vault+%7B%0A++++++name%0A++++++id%0A++++%7D%0A++%7D%0A%7D++
xWBTC-ETH06 vaultDailySnapshots outputTokenSupply - xWBTC-ETH05 Same comment as above

bye43 avatar Aug 23 '22 00:08 bye43

On the discrepancy of number of vaults, other than historic and low-TVL vaults, gamma also does treasury management for protocols. My understanding is that these are not open to the public, and only specific address can deposit/withdraw. These vaults do not appear in the UI.

Haven't looked in depth for the others issues yet - will do that and report back.

l0c4t0r avatar Aug 24 '22 10:08 l0c4t0r

On the discrepancy of number of vaults, other than historic and low-TVL vaults, gamma also does treasury management for protocols. My understanding is that these are not open to the public, and only specific address can deposit/withdraw. These vaults do not appear in the UI.

Haven't looked in depth for the others issues yet - will do that and report back.

Ahh that would make sense. Thanks!

bye43 avatar Aug 24 '22 16:08 bye43

The negative values seems to be a result of a vault that was added "late" to the registry contract, hence some deposit events were missed. Working on a fix which is syncing at l0c4t0r/laboratory2.

l0c4t0r avatar Sep 01 '22 15:09 l0c4t0r

I have found the culprit of the extra TVL. this was due to inaccurate pricing for the ARCX token. This is fixed by using the sushiswap router method exclusively for this token.

l0c4t0r avatar Sep 02 '22 08:09 l0c4t0r

@bye43 The fixes have now been merged and fully synced for review. Thanks!

l0c4t0r avatar Sep 02 '22 23:09 l0c4t0r

@bye43 The fixes have now been merged and fully synced for review. Thanks!

Just took a look and all the issues look solved to me! @l0c4t0r thanks! @this-username-is-taken this is good to be frozen and I am going to close the issue.

bye43 avatar Sep 03 '22 03:09 bye43