> For the complete documentation index, see [llms.txt](https://ciphera.gitbook.io/zerosats-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ciphera.gitbook.io/zerosats-docs/welcome-to-zerosats/how-zerosats-works.md).

# How Zerosats works

Zerosats' UX is similar to bitcoin-denominated Chaumian Ecash protocols, but uses an entirely different architecture.

## Separating custody from the operator

In short, Zerosats seeks to provide a new way to facilitate bitcoin payments. It has stronger privacy guarantees than emerging bitcoin L2s and offers different custody tradeoffs when compared to Chaumian Ecash protocols.

In Chaumian Ecash protocols, users exchange bitcoin-backed ecash notes within the confines of a mint. They may do this because, through the use of blind signatures, transactions have higher levels of privacy than standard bitcoin transactions. The key tradeoff is that users give up custody of their funds to the mint operator.&#x20;

{% hint style="info" %}
There is some work being done on running mints inside of TEEs and delegating mint operations in the Ecash ecosystem. This would “remove” the human operator so-to-speak. There is also work to potentially see delegate operators have the ability to honor mint withdrawals if the primary operator (running in a TEE hopefully) goes offline. This of course still comes with trust assumptions, but noting this work as our main goal was to separate the "human(s)" custodians of bitcoin from the operator/coordinator. This work arguably does the same.
{% endhint %}

Emerging bitcoin L2s have attempted to provide a different way to process offchain, bitcoin payments; namely via the statechain and ark paradigms. However, these solutions do not provide any privacy improvements over onchain bitcoin transactions. And, they are centrally coordinated - meaning a single operator has access to every transaction a specific user has ever executed on a given network.

{% hint style="info" %}
Different L2 systems have varying levels of privacy. For example, some protocols hide transactions from the public, but have access to the logs themselves. Others are fully public.
{% endhint %}

Zerosats sits in the middle of these protocols on the custody tradeoff spectrum. The Zerosats operator does not custody bitcoin backing Zerosats notes. It rolls this trust assumption up to a bitcoin rollup. Related to privacy, it has extremely strong guarantees. External observers, and the operator itself, cannot discern who is transacting in the protocol or how much they're exchanging.

Our goal is simple: **We do not want to custody user funds and we want to know nothing about our users and their transactions**. These principles are the driving force behind our design decisions.

### How you can use Zerosats <a href="#what-happens-when-you-use-fedimint" id="what-happens-when-you-use-fedimint"></a>

#### Spin up a wallet <a href="#depositing-bitcoin" id="depositing-bitcoin"></a>

Users can interact with Zerosats by using our browser wallet. They can also build the CLI wallet from source.

#### Depositing bitcoin <a href="#depositing-bitcoin" id="depositing-bitcoin"></a>

To acquire bitcoin-backed notes on Zerosats, you can perform a Lightning swap. This will take bitcoin, swap it into the Zerosats contract via the Lightning network, and then mint you your corresponding bitcoin-backed notes.

Users can also receive payment links from users within Zerosats.

#### Private transactions <a href="#transacting" id="transacting"></a>

You can send Zerosats notes directly to other users in the network. These transactions are instant and privacy-preserving.

#### Lightning payments <a href="#lightning-payments" id="lightning-payments"></a>

Users can pay Lightning invoices directly from the shielded network via our Lightning gateway.

### Privacy <a href="#what-the-guardians-see-and-dont-see" id="what-the-guardians-see-and-dont-see"></a>

The Zerosats operator, and public observers, are aware of:

* The **total amount** of (Citrea) bitcoin held in the Zerosats smart contract.

They are entirely **unaware** of:

* Everything else, including:
  * Users' **individual balances** (how many notes anyone holds).
  * **Identities** of users participating in individual transactions.
  * The total amount of bitcoin being exchanged in given transactions (except for Lightning payments, which leak this data during the swap).
