Forced Transaction Inclusion
As layer-2 (L2) technologies host an increasing number of digital assets, ensuring the security of your assets in the event of an L2 security incident has become a critical concern. A robust L2 requires the ability to force L2 assets to be extracted at layer 1 (L1) in case of unforeseen circumstances (e.g., downtime or misbehavior of sequencers and proposers, etc.), which is referred to as an Escape Hatch.
Censorship resistance is a crucial security feature, especially concerning the sequencer in the system. In situations where the sequencer refuses to execute your transaction requests or experiences prolonged downtime, a mechanism known as forced withdrawal or forced transaction inclusion becomes essential to better safeguard user funds.
Handling The Sequencer Downtime/Misbehavior
In the event of the sequencer downtime (with valid verifiers and proposer nodes), the L2 will be unable to produce blocks, rendering all user actions on L2 non-executable. To ensure the security of user L2 assets, Mantle has implemented a process for executing forced withdrawal transactions on L1:
- Users need to construct a
Depositand obtain its hash for subsequent proof and completion of the transfer message.
- Construct a
crossDomainMessengerinstance on L1, specifying the contract details for L1 and L2.
- Users must wait for the message status to become
READY_TO_PROVE, typically requiring around 4 minutes.
- Submit the withdrawal proof, and wait for the status change again. After approximately 7 days, when the status becomes
READY_TO_RELAY, users can finalize the message. For detailed steps, please refer to the tutorial.