Small rewards may be absorbed leading to asset loss
In the LSTRewardsSplitter contract, when the splitRewards
function processes very small rewards, it may lead to asset loss. Specifically:
If _rewardsAmount
is very small, when calculating each receiver's share, amount
may become 0 due to rounding:
When amount is 0, no transfer operation will be executed:
Even if no rewards are actually distributed, principalDeposits
will still be updated:
This may cause small rewards to be "absorbed" as they are counted into principalDeposits
but not actually distributed to anyone. Long-term accumulation may lead to significant asset loss.
vscode
Set a minimum reward threshold, only execute distribution when _rewardsAmount exceeds a certain value.
Use more precise calculation methods when calculating amount to avoid 0 values due to rounding.
Track undistributed small rewards and distribute them when accumulated to a certain amount.
Check if actual reward distribution has occurred before updating principalDeposits.
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.