Uniswap Forks - Pricing and RewardEmissionsUSD issues.
Context Due to the way our price oracle works in the uniswap forks, there are protocol and network deployments that have tokens price at 0 USD, when they should have a price. This is because the pools in the deployed subgraph tend to have a very low liquidity. This impacts our metrics in multiple ways:
- The lastPriceUSD metric on the Token entities
- TotalValueLocked, Volume, and revenues in USD on multiple entities.
- RewardEmissionsUSD.
We can still be quite accurate on the macro metrics like in the Protocol and FinancialsDailySnapshots entities. However, sometimes this leads to our RewardEmissions from masterChef contracts to be coming in as a 0 value, because the reward token does not have any pools with enough liquidity to get a pricing. Instances where this is the case are Sushiswap Moonbeam, Moonriver, and Fuse.
Solution There are multiple ways to handle this.
- Use the current pricing system, but lower the minimum liquidity at the risk of getting outlier pricing values for other pools. Even so, this may not always work since sometimes there is hardly any liquidity for reward tokens.
- Make large improvements to the pricing mechanism overall that includes information from outside of the protocol to get better pricing for all tokens.
The latter solution is ideal, but it will probably have to wait until we build a price oracle using substreams - unless we come up with a better solution in the meantime.
This can fixed relatively easily in substreams as we can use pricing data from chains with higher liquidity. Would prefer to not fix it as it only impacts certain sidechains with low liquidity.
ACTION: Fix this if DEX rewards are shown on PM. Blocker being the indexing time, currently.