A malitious actor can cause the fee receivers to lose their new rewards
in LSTRewardsSplitter.sol
due to the precision loss in _splitRewards()
internal function.
https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/core/lstRewardsSplitter/LSTRewardsSplitter.sol#L116C1-L125C6
https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/core/lstRewardsSplitter/LSTRewardsSplitter.sol#L173C1-L187C6
the splitRewards()
external function is callable by anyone,
and _splitRewards()
internal function suposed to split the reward among fees receivers.
see the _splitRewards()
internal function implementation:
given:
_rewardsAmount = 10
.
an array fees[11]
each basisPoints = 900.
the amount will be 0.
then the rewards will be added to the principalDeposits
in the following line:
then it is only withdrawable by the splitter owner.
splitter owner can bypass paying fees.
and it is exploitable by any one.
loss of fees.
manual review.
there is two solution:
the first is to implement an access control in the splitRewards()
external function.
the second is to add a check as follow:
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.