Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attractive Tin Coyote - Uninitialized immutable variable MAX_CLAIM_FEE prevents having a fee collector that receives fees #78

Open
sherlock-admin3 opened this issue Dec 22, 2024 · 0 comments
Labels
Won't Fix The sponsor confirmed this issue will not be fixed

Comments

@sherlock-admin3
Copy link

Attractive Tin Coyote

Medium

Uninitialized immutable variable MAX_CLAIM_FEE prevents having a fee collector that receives fees

Summary

Uninitialized immutable variable MAX_CLAIM_FEE prevents admin from setting feeAmount to a certain amount > 0. feeCollector will never receive fees in this contract.

Vulnerability Detail

Uninitialized immutable variable MAX_CLAIM_FEE will always be 0 in this contract. Thus, feeAmount will always be 0. If admin tries to set feeAmount to an amount > 0 the setClaimFeeParameters(...) function will revert. It can only be 0 making feeCollector useless.

Impact

feeCollector will never receive fees in this contract.

Code Snippet

The root cause making MAX_CLAIM_FEE == 0 always:
https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/GovernanceStaker.sol#L171
https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/GovernanceStaker.sol#L228
The check preventing feeAmount from being > 0:
https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/GovernanceStaker.sol#L801

Tool used

Manual Review

Recommendation

Initialize the MAX_CLAIM_FEE immutable variable in the constructor.

@sherlock-admin3 sherlock-admin3 added the Won't Fix The sponsor confirmed this issue will not be fixed label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Fix The sponsor confirmed this issue will not be fixed
Projects
None yet
Development

No branches or pull requests

1 participant