The unstakeAll() function in the FjordStaking contract contains an unbounded loop that iterates over all user deposits. This design can lead to out-of-gas errors if a user accumulates a large number of deposits over time, resulting in DOS vulnerability.
The unstakeAll() function iterates through all deposits of a user without any limit
this unbounded loop can consume an unpredictable amount of gas, potentially exceeding the block gas limit if the number of deposits is sufficiently large
Users with many deposits may be unable to unstake their tokens due to consistently failing transactions
User funds could become effectively locked in the contract if unstaking operations consistently fail du to gas limitations.
Even when transactions doesn't fail, users with many deposits will face higher gas costs for unstaking operations.
Manual Review
Implementing a Batch Processing, modifying the unstakeAll() function to process a limited number of deposits per transaction
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.