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.
If a user sets BribeRewarder for a specific pool all votes for that pool will be reverted
Summary
In Voter::vote function _notifyBribe is called which in turn calls BriberRewerder::deposit, which means "msg.sender" is Voter contract but in the BriberRewerder::depositMlumStaking::ownerOf is checked with msg.sender and this causes all votes for pools that have bribeRewarder is reverted
Vulnerability Detail
Add this test to voter.t.sol Coded POC:
Add this lines to setUp function
0xSmartContract
added
High
A High severity issue.
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
and removed
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Jul 28, 2024
sherlock-admin4
changed the title
Chilly Iris Parakeet - If a user sets BribeRewarder for a specific pool all votes for that pool will be reverted
pashap9990 - If a user sets BribeRewarder for a specific pool all votes for that pool will be reverted
Jul 29, 2024
pashap9990
High
If a user sets BribeRewarder for a specific pool all votes for that pool will be reverted
Summary
In
Voter::vote
function _notifyBribe is called which in turn callsBriberRewerder::deposit
, which means "msg.sender" is Voter contract but in theBriberRewerder::deposit
MlumStaking::ownerOf
is checked with msg.sender and this causes all votes for pools that have bribeRewarder is revertedVulnerability Detail
Add this test to voter.t.sol
Coded POC:
Add this lines to setUp function
Impact
LPs cannot vote for pools with bribeRewarder
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/Voter.sol#L211
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/Voter.sol#L225
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/rewarders/BribeRewarder.sol#L264
Tool used
Manual Review
Recommendation
Its better pass account as parameter to deposit function
Duplicate of #39
The text was updated successfully, but these errors were encountered: