> For the complete documentation index, see [llms.txt](https://docs.tanx.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tanx.fi/tech/tech-docupaper/transactional-flow/the-withdrawal-flow.md).

# The withdrawal flow

<figure><img src="/files/OmCX28gSEUiJ3ljsnpM6" alt=""><figcaption><p>Withdrawal flow architecture</p></figcaption></figure>

Before withdrawal can occur, Starkware requires transferring the funds from your tanX User vault to another off-chain vault that is identified with the same user’s Ethereum address instead of their Stark key.

The `add_transaction` API with the `TransferRequest` transaction type registers the Ethereum address.

You can enable registration in your off-chain application’s logic in one of the following ways:

* Your user enters a request to transfer the funds from the vault with their Stark key to a vault that they identify with their Ethereum address.
* When your application prompts the user for the information required to send a `WithdrawalRequest` transaction to the Starkware gateway, it also prompts them to enter the parameters necessary to execute a `TransferRequest` transaction, and your application executes the transfer as a seamless step in the withdrawal process.

The basic withdrawal flow takes place as detailed here, as tanX transfers the funds to the user in a trust-less way.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tanx.fi/tech/tech-docupaper/transactional-flow/the-withdrawal-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
