In line 65 https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L65, there already exists a condition if _balance > balance so that _diff is always > 0. However, there is a condition below checks if _diff > 0. And since _diff is always > 0, we don't need to check if _ratio > 0, which is unnecessary.
Cause the function to compile slower and waste more gas.
Manual
Remove the condition of if (_diff > 0)
The completed code would be:
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.