The selectPresident()
function does not return the address of the selected president causing several issues related to transparency and clarity, especially in a decentralized or voting-based contract where feedback is crucial for the proper operation and interaction with users.
Currently, the selectPresident()
function only updates internal state variables without providing any external feedback on the selected winner, which can make the election process less transparent. Without feedback, users might not be aware of the current status of the vote or who the current president is. The voters or observers of the contract would lack visibility into whether their votes were counted correctly or which candidate has won after the election.
Users cannot easily determine the election outcome without querying state variables.
Manual review
Modify the selectPresident()
function to return the address of the newly selected president:
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.