The DebtToken.updateUsageIndex function enforces a strict monotonic increase in the usage index by reverting any attempt to lower it. While this design ensures that the index only grows, it also prevents the protocol from correcting an overestimated usage index. In scenarios where the index is erroneously inflated—due to external oracle errors, miscalculations, or malicious manipulation—the inability to lower the index can lead to permanently overstated debt balances.
Strict Monotonicity Enforcement:
The function is implemented as follows:
This check (if (newUsageIndex < _usageIndex) revert InvalidAmount();) ensures that once the usage index is raised, it cannot be reduced.
Overestimated Index Correction Issue:
In the event that the usage index is overestimated—whether due to external oracle discrepancies, calculation errors, or deliberate manipulation—the protocol lacks a mechanism to correct this error. The inability to lower the index means that any overestimation is permanent, potentially resulting in:
Inflated Debt Balances: Users may see their accrued debt permanently higher than it should be.
Unfair Liquidations: Overstated debt levels could trigger liquidations or prevent users from adequately repaying their loans.
Systemic Inaccuracy: The overall health of the lending pool might be misrepresented, leading to broader economic implications.
Protocol Inflexibility:
The design choice to forbid lowering the usage index, while intended to safeguard against certain types of abuse, also removes a critical corrective mechanism. This inflexibility can harm both users and the protocol's long-term stability in the face of unforeseen errors or external disruptions.
User Debt Overstatement:
Users might be saddled with debt amounts that are higher than their actual accrual, affecting their ability to manage repayments and risking unjust liquidations.
Economic Distortion:
An inflated usage index distorts the true state of the system’s debt, potentially affecting interest rate calculations and overall market confidence.
Erroneous Increase:
An external error or manipulation causes the usage index to be set significantly higher than intended.
Attempted Correction:
A protocol administrator or automated correction mechanism later attempts to update the usage index with a lower value that reflects the accurate debt accrual.
Reversion and Outcome:
The updateUsageIndex function reverts the transaction, locking in the inflated usage index. Consequently, users' debt balances remain erroneously high, potentially triggering unwarranted liquidations or repayment difficulties.
Manual review
Allow Corrective Lowering Under Controlled Conditions:
Modify the updateUsageIndex function to allow lowering the usage index when a correction is needed. This could be achieved by introducing a governance-controlled or time-locked mechanism that permits such adjustments only after thorough verification.
Implement Safeguards for Index Adjustments:
Add additional checks or multi-signature approvals to ensure that any reduction in the usage index is justified and transparent, minimizing the risk of abuse.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.