You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
Only valid Magic LUM Staking Position are allowed to vote. The overall lock needs to be longer then 90 days and the remaining lock period needs to be longer than the epoch time. 1 Magic LUM = 1 Vote
However, the implementation of Voter::vote is the following.
function vote(uint256tokenId, address[] calldatapools, uint256[] calldatadeltaAmounts) external {
......
// check if _minimumLockTime >= initialLockDuration and it is lockedif (_mlumStaking.getStakingPosition(tokenId).initialLockDuration < _minimumLockTime) {
revertIVoter__InsufficientLockTime();
}
175: if (_mlumStaking.getStakingPosition(tokenId).lockDuration < _periodDuration) {
revertIVoter__InsufficientLockTime();
}
......
}
As shown above, L175 doesn't ensure that the staking position is locked.
Impact
The staking position whose remaining lock period is less than epoch time or even expired can vote for LUM emissions.
sherlock-admin4
changed the title
Swift Sage Gerbil - Not allowed staking position can vote for LUM emissions.
jsmi - Not allowed staking position can vote for LUM emissions.
Jul 29, 2024
jsmi
High
Not allowed staking position can vote for LUM emissions.
Summary
The staking position whose remaining lock period is less than epoch time can vote for LUM emissions.
Vulnerability Detail
The MagicSea DOCS describes as follows.
However, the implementation of
Voter::vote
is the following.As shown above,
L175
doesn't ensure that the staking position is locked.Impact
The staking position whose remaining lock period is less than epoch time or even expired can vote for LUM emissions.
Code Snippet
Tool used
Manual Review
Recommendation
It is recommended that modify
Voter::vote
as the following.Duplicate of #166
The text was updated successfully, but these errors were encountered: