Cancelling a deposit

To ensure self-custody, StarkGate enables you to cancel a deposit if, after depositing funds with the deposit function on L1, you don’t see your funds appear on L2 within a reasonable amount of time.

You can only cancel a deposit that you yourself deposited.

In order to guard against an attack, it takes approximately five days to cancel a deposit. From the moment StarkGate receives the cancellation request, a counter begins. When exactly five days have passed, and the funds still do not appear on L2, you can reclaim the deposit.

Procedure
  1. To cancel a deposit, call the depositCancelRequest request function.

    When StarkGate receives the cancellation request, a counter begins to count five days.

  2. When exactly five days have passed, and the funds still do not appear on L2, you can reclaim the deposit by calling depositReclaim.

As long as the depositReclaim was not performed, the deposit may be processed, even if the cancellation delay time has already passed.

Only the depositor is allowed to cancel a deposit, and only before depositReclaim was performed.

Additional resources