Attractive Tin Coyote - Uninitialized immutable variable MAX_CLAIM_FEE
prevents having a fee collector that receives fees
#78
Labels
Won't Fix
The sponsor confirmed this issue will not be fixed
Attractive Tin Coyote
Medium
Uninitialized immutable variable
MAX_CLAIM_FEE
prevents having a fee collector that receives feesSummary
Uninitialized immutable variable
MAX_CLAIM_FEE
prevents admin from settingfeeAmount
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 be0
. If admin tries to setfeeAmount
to an amount> 0
thesetClaimFeeParameters(...)
function will revert. It can only be0
makingfeeCollector
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.The text was updated successfully, but these errors were encountered: