The configureFeeRecipient()
function incorrectly validates fee recipient shares, causing it to revert when updating an existing recipient’s allocation. This prevents adjustments to fee recipient shares.
The total fee recipient shares (totalFeeRecipientsShares
) should never exceed MAX_CONFIGURABLE_PROTOCOL_FEE_SHARES
.
However, the validation in configureFeeRecipient()
does not account for an existing share when computing the new total, leading to incorrect reverts.
In this implementation, share represents the new share being set for the recipient. However, the calculation does not take into account that the recipient may already have an existing share, leading to an incorrect comparison.
Example Scenario:
Assume there are two fee recipients, Alice and Bob, each with 25% shares.
The contract's maximum allowable shares (MAX_CONFIGURABLE_PROTOCOL_FEE_SHARES) is 60%.
The owner wants to update Alice’s share from 25% to 20% or 25% to 30%.
When configureFeeRecipient()
is called with share = 20%, the function incorrectly computes:
This check fails to consider Alice’s existing 25% share, leading to an unnecessary revert.
Prevents valid updates to fee recipient allocations.
Limits protocol governance by disallowing share adjustments.
Could hinder fee recipient rebalancing, impacting protocol operations.
Manual Review
Modify configureFeeRecipient()
to correctly account for the recipient’s existing share before performing the validation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.