You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ERC20.balance_usd value is defined using Covalent portfolio_v2 's data (["holdings"][0]["close"]["quote"]), whereas our Balances objects calculate the USD balance themselves based on the token balance and the token USD quote for each day (which lives in Prices objects).
This introduces a discrepancy between how Treasury.usd_total is calculated (using ERC20.balance_usd) and what the UI graph plot shows (which is based on the Balances objects).
Let's keep a single source of truth, and thus remove the ERC20.balance_usd values.
This should probably be bundled together in a refactoring which merges Balances objects inside the Treasury object.
The text was updated successfully, but these errors were encountered:
lajarre
changed the title
Remove dependence on Covalent portfolio_v2's USD balance
Total value incoherent with graph (rm Covalent portfolio_v2 USD balance)
Jul 28, 2022
The
ERC20.balance_usd
value is defined using Covalent portfolio_v2 's data (["holdings"][0]["close"]["quote"]
), whereas ourBalances
objects calculate the USD balance themselves based on the token balance and the token USD quote for each day (which lives inPrices
objects).This introduces a discrepancy between how
Treasury.usd_total
is calculated (usingERC20.balance_usd
) and what the UI graph plot shows (which is based on theBalances
objects).Let's keep a single source of truth, and thus remove the
ERC20.balance_usd
values.This should probably be bundled together in a refactoring which merges
Balances
objects inside theTreasury
object.The text was updated successfully, but these errors were encountered: