Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: high
Invalid

queueDepositMin can be set greater than queueDepositMax accidentally.

Summary

Vulnerability Details

Lines of impacted code:

function setQueueDepositParams(
uint128 _queueDepositMin,
uint128 _queueDepositMax
) external onlyOwner {
queueDepositMin = _queueDepositMin;
queueDepositMax = _queueDepositMax;
emit SetQueueDepositParams(_queueDepositMin, _queueDepositMax);
}

It is possible for the contract owner to accidentally/deliberately set a value for queueDepositMin which is greater than queueDepositMax or a value queueDepositMax which is less than queueDepositMin. If this happens then this will break many function's logic of PriorityPool contract including _depositQueuedTokens.

Impact

Incorrect value of queueDepositMin and queueDepositMax might break PriorityPool contract logic.

Tools Used

Manual

Recommendations

Add a value check, something like:
require(_queueDepositMin> 0 && _queueDepositMax > _queueDepositMin);

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 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.