Core Contracts

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

Redundant Storage Variable and Misleading Liquidation Condition in `LendingPool::initiateLiquidation` Function

Summary

  1. Redundant Storage Variable: user is declared but never used, wasting gas.

  2. Misleading Liquidation Condition: The error message HealthFactorTooLow() is incorrect; it should indicate that liquidation is blocked when the health factor is too high.

Vulnerability details

  1. Redundant storage variable :

UserData storage user = userData[userAddress];

user is declared but never used in the function. userAddress is directly used to fetch the required data.

2.Misleading revert statement :

if (healthFactor >= healthFactorLiquidationThreshold) revert HealthFactorTooLow();

When healthFactor of an user is higher than liquidation threshold it is considered to be a safe position. Hence the user should not be subjected to liquidation. But the revert statement is misleading as it interprets to " health factor being too low".
link to code

Impact

  1. user is declared but never used, which wastes gas.

  2. Misleading revert statement, if frontend depends on this revert statement it might give a wrong information.

Tools used

Manual review

Reccomended mitigation

  1. Remove the user declaration.

--- UserData storage user = userData[userAddress];

2.Rename the error appropriately.

--- if (healthFactor >= healthFactorLiquidationThreshold) revert HealthFactorTooLow();
+++ if (healthFactor >= healthFactorLiquidationThreshold) revert HealthyHealthFactor();
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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