Core Contracts

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

Repay is pausable, which may prevent users from repaying their debt while the collateral price declines.

Summary

Both repay and repayOnBehalf are pausable. If the protocol is paused while the collateral price drops, users will be unable to repay their debt, potentially leading to liquidation once the protocol is unpaused.

Vulnerability Details

function repay(uint256 amount) external nonReentrant whenNotPaused onlyValidAmount(amount) { //@audit repay func can not be paused or user can't repay assets when paused.
_repay(amount, msg.sender);
}
function repayOnBehalf(uint256 amount, address onBehalfOf) external nonReentrant whenNotPaused onlyValidAmount(amount) {
if (!canPaybackDebt) revert PaybackDebtDisabled();
if (onBehalfOf == address(0)) revert AddressCannotBeZero();
_repay(amount, onBehalfOf);
}

From above code we can see both function is pauseable.

Impact

User will be unable to repay their debt

Tools Used

Foundry

Recommendations

Delete whenNotPaused in repay and repayOnBehalf functions

Updates

Lead Judging Commences

inallhonesty Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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