The has_claimed_slice
view function is intended to check if a user has already claimed their airdrop by looking them up in the claimed_users
table. The issue is that the function contains a redundant conditional check that makes the code unnecessarily verbose and less efficient.
Likelihood:
This is a static code quality issue and is always present in the contract.
Impact:
The impact is low. It does not introduce a security vulnerability but goes against best practices, making the code harder to read and slightly less gas-efficient.
Code inspection of the function reveals that the initial if
block is entirely superfluous. The final line of the function already accomplishes the full logic correctly for both possible cases (user has claimed vs. has not claimed).
Simplify the function by removing the redundant if
block. The function's behavior will remain identical.
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.