# Custodial vs. Non-Custodial

BitTap Wallet is a non-custodial wallet, which is most likely the world's first non-custodial wallet for Taproot Assets. To understand what issue BitTap wallet solves, let's see following three ways in which secret keys are managed.

## Self-Hosted Mode

<figure><img src="/files/hLwV22EleenaVgXzpCaS" alt=""><figcaption><p>Self-Hosted mode for Taproot Assets</p></figcaption></figure>

In self-hosted mode, users set up their own LND and Tapd nodes, and the secret keys for both BTC and Taproot Assets are generated and managed by LND. Because the LND node is controlled by users themselves, there are no security issues concerning keys. This is actually the decentralized approach of Lightning Network, but the requirements for users are very high.

## Custodial Mode

<figure><img src="/files/v0e0mK7gyRgW1jnUzrDM" alt=""><figcaption><p>Custodial mode  for Taproot Assets</p></figcaption></figure>

Given that the vast majority of users do not have the ability to setup their own nodes and can only use service providers, this is the custodial mode, which is currently the most commonly used solution in the Taproot Assets ecosystem.&#x20;

In custodial mode, numerous users connect to the Tapd and LND nodes of the service provider, and all secret keys are generated and managed by the LND nodes of the service provider. It is an absolutely centralized operation mode, and once the service provider encounters problems, users' assets will face significant risks.

## Non-Custodial Mode

<figure><img src="/files/SppBuJ8GrNrt65UZNuW5" alt=""><figcaption><p>Non-Custodial mode  for Taproot Assets</p></figcaption></figure>

BitTap wallet is implemented in a decentralized approach, in which users still use the service provider's Tapd and LND nodes, but the generation and management of secret keys are on the user's wallet side, not by LND like the other modes do. Users' private keys will not go out of the wallet, and users will only send the signed data back to the service provider to complete transactions.&#x20;

The non-custodial wallet implemented by BitTap can greatly improve the security of users holding Taproot Assets. See the [BitTap technical architecture](/dex-product/overview.md#architecture) for how we do it.


---

# 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://doc.bittap.org/wallet-product/custodial-vs.-non-custodial.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.
