subgraphs icon indicating copy to clipboard operation
subgraphs copied to clipboard

inputTokenWeights empty fields and inconsistent format across protocols

Open liambeckman199 opened this issue 3 years ago • 2 comments

I've noticed a slight discrepancy or potential error in the "inputTokenWeights" field. For example, there are some weight fields that are empty for balancer pools even though there are input token balances. Furthermore in balancer and in saddle, weights are reported in percentage form, as oppose to rates as seen in Sushi. Weights appears to be calculated from inputTokenBalances in Saddle, while Balancer is reporting the theoretical weights of the pool.

I've provided some examples bellow:

Sushi weights (mainnet): ["0.5","0.5"] Balancer weights(mainnet):[ "80","20"] Saddle weights(mainnet):["27.29955106079420443298166771565174", "30.15282136805188858779794342035846", "42.54762757115390697922038886398979"]

liambeckman199 avatar Aug 02 '22 14:08 liambeckman199

@steegecs @this-username-is-taken have you had a chance to look at this issue?

liambeckman199 avatar Aug 10 '22 20:08 liambeckman199

@steegecs @this-username-is-taken have you had a chance to look at this issue?

Yes! This should be fixed now on all Uniswap V2 and Sushiswap forks. I just put in a PR for this fix on Uniswap V3. PR: #778

steegecs avatar Aug 11 '22 21:08 steegecs