Liquid Staking

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

should depositLiquidity() in StakingPool.sol#addStrategy()

Summary

should depositLiquidity() in StakingPool.sol#addStrategy()

Vulnerability Details

when deposit(), if some Strategies reached limits, there will be some tokens remain under address(this), those tokens should be deposited to available Strategies as soon as possible.

Besides, when delete strategy, some tokens will be withdrawed to address(this).

So, when new strategy added, those tokens under address(this) should be deposited immediately.

Impact

tokens are not deposited to strategies immediately.

Tools Used

mannually reviwed

Recommendations

function addStrategy(address _strategy) external onlyOwner {
require(!_strategyExists(_strategy), "Strategy already exists");
token.safeApprove(_strategy, type(uint256).max);
strategies.push(_strategy);
depositLiquidity();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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