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.
Voter.sol#vote - Users can continue voting after their lockDuration expire
Summary
Users can continue using their staking after the lockDuration expire.
Vulnerability Detail
Users create positions by staking their money. With their position, they can vote for pools and earn rewards. Users can only vote for their lockDuration time. When their duration expires, they can withdraw their money or extend the lockDuration of their staking to continue participating in voting periods. They should NOT be able to vote for pools if their lockDuration expires. However, there is no check to prevent voting with expired duration.
sherlock-admin4
changed the title
Quick Mahogany Viper - Voter.sol#vote - Users can continue voting after their lockDuration expire
Silvermist - Voter.sol#vote - Users can continue voting after their lockDuration expire
Jul 29, 2024
Silvermist
Medium
Voter.sol#vote - Users can continue voting after their
lockDuration
expireSummary
Users can continue using their staking after the
lockDuration
expire.Vulnerability Detail
Users create positions by staking their money. With their position, they can vote for pools and earn rewards. Users can only vote for their
lockDuration
time. When their duration expires, they can withdraw their money or extend thelockDuration
of their staking to continue participating in voting periods. They should NOT be able to vote for pools if theirlockDuration
expires. However, there is no check to prevent voting with expired duration.PoC
Paste the following test in
Voter.t.sol
Impact
Users can vote with expired staking.
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/Voter.sol#L153-L219
Tool used
Manual Review
Recommendation
Before voting ensure the
lockDuration
is more than theblock.timestamp
.Duplicate of #166
The text was updated successfully, but these errors were encountered: