# Withdrawal Lifecycle

{% stepper %}
{% step %}

### SourceTxDiscovered

This is the initial state of an operation, which is created when a deposit is discovered in a Hyperliquid block. A withdrawal is identified as a [Hyperliquid transfer](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#l1-spot-transfer) - greater than the [minimum](https://docs.hyperunit.xyz/developers/api/operations/deposit-lifecycle) for the source-chain - to a Unit withdrawal address.&#x20;

Once a sourceTx is discovered, the deposit operation goes through validation, which includes checks for [sanctioned addresses](https://docs.hyperunit.xyz/legal/regulatory-compliance).&#x20;
{% endstep %}

{% step %}

### WaitForSrcTxFinalization

Unit requires 5000 confirmations for a Hyperliquid withdrawal to be considered final.
{% endstep %}

{% step %}

### ReadyForWithdrawQueue

In accordance with throughput limitations of supported networks, destination transactions are staged on a withdraw queue to be triggered in batches. Like sweeps, withdraw queue transactions are triggered every \~3 Bitcoin blocks for bitcoin withdrawals, and \~21 Ethereum slots for ethereum withdrawals.

The operation's `positionInWithdrawQueue` may be used to inform the expected completion of this state.
{% endstep %}

{% step %}

### QueuedForWithdraw

The operation has been included in a withdraw queue batch, the tx-hash of which corresponds to the tx-hash returned by the [withdraw queue endpoint](https://docs.hyperunit.xyz/developers/api/withdraw-queue) and can be inspected on any explorer for the destination network.
{% endstep %}

{% step %}

### Done

The withdrawal is finalized on the destination network. The operation's state is officially "done" - this state is terminal.
{% endstep %}
{% endstepper %}

## ERC20 Withdrawals

{% stepper %}
{% step %}

### SourceTxDiscovered

This is the initial state of an operation, which is created when a deposit is discovered in a Hyperliquid block. A withdrawal is identified as a [Hyperliquid transfer](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#l1-spot-transfer) - greater than the [minimum](https://docs.hyperunit.xyz/developers/api/operations/deposit-lifecycle) for the source-chain - to a Unit withdrawal address.&#x20;

Once a sourceTx is discovered, the deposit operation goes through validation, which includes checks for [sanctioned addresses](https://docs.hyperunit.xyz/legal/regulatory-compliance).&#x20;

* **ENA: Please note, for ENA withdrawals there is a max withdrawal size of $20,000,000.** Any deposits larger than this will not be processed.
  {% endstep %}

{% step %}

### WaitForSrcTxFinalization

Unit requires 5000 confirmations for a Hyperliquid withdrawal to be considered final.
{% endstep %}

{% step %}

### WaitForSweep

Your tokens are being swept from your deposit address to an MPC address on the EVM.
{% endstep %}

{% step %}

### QueuedForSweep

The aforementioned sweep is being initiated.
{% endstep %}

{% step %}

### ReadyForWithdrawQueue

The guardians are preparing to submit the [Layerzero](https://docs.layerzero.network/v2/developers/evm/oft/quickstart#send---transfer-tokens) transaction releasing your tokens on Ethereum.
{% endstep %}

{% step %}

### QueuedForWithdraw

The aforementioned transaction has been initiated
{% endstep %}

{% step %}

### Done

The [Layerzero](https://docs.layerzero.network/v2/developers/evm/oft/quickstart#send---transfer-tokens) withdrawal has been initiated.  You may track the status of this deposit via the Layerzero [Scan](https://layerzeroscan.com/) explorer with your operation's [`DestinationTxHash`](https://docs.hyperunit.xyz/developers/api).
{% endstep %}
{% endstepper %}
