ID | Description | Severity |
---|---|---|
L-01 | Owner can renounce ownership. | Low |
L-02 | No boundaries when setting values. | Low |
L-03 | Errors not used. | Low |
L-04 | Initialization can be frontrun. | Low |
L-05 | Do not use assert . |
Low |
L-06 | Missing array length check. | Low |
LinearBoostController.sol
is inherited from Ownable
contract, therefore it's possible for owner to use renounceOwnership
function and left the ownership.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/LinearBoostController.sol#L10
In RewardsInitiator.sol
:
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/RewardsInitiator.sol#L16
In RESDLTokenBridge.sol
:
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/ccip/RESDLTokenBridge.sol#L16
In SDLPoolCCIPController.sol
:
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/ccip/base/SDLPoolCCIPController.sol#L13-L13C67
Cosnider to override function and revert when owner try to call it.
There are some functions where variables can be set to any value due to there is no restriction to min/max bounds.
In LinearBoostController.sol
:
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/LinearBoostController.sol#L25-L26
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/LinearBoostController.sol#L46
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/LinearBoostController.sol#L57
In SDLPoolCCIPController.sol
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/ccip/base/SDLPoolCCIPController.sol#L130-L132
Consider to add min/max bounds to these funtions.
In SDLPool.sol
contracts some errors not used:
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/base/SDLPool.sol#L76
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/base/SDLPool.sol#L82-L83
In SDLPoolCCIPController.sol
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/ccip/base/SDLPoolCCIPController.sol#L30
Consider remove or use them.
__SDLPoolBase_init
function can be used by anyone, so it's possible for malicious user to frontrun contract initialization.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/base/SDLPool.sol#L93
In SDLPoolPrimary.sol
contract initialize
function also missing modifier and can be used by anyone.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/SDLPoolPrimary.sol#L30
In SDLPoolSecondary.sol
contract initialize
function missing modifier
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/SDLPoolSecondary.sol#L66
Add restriction so only
the owner
can use initialize function.
assert
.In versions of Solidity prior to 0.8.0, when encountering an assert all the remaining gas will be consumed. Even after solidity 0.8.0, the assert function is still not recommended, as described in the documentation.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/base/SDLPool.sol#L191
Consider to use require
or revert
with custom errors instead of assert
.
There is not check that array length in not equal to zero in checkUpkeep
function.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/RewardsInitiator.sol#L49
Add check that array length in not equal to zero as in performUpkeep
function.
accidentally renouncing ownership
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.