Description
The Dusserha::enterPeopleWhoLikeRam
function does not check the dates or check if the event has finished before enrolling a player. This can lead to funds being permanently stuck in the contract.
The function Dussehra::killRavana
must be called between two specific dates, this function is responsible for paying the organiser and for allocation of funds to the winner, that is, the player who becomes Ram.
The Dussehra
documentation states:
killRavana
- Allows users to kill Ravana, and the Organizer will receive half of the total amount collected in the event. This function will only work after 12 October 2024 and before 13 October 2024.
withdraw - Allows ram to withdraw their rewards.
As funds are allocated in the Dussehra::killRavana
function call and any funds added after that function call are not accounted for. When the Dussehra::withdraw
function is called by the winner the payment amount has already been calculated and so the new funds will remain stuck in the contract permanently.
The value of the variable totalAmountGivenToRam
is calculated and stored when Dussehra::killRavana
is called:
Impact
Permanent loss of funds and broken trust with players.
Proof of Concept
Test Result
Recommended mitigation
Check the dates in the Dussehra::enterPeopleWhoLikeRam
function to prevent players from entering past the due date for selection.
References
Tools Used
Manual Review
It is the user's responsibility to check the date of the event.
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.