This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
blackhole - The pool.lastRewardBlock
should be updated in the setStartBlock
function
#142
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Disputed
The sponsor disputed this issue's validity
blackhole
medium
The
pool.lastRewardBlock
should be updated in thesetStartBlock
functionSummary
The admin can update the startBlock using the setStartBlock function.
However, during this update, pool.lastRewardBlock is not modified.
This can lead to incorrect pendingPoints calculations if the startBlock is set to an earlier block.
As a result, the pendingPoints will not be correctly distributed starting from the new startBlock.
Vulnerability Detail
Impact
The pendingPoints will not be correctly distributed starting from the new startBlock.
Code Snippet
contracts/farm/SophonFarming.sol#L279
Tool used
Manual Review
Recommendation
It is recommended to update the
poolInfo.lastRewardBlock
in thesetStartBlock
function.Duplicate of #108
The text was updated successfully, but these errors were encountered: