A critical bug was identified in the splitRewards function of the LSTRewardsSplitter contract. The function fails to correctly update the principalDeposits after splitting rewards, leading to potential discrepancies in reward distribution.
The splitRewards function is intended to split new rewards between fee receivers. However, the function does not correctly update the principalDeposits after splitting the rewards, resulting in incorrect balances and potential exploitation.
The issue lies in the calculation and update of principalDeposits. The function does not correctly account for the new rewards, leading to incorrect updates of the principalDeposits.
Past this poc into the existing test test/core/lst-rewards-splitter.test.ts
Output:
The test case fails, indicating that the splitRewards function does not correctly update the principalDeposits:
The incorrect update of principalDeposits can lead to several issues:
Incorrect Reward Distribution: Users may not receive the correct rewards, resulting in financial discrepancies.
Potential Exploitation: Malicious actors could exploit the incorrect update to manipulate the reward distribution.
Financial Loss: The platform and its users may suffer financial losses due to incorrect reward calculations
Hardhat
To resolve the issue, update the splitRewards function to ensure that the principalDeposits variable is correctly updated after splitting the rewards. This will involve recalculating the principalDeposits based on the current balance after the rewards have been split. This change will help maintain accurate balances and prevent potential discrepancies in reward distribution.
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.