Liquid Staking

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

PriorityPool::canWithdraw occasionally returns the wrong value

Summary

https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/core/priorityPool/PriorityPool.sol#L211-L223

using the two else blocks then the code returns
stakingPool::canWithdraw + totalQueued
if however the user staked is less than totalQueued then the actual return data should be
stakingPool::canWithdraw + getQueuedTokens(_account, _distributionAmount)
this represent how much the user can take from the stakingPool + how much they can take from the PriorityPool

Impact

wrong return data

Tools Used

manual analysis

Recommendations

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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