Understanding the Withdrawal Flow

This section describes the lifecycle of a withdrawal on the Layer1 platform, outlining the different statuses a transaction goes through from initiation, when it it first created by API request, to completion where the funds will have been deposited in the destination wallet address.

Withdrawal Status Table

A Withdrawal will go through a series of statuses in the deposit workflow, with each status denoting a specific process has occured:

StatusDescription
CreatedThe withdrawal request is first registered with the created status.
RejectedThe withdrawal is rejected if there are insufficient funds within the asset pool to action the withdrawal.
Funds_ReservedThe withdrawal has moved funds from the available balance to the reserved balance.
SignedThe withdrawal is signed and submitted to the blockchain
DetectedThe withdrawal has been detected and distributed on the blockchain, but does not yet have any confirmations.
FailedThe withdrawal failed due to an on-chain error has occurred during execution, could be multiple underlying reasons.
UnconfirmedThe withdrawal has had one or more blockchain confirmations, but has not yet reached the required confirmation limit.
ConfirmedThe withdrawal has reached the required confirmation limit and is not fully confirmed on the blockchain..
SuccessThe withdrawal is successful and the balance of the asset pool is updated to reflect this.

Withdrawal Flow Diagram

Describing the Withdrawal Flow

  1. A new transaction request is registered with status of CREATED and type of WITHDRAWAL.
  2. A check is made to see if asset pool contains sufficient funds to create the withdrawal.
    1. If NO the WITHDRAWAL moves to final state of REJECTED.
    2. If YES then the WITHDRAWAL proceeds with funds reservation.
  3. During funds reservation the funds to be sent will be moved from the available balance to the reserved balance of the source address or addresses. The state is updated to FUNDS_RESERVED.
  4. The WITHDRAWAL will undergo assembly and signing.
    1. If Signing does not get approved the WITHDRAWAL moves to final state of REJECTED.
    2. If signing is approved it is ready for blockchain submission and state is updated to SIGNED.
  5. The WITHDRAWAL is then submitted to the blockchain for processing. It is picked up by the blockchain monitoring logic and moves to a DETECTED state.
  6. The respective blockchain will process the transaction and include it in a new block. This blockchain transaction may contain errors if unsuccessful.
    1. If YES then the WITHDRAWAL is assigned FAILED as this action is irreversible.
    2. If NO the WITHDRAWAL status is updated to UNCONFIRMED and is monitored until desired confirmation threshold is reached. More on confirmation threshold in our FAQs.
  7. Once the required number of confirmations are reached the WITHDRAWAL is moved to CONFIRMED state.
  8. The reserved funds are released and available balance is updated to reflect the irrevocable blockchain fund movement. The WITHDRAWAL is now finalised and state is set to SUCCESS.

Now that you understand the different statuses and processes that a transaction goes through, you can issue your first withdrawal as shown in the next section.