The staking system is vulnerable to timing exploitation through the function _checkEpochRollover() internal on file path: 2024-08-fjord/src/FjordStaking.sol Line: 691, where attackers can gain financial advantages by manipulating transaction timing. This undermines the system's fairness and integrity, potentially leading to user losses.
The likelihood of this attack is fairly moderate. Timing attacks, while requiring precise execution and monitoring, are feasible with the right tools and expertise. Attackers can use automated scripts or bots to monitor blockchain events and execute transactions at optimal times.
The financial impact and feasibility of these attacks indicate a moderate severity level. The risk increases if the contract manages substantial funds or if timing manipulation significantly disrupts the staking mechanism's intended operations.
Attack Scenario:
Monitoring Epoch Transitions:
Attackers monitor the blockchain to detect imminent epoch transitions.
They prepare transactions to execute immediately after the transition, ensuring priority interaction with the contract in the new epoch.
Strategic Staking or Unstaking:
By precisely timing their transactions, attackers can stake or unstake tokens to maximize rewards or minimize penalties.
For example, they might stake tokens just before an epoch ends to avoid a full cycle lock or claim rewards immediately after a new epoch begins.
Manual
To reduce the severity and likelihood of potential attacks, it is recommend implementing the following mitigations:
decouple rollover logic from user actions
utilize off-chain automation.
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.