[M-1] Precision Truncation May Lead to Platform Fee Loss and Pot Misallocation
In the claimThrone() function, the platform fee is calculated as:
This calculation involves integer division in Solidity. If sentAmount is very small (e.g., 1 wei), and platformFeePercentage is low (e.g., 1%), the result will truncate to 0 due to Solidity’s lack of decimals, causing:
1.platformFeesBalance to receive zero even though a fee is expected.
2.amountToPot to misrepresent what remains after fee deduction.
3.Event logs and game state to become inconsistent with economic expectations.
4.This becomes particularly relevant if the owner sets a low claimFee, or a user intentionally sends the minimum ETH possible to manipulate this logic.
Impact:
1.Users can circumvent platform fees by exploiting small-value claims.
2.Over time, the platform may lose significant value in micro-farming scenarios or sybil loops.
3.Fee percentage logic becomes non-deterministic at low scales, harming auditability.
1.Assume platformFeePercentage = 1 (1%)
2.Assume claimFee = 1 wei
3.A user sends 1 wei in claimThrone()
Enforce Minimum Claim Value:
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.