The contract relies on block.timestamp
for critical time-based logic, such as determining when a new president can be selected. While block.timestamp
is generally reliable, miners have limited ability to manipulate it within certain bounds. This could potentially allow a miner to influence the timing of elections slightly, although the impact is minimal.
Affected Function: selectPresident
Issue Explanation:
Use of block.timestamp
:
Miner Influence: Miners can manipulate block.timestamp
within a range of approximately ±15 seconds (the actual allowance depends on the consensus protocol and network conditions).
Potential Exploit Scenario:
A miner could slightly accelerate or delay the ability to call selectPresident
by manipulating the timestamp, though only within a limited window.
This manipulation could allow a miner to be the first to call selectPresident
, but only if the timing is extremely precise.
Severity: Low
Minor Influence on Election Timing: The miner's ability to manipulate block.timestamp
is limited and unlikely to have a significant impact on the contract's functionality.
No Major Security Risk: The manipulation window is too small to cause substantial harm or provide a meaningful advantage.
Limited Practical Exploitability: Exploiting this would require significant effort for minimal gain.
Manual Code Review: Identified the reliance on block.timestamp
in time-based conditions.
Understanding of Ethereum Consensus Rules: Knowledge of how miners can and cannot manipulate block timestamps.
Accept the Minor Risk:
Given the low impact and limited exploitability, it may be acceptable to continue using block.timestamp
.
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.