There is a synchronization issue between the FjordStaking and FjordPoints contracts that allows users to exploit the system.
Specifically, the FjordStaking contract permits users to stake and unstake within the same epoch, while the point contract incorrectly treats these actions as
occurring across two separate epochs, in the case of a desynch between the mentioned contract epoch times.
A possible scenario for this issue is:
User A monitors the mentioned contracts' timing systems to identify any potential gaps or delays.
He notices that there is a delay (e.g. 10 hours) between the start of the epochs between the contracts.
At the 6th day (14 hours to the end of the epoch), he stakes a significant amount at the last second of an epoch in the point contract, aiming to withdraw it in the first times of the next points epoch.
13 hours later, he withdraws his stakes (it is possible because the epoch in staking is the same as the current epoch)
Due to this desynchronization, the user gains disproportionate rewards with just a few hours of staking. (for example, 400 points instead of 300)
This scenario unfairly dilutes the rewards for other users.
This test shows the impact of a desynch between the two contract's timings. This delay might happen due to the blockchain related issues if deployed separately.
The result is:
This exploit allows users to earn high rewards with minimal staking time, leading to an unfair distribution of rewards and potential financial losses for other users.
Manual Review
Ensure that staking and unstaking actions within the staking contract are confined to the same epoch to prevent exploitation and maintain fair reward distribution.
Impact: High - Users are getting an unreasonable amount of points through exploiting a vulnerability Likelihood: Low - Most of the times, when using the script, all deployment tx will get processed in the same block. But, there is a small chance for them to be processed in different blocks.
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.