Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

auditsea - AdvancedDistributer - Wrong mechanism around voteFactor and voting power #3

Closed
sherlock-admin opened this issue Jul 21, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Jul 21, 2023

auditsea

high

AdvancedDistributer - Wrong mechanism around voteFactor and voting power

Summary

Voting power management using voteFactor is wrong because the voteFactor can change.

Vulnerability Detail

In AdvancedDistributor, voteFactor can be set by the owner and it can be updated multiple times.
This exposes a vulnerability in claiming rewards and calculating voting power.

When voteFactor is updated to a bigger one, users will not be able to claim their rewards because burning vote tokens will revert.
When voteFactor is updated to a smaller one, users will still have their remaining voting power even after claiming all rewards.

Impact

Based on how voteFactor is changed, claiming / adjustments will not be working or users will have their voting power even though they don't have rewards to claim.

Code Snippet

https://github.com/sherlock-audit/2023-06-tokensoft/blob/main/contracts/contracts/claim/abstract/AdvancedDistributor.sol#L181-L183

https://github.com/sherlock-audit/2023-06-tokensoft/blob/main/contracts/contracts/claim/abstract/AdvancedDistributor.sol#L94

https://github.com/sherlock-audit/2023-06-tokensoft/blob/main/contracts/contracts/claim/abstract/AdvancedDistributor.sol#L120

Tool used

Manual Review

Recommendation

Either implement user-specific voting power or overwrite balanceOf function to reflect voteFactor in it.

Duplicate of #55

@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jul 26, 2023
@sherlock-admin sherlock-admin changed the title Crazy Pine Eel - AdvancedDistributer - Wrong mechanism around voteFactor and voting power auditsea - AdvancedDistributer - Wrong mechanism around voteFactor and voting power Aug 6, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant