Function: withdraw(byte[] payload)
This allows to send a message to withdraw funds from the ARBITRUM chain. The message can trigger one of these functions: withdraw, withdrawAndBridge, or withdrawSwapAndBridge.
Inputs
payloadConstraints: No verifications.
Impact: It contains all the necessary data for withdrawal:
funcSelector,bridgeId, receiver, ID (the ID for the epoch being withdraw from), andvaultAddress. Also can contain data for swap ---swapId,toAmountMin,dexId,toToken, andfee--- and for bridging:maxSlippagein case of_bridgeWithCeler,maxSlippageandbonderFeein case of_bridgeWithHop. The receiver address will be changed to themsg.senderaddress.
Function call analysis
ILayerZeroRouter(layerZeroRouter).sendWhat is controllable?
payload.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? Can revert in case of unpaid fee.