Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing check of total fees < 10000 when setting in constructor of LSTRewardsSplitter.sol

Summary

The fees array is set in the constructor of LSTRewardsSplitter.sol. There is no validation of _totalFeesBasisPoints() < 10000.

Vulnerability Details

The fees can be set > 100% initially.

Impact

Because of missing validation in the constructor the fees can be set > 10000 which will lead to _splitRewards() taking amount out of users principalDeposits.

Tools Used

Vs Code

Recommendations

Add the same check of _totalFeesBasisPoints() < 10000 as used in addFee() and updateFee() methods.

constructor(address _lst, Fee[] memory _fees, address _owner) {
controller = ILSTRewardsSplitterController(msg.sender);
lst = IERC677(_lst);
for (uint256 i = 0; i < _fees.length; ++i) {
fees.push(_fees[i]);
}
+++ if (_totalFeesBasisPoints() > 10000) revert FeesExceedLimit();
_transferOwnership(_owner);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.