The 'sendToL1' function within the L1BossBridge contract allows for the withdrawal of Ether from L2 to L1 using signature verification and designated parameters. The submission primarily focuses on assessing the potential reentrancy risks associated with the function's design and execution.
The function performs the following steps:
Verifies the signature by recovering the signer's address using ECDSA.
Checks if the signer is authorized.
Decodes the input data containing the target address, value, and data for the call.
Calls the target address with the specified value and data.
The critical section for potential reentrancy is after the signer verification, during the external call to the 'target'. Although the function itself includes a 'nonReentrant' modifier and a 'whenNotPaused' check, the external call to 'target' could be vulnerable to reentrancy if the target contract interacts with the current contract or triggers calls back to it. This interaction might lead to unexpected behavior if not handled carefully.
The impact of a reentrancy attack could result in unauthorized access to the contract's state or funds, potentially leading to loss or manipulation of Ether and contract state.
Manual inspection
Review the code for possible loopholes and ensure extra security measures are in place.
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.