Dussehra::killRavana
, payout to the organiser and winner can be incomplete, resulting in ether being accumulated in the contract without a means to retrieve it.Description: Due to rounding error in calculation of payout fees in Dussehra::killRavana
, payout to the organiser and winner can be incomplete, resulting in ether being accumulated in the contract without a means to retrieve it. This will occur when the entree fee ends with an odd number and an odd number of participants have entered.
Impact: There is a chance that the contract will not payout in full.
Proof of Concept:
The organiser sets the fee to an odd number (for instance 1 ether + 1);
An odd number of participants enters the protocol.
Ravana is killed, and fees are collected.
The balance of the Dussehra
is not zero.
Place the following in Dussehra.t.sol
.
Recommended Mitigation: The simplest mitigation is to always set the entree fee to a even number, such as 1 ether.
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.