In claimThrone()
:
But previousKingPayout
is always 0, so this condition is pointless and might cause:
Over-allocation to platform fees
Loss of user trust
Unstable logic if payout code is added later
And if in future the previousKingPayout
becomes non-zero (say 110% of sentAmount due to logic bug), subtraction underflows and causes a revert.
Impact:
Transfer blocked
Pot broken
Right now previousKingPayout == 0
, but simulate a future update:
Enforce safe arithmetic using SafeMath
or require sentAmount >= previousKingPayout
Or simply remove the redundant check now and reimplement properly when king payout logic is added
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.