So, ChoosingRam::selectRamIfNotSelected
, only organiser can call this function between the event time. if no winner is selected by increaseValuesOfParticipants
& event ends and for some reason, organiser decides to act malicious and not call the function, then, no one will win and money is locked into the contract forever.
place below code in Dussehra.t.sol
and run command: forge test --mt test__fundsLocked
possibility of funds being locked in contract forever
Foundry
, chainlink oracles
Allow anyone to call ChoosingRam::selectRamIfNotSelected
to not worry about trusting single organiser/entity.
Allow ChoosingRam::selectRamIfNotSelected
to be called even after event ended as there isn't any downside for allowing so.
Better way to handle this situation is to use something like chainlink Automation or keepers which triggers upkeep and executes function ChoosingRam::selectRamIfNotSelected
based on CRON job called as time based upkeep. you can read more about it at chainlink
third method is decentralised way to handle the situation without relying on anyone such that ChoosingRam::selectRamIfNotSelected
will be called and executed at a particular time interval irrespective of anything.
The organizer is trusted and he/she will call the `selectRamIfNotSelected`.
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.