The withdraw
function handles withdrawing tokens, with an option to unqueue tokens before swapping liquid staking tokens (LSTs). A minor issue was found in the conditional check for _shouldUnqueue
.
The issue is present in the conditional check of the _shouldUnqueue
flag within the withdraw
function:
The check if (_shouldUnqueue == true)
is unnecessarily verbose. Solidity allows for simpler boolean expressions, and a cleaner, more readable approach would be:
This simplification increases readability without changing the function's behavior, as Solidity evaluates the boolean value directly in conditions.
The readability of the code is impacted. The more concise check increases clarity and makes the logic easier to understand, especially when reviewing the contract for auditing or future development.
Manual review
Simplify the _shouldUnqueue
check by replacing if (_shouldUnqueue == true)
with if (_shouldUnqueue)
.
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.