Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Interest accrued when the pool is paused.

Bug description

Current pausing feature allows pool to be globally paused including repay, repayOnBehalf and depositNFT functions.

The problem is the updateReserveInterests() will not factor in the duration of pausing where user cannot repay a loan.

ReserveLibrary.sol#L121-L122

function updateReserveInterests(
ReserveData storage reserve,
ReserveRateData storage rateData
) internal {
uint256 timeDelta = block.timestamp -
uint256(reserve.lastUpdateTimestamp);

The interest continues to accrue even when protocol is paused. Even though, there isn't really a risk of mass liquidations as borrowers still have a repayment grace period before their positions is liquidated, but still if the liquidations is initiated due to borrower not being able to supply collateral or repay part of the loan, he is now forced to repay all of his debt and close his position.

Impact

Due to the fact that interest keeps accruing even when the protocol is paused, users might be forced to fully repay all of their debt and close their positions.

Recommended Mitigation

Consider storing pause/unpause timestamp to allow skipping borrow interests compounding for the duration of the pause.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Unfair Liquidation As Borrow Interest Accumulates While Paused

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Unfair Liquidation As Borrow Interest Accumulates While Paused

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.