stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: medium
Invalid

SDLPoolPrimary.delegatorPool can never be set

Summary

SDLPoolPrimary.migrate is broken because delegatorPool can never be set.

Vulnerability Details

Users can't migrate to new contract because delegatorPool address from which migration is done is always zero. Contract does not have function to explicitly set this address, insted it intended to be set in initialize function.

function initialize(...) public reinitializer(2) {
if (delegatorPool == address(0)) {
__SDLPoolBase_init(_name, _symbol, _sdlToken, _boostController);
} else {
delegatorPool = ccipController;
}
}

For delegatorPool pool to be set, it should not be zero, but initially it's zero. So else branch is never executed and pool is never set.

Impact

Migration to SDLPoolPrimary is broken and can't be executed.

Tools Used

Manual review

Recommendations

Add function to explicitly set delegatorPool or (i guess it's intended behavior) change if condition in initialize function to ccipController == address(0).

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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