This repository was archived by the owner on Jan 12, 2025. It is now read-only.
Reentrants - addToPosition()
isn't disabled during emergency unlock
#15
Labels
Non-Reward
This issue will not receive a payout
Reentrants
Medium
addToPosition()
isn't disabled during emergency unlockSummary
addToPosition()
doesn't have theisUnlocked()
check that is present increatePosition()
and_lockPosition()
.Vulnerability Detail
In the event where emergency unlock is activated, locks should be disabled and users should only be able to withdraw positions. However, users are able to add to existing positions with
addToPosition()
because it doesn't have theisUnlocked()
check.Impact
User action that should be blocked, isn't.
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/7fd1a65b76d50f1bf2555c699ef06cde2b646674/magicsea-staking/src/MlumStaking.sol#L397-L428
Tool used
Manual Review
Recommendation
Add the
isUnlocked()
check foraddToPosition()
.The text was updated successfully, but these errors were encountered: