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
In #1329 , #1330 and #1331 we added new indexes. Recomputing them all the time is time consuming. Instead we should store them as as an index value on chain.
Essentially, we should start by creating an index for:
GetAllTotalCollateral
...
and then see what else we can index.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
robert-zaremba
changed the title
Create an index for MaxCollateralShare and other global indexes
Create an index for _total_ values and other global indexes
Sep 6, 2022
GetAllTotalCollateral is retrieving the amount of denom from leverage module account balance.
the module account balance will update the real time , how we can go create index for specific denom with module account
Most of these are already calculated fairly efficiently - and introducing an index or a cache would invite potential edge cases due to rounding and more complex bugs / failure states if they were to ever fall out of sync with the real time value.
Unless we are starting with a specific proposal to improve one of them, we can probably close the issue.
Summary
In #1329 , #1330 and #1331 we added new indexes. Recomputing them all the time is time consuming. Instead we should store them as as an index value on chain.
Essentially, we should start by creating an index for:
GetAllTotalCollateral
and then see what else we can index.
For Admin Use
The text was updated successfully, but these errors were encountered: