Skip to content
Request an audit

‹ All findings

Malicious user can call borrowing::calculateCumulativeRate() any number of times to inflate debt rate as lastEventTime is not updated

Crit/HighAutonomint·Sherlock · Hedged stablecoin · 4th December 2024CodebaseH-21

Summary

borrowing::calculateCumulativeRate() does not update lastEventTime, so the cumulative rate may be increased unbounded, forcing users to repay much more debt.

Root Cause

In borrowing::calculateCumulativeRate(), lastEventTime is not updated.

Internal pre-conditions

None.

External pre-conditions

None.

Attack Path

  1. Users deposit cds.
  2. Users borrow.
  3. Malicious user calls borrowing::calculateCumulativeRate() any number of times.
  4. Borrowers have to repay much more debt.

Impact

Borrowers take massive losses as they have to repay much more.

PoC

See links above.

Mitigation

Update lastEventTime.