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

# How Privatus Works

Privatus fuses a non-custodial Solana wallet with Privatus's on-chain programs, built directly on Token-2022 confidential balances, Solana's protocol-native confidential transfer extension. The result is an account where you keep your own keys, transactions settle on-chain in under a second, and the amounts moving through it are encrypted rather than broadcast to the world.

Addresses are never hidden. Amounts always are.

***

## The transfer flow

```
You initiate a transfer in the app
        ↓
Privatus's Privacy Engine encrypts the amount as a twisted ElGamal
  ciphertext and generates a ZK proof, client-side, on your device
        ↓
The encrypted amount and proof are submitted to Solana
  as a confidential transfer instruction on your token account
        ↓
Solana's native ZK proof program verifies the proof in the same
  transaction and the encrypted balances are updated
        ↓
Sender and receiver addresses are public.
  The transfer amount is ciphertext to everyone else.
        ↓
Only the sender and receiver, holding their decryption keys, can read the amount
        ↓
Transaction appears in both parties' feeds within a slot or two (~400ms each)
```

The proof that the encrypted amount is valid, meaning it doesn't overdraw the account and matches what was actually sent, is generated entirely on your device. Your unencrypted balance and transfer amounts never touch a Privatus server. Not once, not in transit, not at rest.

Privatus's own programs, written in Rust with Anchor, add everything the base primitive doesn't provide: `.privatus` handles, agent accounts, on-chain spend policies, fee logic, and selective disclosure.

***

## What's verified on-chain

Every transfer produces a Solana transaction containing:

* Sender and receiver addresses (base58)
* An encrypted amount, stored as a twisted ElGamal ciphertext by the Token-2022 confidential balance extension
* A zero-knowledge proof of transfer validity, checked by Solana's native ZK proof program
* A slot number and a base58 transaction signature

All of it is publicly queryable on any Solana explorer, such as Solscan. Anyone can confirm a transfer happened between two addresses. No one but the two parties can see how much moved. Verifiable to the world, readable only to you.

***

## What stays private

**Visible on-chain:** sender address, receiver address, the fact that a transfer occurred, the token type.

**Encrypted on-chain:** the transfer amount and the resulting account balances.

**Never visible to Privatus:** your account balance in plaintext, transfer amounts in plaintext, or decrypted transaction history, unless you explicitly generate a disclosure through the app for compliance purposes.

Privatus's servers route requests, render UI state, and index on-chain events. They don't hold your keys, and they don't see your balances in the clear. The same holds for the network itself: Solana has no central operator, blocks come from a globally distributed validator set, and because amounts are encrypted client-side, validators only ever order ciphertexts. Privacy here is architecture, not policy.

***

## Real-time indexing

On-chain events are indexed by Privatus's own indexing service, giving the app real-time transaction state without polling the chain directly. WebSocket connections push status changes, pending to confirmed, into your feed the instant they happen.

***

## Next

* [Account Types](/overview/account-types.md): understand the different kinds of Privatus accounts
* [Confidential Transfers Explained](/privacy-and-confidential-transfers/confidential-transfers.md): a deeper look at the cryptography


---

# 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.useprivatus.com/overview/how-privatus-works.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.
