# Unshielding Tokens

Unshielding is the process where funds are withdrawn from the RAILGUN privacy system to a public 0x address. Users can withdraw tokens out of RAILGUN by initiating an unshield interaction and inputting any 0x address. Under the hood, withdrawals are identical to a regular private send interaction in that they call the transact() function.

The only difference is that the zk-SNARK circuit outputs for withdrawals are unencrypted, and they contain a check to establish whether the interaction is flagged as a withdrawal or not. The check is contained in the unshield parameter. If unshield is non-zero, the transaction is confirmed as an unshield interaction, and the smart contract will check whether the hashed note matches the transaction hash output.

If all the inputs pass the ZK proof, the tokens are then sent to the unshield address, which is a public 0x address selected by the user.


---

# Agent Instructions: 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:

```
GET https://docs.railgun.org/wiki/learn/unshielding-tokens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
