Sum Balances
Functions for adding up the balances or their USD conversions.
Last updated
Functions for adding up the balances or their USD conversions.
Last updated
It calculates the USD prices of given tokens and can then converts the balances of given tokens into USD and returns their total sum.
Works similarly to sumBalanceUSD, and can be used when you have to convert a single token balance into USD.
Used for adding balances of tokens one by one in TVL calculation.
Adding up multiple token balances returned from the abi.erc20MultiBalanceOf
method in TVL calculation.