Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

x/leverage: switch ModuleBalance function to use SpendableCoins ( RV #25 ) #896

Closed
toteki opened this issue May 12, 2022 · 0 comments · Fixed by #959
Closed

x/leverage: switch ModuleBalance function to use SpendableCoins ( RV #25 ) #896

toteki opened this issue May 12, 2022 · 0 comments · Fixed by #959

Comments

@toteki
Copy link
Member

toteki commented May 12, 2022

Runtime Verification Audit Item 25

Current module balance is calculated by k.bankKeeper.GetBalance(ctx, authtypes.NewModuleAddress(types.ModuleName), denom).Amount

This would be inaccurate if ModuleAccount was also a VestingAccount. This situation is probably impossible, but to be sure we can replace GetBalance with SpendableCoins.

@toteki toteki changed the title x/leverage: switch ModuleBalance function to use SpendableCoins x/leverage: switch ModuleBalance function to use SpendableCoins ( RV #25 ) May 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant