-
Notifications
You must be signed in to change notification settings - Fork 6
jsmi - New top pool weights apply to the time before it has been set. #70
Comments
Escalate I believe this issue lacks valid POC and description of impact, which makes this issue invalid. |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
First, The following example scenario could replace the POC since it is fully clear to everyone.
Furthermore, I think that not all valid issues are required to have POC. Second, please compare impact of this issue:
with the impact of original issue #107:
As you can see, they essentially stated the same impact about the |
Yep, I agree that not all issues require POCs, only the ones that fall under the POC requirements. Additionally, POC can be either coded or written, so here it's sufficient I believe. I agree that the impact inside the Impact section is not very convincing, but the 4th step of the vulnerability path explains it well enough:
Hence, I believe it's sufficient duplicate, planning to reject the escalation and leave the issue as it is. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
jsmi
Medium
New top pool weights apply to the time before it has been set.
Summary
The top pool weights are used to calculate the farm rewards using accrued debt per share of pools.
Voter.sol#setTopPoolIdsWithWeights
update the top pool weights but doesn't update the accrued debt per share of pools.Therefore the newly set pool weights may apply to the time before it has been set.
Vulnerability Detail
Scenario:
pool1
with weight20%
andpool2
with weight80%
respectively.pool1
with80%
andpool2
with20%
.80%
forpool1
and20%
forpool2
.Impact
New top pool weights apply to the time before it has been set.
Code Snippet
Tool used
Manual Review
Recommendation
Modify the
Voter.sol#setTopPoolIdsWithWeights
as follows.function setTopPoolIdsWithWeights(uint256[] calldata pids, uint256[] calldata weights) external { if (msg.sender != _operator) _checkOwner(); uint256 length = pids.length; if (length != weights.length) revert IVoter__InvalidLength(); uint256[] memory oldIds = _topPids.values(); + _masterChef.updateAll(oldIds); ...... }
Duplicate of #107
The text was updated successfully, but these errors were encountered: