Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CS-BOLD-019 Informational 7.17: Upfrontfee Can Bring Troves Below Mcr #493

Open
bingen opened this issue Oct 9, 2024 · 1 comment
Open
Assignees
Labels
ChainSecurity wontfix This will not be worked on

Comments

@bingen
Copy link
Collaborator

bingen commented Oct 9, 2024

The _applyUpfrontFee function in BorrowerOperations contains the _requireICRisAboveMCR() check. This ensures that an upfrontfee from an adjustment cannot bring the trove below the MCR.

However, the setBatchManagerAnnualInterestRate function, which is used to adjust the interest rate of a batch, does not contain such a check (as troves in a batch can have different ICRs). As a result, it is possible for an upfrontfee of a batch interest adjustment to bring a trove below the MCR.

The batch interest rate can only be adjusted at most once per second, so if a trove is pushed below the MCR, it should be liquidated before the next adjustment can happen. If this limitation was not in place, batch interest could be adjusted many times in a block and potentially create bad debt when the ICR falls below 100%.

Other ways of bringing a Trove's ICR below MCR are:

  • Batch management fee is charged
  • Interest is charged
  • Collateral price falls
@bingen bingen self-assigned this Oct 20, 2024
@bingen bingen added the wontfix This will not be worked on label Oct 20, 2024
@bingen
Copy link
Collaborator Author

bingen commented Oct 20, 2024

As mentioned in the description, we enforced a minimum interest rate change frequency, so that only 1 change per block can happen and so this doesn’t become a real danger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChainSecurity wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant