Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Wrong Precision in contract `levelOne.sol`

Summary

As per the docs we have to use 10**18 decimal places, but we have set the precision to 100 only.

Vulnerability Details

As per the docs we have to use 10**18 decimal places, but we have set the precision to 100 only.

https://github.com/CodeHawks-Contests/2025-05-hawk-high/blob/3a7251910c31739505a8699c7a0fc1b7de2c30b5/src/LevelOne.sol#L55

uint256 public constant PRECISION = 100;

Impact

Can effect the decimal places and create precision loss in calculation . eventually leading to loss of funds .

Tools Used

manual review

Recommendations

make precision 10**18.

Updates

Lead Judging Commences

yeahchibyke Lead Judge
4 months ago
yeahchibyke Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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