# Withdraw expired

Source: https://docs.settlemint.com/docs/operators/system-addons/xvp-settlement/actions/withdraw-expired
Withdraw assets from an expired XvP settlement after the cutoff date passes and
the settlement has not executed or been cancelled.




When an XvP settlement reaches its cutoff date without execution, locked local assets stay in the settlement contract until withdrawal runs.

Withdrawing from an expired settlement returns those assets to the original senders. Withdrawal does not send assets to the intended recipients, execute the exchange, or cancel it.

## When withdrawal is available [#when-withdrawal-is-available]

Withdrawal is available after all of these conditions are true:

* The cutoff date has passed.
* The settlement has not executed.
* The settlement has not been cancelled.
* Expired withdrawal has not already run for the settlement.

<Callout type="info" title="Anyone can submit the withdrawal">
  The withdrawal transaction has no participant-only caller restriction. A sender, operator, or relayer can submit it.
  The refunded assets still return to the original senders.
</Callout>

## Before you start [#before-you-start]

Check the settlement detail page before withdrawing:

* The settlement status is **Expired**.
* The locked local flows are the assets that should return to senders.
* You can complete wallet verification for the account submitting the transaction.
* If you are using the console, you are signed in with a wallet that approved and locked assets for the settlement.

For HTLC settlements, also check each chain involved in the external flow. Expiry and withdrawal on one chain do not recover assets from another chain.

## Withdraw expired assets in the console [#withdraw-expired-assets-in-the-console]

<Steps>
  <Step>
    ### Open the expired settlement [#open-the-expired-settlement]

    Navigate to **Settlements**, open the settlement, and confirm that the status is **Expired**.
  </Step>

  <Step>
    ### Start the withdrawal [#start-the-withdrawal]

    Open **Manage** and select **Withdraw assets**. The confirmation dialog explains that the settlement has expired and that locked assets return to their original senders.
  </Step>

  <Step>
    ### Verify and submit [#verify-and-submit]

    Complete the wallet verification prompt. After you submit, DALP queues the transaction that calls the settlement contract's expired-withdrawal operation.
  </Step>

  <Step>
    ### Confirm the result [#confirm-the-result]

    After the transaction is mined and indexed, refresh the settlement detail page. The locked local assets should no longer remain in the settlement contract, and the settlement cannot be withdrawn again.
  </Step>
</Steps>

## What the transaction does [#what-the-transaction-does]

| Behaviour                       | Result                                                                               |
| ------------------------------- | ------------------------------------------------------------------------------------ |
| Refunds locked assets           | All escrowed local assets return to their original senders in one contract call.     |
| Keeps the settlement unexecuted | Recipients do not receive assets because the settlement did not execute.             |
| Marks withdrawal as processed   | A second withdrawal attempt fails because the settlement has already been withdrawn. |
| Leaves cancellation separate    | Expired withdrawal does not mark the settlement as cancelled.                        |
| Emits an on-chain event         | The contract records the account that submitted the withdrawal transaction.          |

The API path uses the same contract operation as the console. It queues the transaction and returns its transaction hash after submission.

## Common expiry cases [#common-expiry-cases]

### A local settlement expires [#a-local-settlement-expires]

If a local sender approved and locked assets but the settlement did not execute before the cutoff date, expired withdrawal returns the locked assets to the sender. If no assets were locked, there is nothing to refund for that flow.

### An HTLC settlement expires [#an-htlc-settlement-expires]

If an HTLC settlement reaches its cutoff date before execution, the local chain can refund the assets locked in that settlement contract. External contracts and other chains are separate systems, so check and recover each side independently.

<Callout type="warn" title="Check external settlement legs separately">
  DALP cannot recover assets from an external HTLC just because the local DALP settlement expired. Use the controls for
  each chain or external contract involved in the exchange.
</Callout>

## Troubleshooting [#troubleshooting]

| Issue                                         | What to check                                                                                                                                                                                                                              |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Withdraw assets** is not visible            | In the console, confirm the settlement is **Expired**, the page is refreshed, and your signed-in wallet approved and locked assets. Non-sender operators can submit the same expired-withdrawal operation through API or contract tooling. |
| The API says the settlement is not expired    | The cutoff date has not passed on-chain yet. Wait until the chain timestamp is past the cutoff date.                                                                                                                                       |
| The API says withdrawal was already processed | Expired withdrawal can run once per settlement. Check the settlement history and sender balances.                                                                                                                                          |
| The transaction fails after submission        | Check whether another account submitted the withdrawal first, or whether the settlement was executed or cancelled before your transaction mined.                                                                                           |
| HTLC assets still appear on another chain     | Recover that external leg with the controls for that chain or contract. Local DALP expiry does not process external contracts.                                                                                                             |

## Next steps [#next-steps]

<Cards>
  <Card title="Create settlement" href="/docs/operators/system-addons/xvp-settlement/actions/create">
    Create a new settlement if the parties want to retry the exchange.
  </Card>

  <Card title="HTLC explained" href="/docs/operators/system-addons/xvp-settlement/htlc/htlc-explained">
    Understand how local and external HTLC settlement legs interact.
  </Card>
</Cards>

## Related [#related]

* [XvP settlement overview](/docs/operators/system-addons/xvp-settlement/overview)
* [HTLC explained](/docs/operators/system-addons/xvp-settlement/htlc/htlc-explained)
* [Cancel local settlements](/docs/operators/system-addons/xvp-settlement/actions/cancel/local-settlements)
