When transferring a reSDLtoken from Primary Chain to Secondary Chain using RESDLTokenBridge::transferRESDL() this is the callpath:
But it never checks if SDLPoolCCIPControllerSecondary has enough SDL tokens to transfer to the Pool on the Secondary Chain.
Therefore, if a user tries to transfer a reSDLtoken from Primary Chain to Secondary Chain and the Secondary Chain doesn't have enough SDL tokens, the transfer will succeed on the Primary Chain but fail on the Secondary Chain and the user will lose his reSDLtoken since it will be deleted in the Primary Chain in SDLPoolPrimary::handleOutgoingRESDL()
Alice deposits 500 SDL tokens in the Pool on the Primary Chain
Alice receives 1 reSDLtoken with lock.amount = 500 SDL tokens
Alice wants to transfer her reSDLtoken to the Secondary Chain and calls RESDLTokenBridge::transferRESDL()
The tx succeeds on the Primary Chain and the reSDL token is deleted when SDLPoolPrimary::handleOutgoingRESDL() is called
SDLPoolCCIPControllerSecondary has 200 SDL tokens
CCIP forwards the message to the Secondary Chain and when SDLPoolCCIPControllerSecondary::handleIncomingRESDL() is called it will fail because the Controller on the Secondary Chain doesn't have enough SDL tokens to transfer to the SDLPoolSecondary and the reSDLtoken will be lost
Check if the Controller on the Secondary Chain has enough SDL tokens to transfer to the Pool on the Secondary Chain before deleting the reSDLtoken on the Primary Chain.
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.