The withdraw function in the secondary chain will be reverted while the system is not synchronized with the primary chain
The user can stake sdl tokens on the secondary chain and these tokens will be queued using the sdlpoolSecondary::_queuewlock function, then the secondary chain sends the update of the new supply of tokens to the primary chain with the help of the function SDLPoolCCIPControllerSecondary::performUpkeep, finally the user can now execute the queued functions. On the other hand, the user can use the function SDLPoolSecondary::withdraw to be able to obtain the deposited tokens if they have not been locked.
The problem is that as long as the system is not updated (secondary chain <-> primary chain) the withdraw function will be reverted in certain circumstances. Please see the following test:
The user deposits 100 tokens and the secondary chain sends the new information to the primary chain.
The user deposits another 20 tokens however at this point the secondary chain does NOT send the new information to the primary chain.
The user tries to withdraw his 120 tokens however the withdraw function will be reverted due to an Arithmetic operation underflowed or overflowed error.
The user cannot obtain his deposited tokens in the secondary chain while the system is not updated between secondary chain and primary chain. There is no specification that the user CANNOT withdraw their tokens if the system is not updated, the user technically did not lock their tokens therefore they should be able to obtain all their tokens.
Manual review
Allow the user to get all their deposited tokens even if the chains are not synchronized.
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.