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.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
Users are able to block bribing in pools for any voting period
Summary
Users are able to block BribeRewarder::_bribe in pools for any voting period, by creating and register their own BribeRewarders to reach the limit with.
Vulnerability Detail
As we can see, nothing stops mistrustful user from creating their own BribeRewarder from RewarderFactory
Consider making that only trusted users are able create and register new BribeRewarders or increase MAX_BRIBES_PER_POOL to make blocking periods unworthy for attackers
sherlock-admin4
changed the title
Stable Grape Panda - Users are able to block bribing in pools for any voting period
radin200 - Users are able to block bribing in pools for any voting period
Jul 29, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
radin200
High
Users are able to block bribing in pools for any voting period
Summary
Users are able to block
BribeRewarder::_bribe
in pools for any voting period, by creating and register their own BribeRewarders to reach the limit with.Vulnerability Detail
As we can see, nothing stops mistrustful user from creating their own BribeRewarder from
RewarderFactory
However, there is scenario where malicious actor could create 5 BribeRewareders(MAX_BRIBES_PER_POOL = 5), fund them and call bribe for as many periods as he want in the future with dustAmount inputed(funded amount should be >= totalAmount). Due to the
Voter::onRegister
call, actor's BribeRewarders will be recorded inVoter::_bribesPerPriod
for the specified periods and pool address by reaching the maximum limithttps://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/libraries/Constants.sol#L17
Because of this actions and
MAX_BRIBES_PER_POOL
limit reached, protocol users won't be able to bribe voters for the blocked voting periodsImpact
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/rewarders/RewarderFactory.sol#L109-L113
https://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/rewarders/RewarderFactory.sol#L152-L173
Tool used
Manual Review
Recommendation
Consider making that only trusted users are able create and register new
BribeRewarders
or increaseMAX_BRIBES_PER_POOL
to make blocking periods unworthy for attackersDuplicate of #190
The text was updated successfully, but these errors were encountered: