The fee claiming mechanism uses outdated protocol accounting data due to missing state synchronization, enabling users to claim incorrect WETH amounts. The FeeDistributionBranch.claimFees
function fails to update critical distribution parameters before calculating rewards, allowing claims based on stale valuePerShare
values. This violates the protocol's financial integrity guarantees and creates systemic accounting errors.
The fee claiming mechanism contains a critical state synchronization flaw where fee calculations use stale protocol accounting data. The FeeDistributionBranch.claimFees
function (FeeDistributionBranch.sol#L295) relies on distribution values that are only updated through Vault.recalculateVaultsCreditCapacity
, but fails to ensure this state update occurs before fee calculations:
the storage state valuePerShare
can be only updated in the function Distribution.distributeValue
:
while this function can only be called by Vault.recalculateVaultsCreditCapacity
:
This creates a race condition where:
Protocol keepers/automation must call Vault.recalculateVaultsCreditCapacity
externally
Users can claim fees against outdated valuePerShare
values from the Distribution library
Fee transfers use incorrect WETH conversion rates until manual state updates
The core issue stems from the separation of state updates (in vault recalculation) from value claims without enforcing temporal coupling. This violates the invariant that financial calculations must always operate on fresh state data.
This vulnerability directly impacts the protocol's financial integrity and user trust in three critical ways:
Inaccurate Fee Distribution
Users may receive incorrect WETH amounts (overpaid or underpaid) based on stale accounting data, violating core protocol guarantees
Protocol Insolvency Risk
Persistent state desynchronization could create cumulative accounting errors leading to vault undercollateralization
Operational Dependency
Relies on perfect keeper/automation performance for state updates, introducing systemic fragility
The severity is high as it affects core protocol functionality (fee distribution) and creates direct financial risks for both users and the protocol treasury. Without state synchronization enforcement, the system cannot guarantee proper financial accounting between deposits, fees, and withdrawals.
Manual Review
Modify claimFees
to call Vault.recalculateVaultsCreditCapacity
before calculating claimable amounts to ensure fresh state data:
The recalculation call ensures valuePerShare
reflects latest vault state before computing claimable amounts, eliminating stale data risks.
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.