-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: giving collateral should not change totalDebt (#9873)
closes: #XXXX refs: #XXXX ## Description Updating `totalDebt` for 1 `vault` was doing `totalDebt += vault.getCurrentDebt() - old` where current debt includes compounded interest but old did not. ### Security Considerations This (in combination with another PR to reset totalDebt to the sum over all vaults) should address a confusion risk for metrics clients. ### Scaling Considerations The separate work to reset totalDebt to the sum over all vaults may have some, but I don't see any here. ### Testing Considerations A straightforward unit test is included. ### Upgrade Considerations This change takes effect with the next upgrade to the `vaultFactory`. ### Documentation Considerations As part of the governance decision to upgrade `vaultFactory`, metrics consumers should be notified of this fix.
- Loading branch information
Showing
7 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+227 Bytes
(110%)
packages/inter-protocol/test/vaultFactory/snapshots/vaultFactory.test.js.snap
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters