Core Contracts

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

user doesn't have option to repay when protocol is paused resulting in instant liquidation in some cases.

Summary

When a protocol is unpaused there is no grace period, it is possible that user position become unhealthy in this pause window cause and when the unpause is called the position will be marked liquidable or if it is already in auction then and auction time is over then it can be liquidated instantly.

Vulnerability Details

Protocol uses pausing mechanism everywhere in LendingPool. If the protocol is paused all the operation are halted including repay , If the user’s position is already marked for liquidation and his grace period has just started, due to the pause state user don’t have a ability to secure his collateral by repaying the loan. This will cause his collateral to be instantly liquidable if the protocol unpause after the liquidation grace period is over.

/**
* @notice Allows a user to repay their own borrowed reserve assets
* @param amount The amount to repay
*/
//@audit cannot call when paused
function repay(uint256 amount) external nonReentrant whenNotPaused onlyValidAmount(amount) {
_repay(amount, msg.sender);
}

Impact

User will lose his collateral because of the pause state.

Recommendations

User should be able to repay when protocol is paused or there should be extra grace period after unpause before the finalizeLiquidation can be called.

Updates

Lead Judging Commences

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

Unfair Liquidation As Repayment / closeLiquidation Paused While Liquidations Enabled

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

Unfair Liquidation As Repayment / closeLiquidation Paused While Liquidations Enabled

Support

FAQs

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

Give us feedback!