Liquid Staking

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

PriorityPool::depositQueuedTokens allows to bypass deposit limits set by contract and this function is callable by anyone

Summary

The function PriorityPool::depositQueuedTokens allows to bypass deposit limits set by contract and this function is callable by anyone.

Vulnerability Details

Functions in priorityPool used to deposit to StakingPool like PriorityPool::performUpkeep utilizes queueDepositMin and queueDepositMax (set in initializer or with setQueueDepositParams) values as a restriction to check if a deposit should and can be made and like the code comments says will revert if not:

will revert if less than queueDepositMin tokens can be deposited

However the function PriorityPool::depositQueuedTokens allows to bypass this limits and this function is callable by anyone.
So, this made the restriction imposed by contract's queueDepositMin and queueDepositMax values pointless.

function depositQueuedTokens(
uint256 _queueDepositMin,
uint256 _queueDepositMax,
bytes[] calldata _data
) external {
_depositQueuedTokens(_queueDepositMin, _queueDepositMax, _data);
}

Impact

Broken access control on depositQueuedTokens allows to bypass deposit limits and is callable by anyone, can be used to deposit by anyone at any time with any arbitrary amount and specially when some specific contract states happens, allowing to frontrun other user txs for example.

Tools Used

Manual Review

Recommendations

Implement an access control for PriorityPool::depositQueuedTokens such as onlyOwner

function depositQueuedTokens(
uint256 _queueDepositMin,
uint256 _queueDepositMax,
bytes[] calldata _data
) external onlyOwner {
_depositQueuedTokens(_queueDepositMin, _queueDepositMax, _data);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
11 months ago
inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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