The function getVaultAccumulatedValues
is responsible for computing the accumulated value changes for vaults, including realized debt, unrealized debt, USDC credit, and WETH rewards. However, while the function correctly applies vaultCreditShareX18 to USDC credit changes, it fails to apply this adjustment to WETH rewards.
Incorrect Calculation of WETH Rewards:
This only calculates the change in WETH rewards per share but does not multiply by vaultCreditShareX18
to proportionally distribute rewards among vaults.
Comparison with USDC Reward Calculation:
The function correctly applies vaultCreditShareX18 for USDC rewards
This ensures USDC rewards are distributed proportionally, but the same logic is missing for WETH rewards.
The **impact is MEDIUM **because:
Economic Fairness is Violated: Some vaults can unfairly accumulate more WETH rewards than others.
Financial Risk to Liquidity Providers: Misallocated rewards can discourage LP participation and destabilize Zaros' incentive structure.
Potential Drain on WETH Rewards: A vault with minimal credit can exploit this flaw to drain excessive WETH rewards over multiple reward cycles.
The likelihood is High because:
The function is called regularly by vaults to check their accumulated values.
No special permissions are required—any vault can execute this function and claim excessive rewards.
If vault rewards are distributed dynamically, a vault could repeatedly drain more rewards than intended over time.
Modify the wethRewardChangeX18
calculation to include multiplication by vaultCreditShareX18
, ensuring proportional distribution.
This** **ensures vaults receive rewards proportional to their credit share.
Prevents unauthorized vaults from claiming excess WETH.
Maintains consistency with how USDC rewards are already calculated.
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.