Core Contracts

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

Liquidations will be impossible as we are depositing a wrong token

Summary

Liquidations will be impossible as we are depositing a wrong token

Vulnerability Details

Upon depositing in the StabilityPool, we send RTokens:

rToken.safeTransferFrom(msg.sender, address(this), amount);

However, when liquidations are supposed to be done, they have the following check:

uint256 crvUSDBalance = crvUSDToken.balanceOf(address(this));
if (crvUSDBalance < scaledUserDebt) revert InsufficientBalance();

As we do not deposit crvUSD tokens and there is no reason for such tokens to be in the contract, the liquidations will be impossible.

Impact

Liquidations won't work which is detrimental for the protocol

Tools Used

Manual Review

Recommendations

Liquidations are done with crvUSD so refactor the code to handle it properly

Updates

Lead Judging Commences

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

StabilityPool design flaw where liquidations will always fail as StabilityPool receives rTokens but LendingPool expects it to provide crvUSD

Support

FAQs

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