Improperly implemented "initializer" function in SDLPoolPrimary
leaves address delegatorPool
state variable uninitialized, which results in all calls toSDLPoolPrimary.migrate
revert.
SDLPoolPrimary.migrate
function used to migrate SDL
tokens from deprecated DelegatorPool
to new SDLPoolPrimary
:
As we can see at line 269, this function is expected to be called only by delegatorPool
, which is a state variable in SDLPoolPrimary
, and can be update only in the initialize
function:
When SDLPoolPrimary
will be deployed and initialize
called, delegatorPool
will be address(0)
(since for the storage, it's a new variable introduced in this update), and the initializer will just call __SDLPoolBase_init
, leaving delegatorPool
empty.
This basically leaves delegatorPool
variable uninitialized and blocks all calls to migrate
.
This problem likely introduced due to SDLPoolPrimary.delegatorPool
variable previously was in SDLPool.delegatorPool
, and now SDLPool.delegatorPool
renamed to SDLPool.ccipController
, so this renaming resulted to a confusion in the initialize
implementation.
Users will not be able to migrate their stSDL
tokens to reSDL
as stated in StakeLink FAQ:
Upon release of reSDL, users will be required to migrate stSDL (staked SDL) to reSDL. Users are not required to lock the reSDL, and may immediately withdraw to SDL.
It's not completely clear how exactly the deployment process for this upgrade will looks like (because deploy scripts for new functionality not provided in the repo), but delegatorPool
definitely should be set without any conditionals.
My assumption is that SDLPool.ccipController
variable (which currently holds previous value for delegatorPool
) will be updated after SDLPoolPrimary
created(and initialized), so that SDLPoolPrimary
can use the old value from ccipController
during initialization to set delegatorPool
. So a simplified fix might look like this:
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.