This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
novaman33 - _unlockOperators
can manipulate votes
#150
Labels
Non-Reward
This issue will not receive a payout
novaman33
High
_unlockOperators
can manipulate votesSummary
In the MlumStaking.sol unlock operators have the right to unlock a position anytime. This gives them the right to create serious manipulation of the vote.
Vulnerability Detail
The vote function only checks if the vote duration for the current position and the initial lock duration are over the minimum to vote. However this is not enough as unlock operators can create multiple positions vote and than withdraw.
Consider the following scenario:
Impact
_unlockOperators will cause huge vote manipulation and also cut other user's rewards - High
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/Voter.sol#L172
Tool used
Manual Review
Recommendation
Do not allow positions that were just created to vote. Create a delay so that they can vote starting next voting period.
The text was updated successfully, but these errors were encountered: