> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

# Concepts

Understand the core ideas behind Midnight, including confidentiality with zero-knowledge proofs, contracts, and verifiable computation.

**Core concepts cover these terms**

| Concept                       | Explanation                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Who interacts**             | **Accounts** define who participates on Midnight. They manage keys, addresses, and authorization. This shows *who acts in the system*.                                                                                                                                                                                                                                                   |
| **Where data lives**          | **Ledgers** store state. Public ledger state is on chain and anyone can read it. Private state stays with you, on your machine. The chain sees proofs and commitments in its place, plus any values you disclose. See [On-chain visibility](https://docs.midnight.network/guides/security-best-practices.md#on-chain-visibility). This shows *where state is stored and who can see it*. |
| **How value moves**           | **The UTXO model** defines spendable pieces of value or state. Midnight extends this model with private state elements. This shows *how value flows through the system*.                                                                                                                                                                                                                 |
| **How apps connect**          | **Web3** explains how wallets, connectors, and dApps communicate with contracts. This shows *how users and applications interact with Midnight*.                                                                                                                                                                                                                                         |
| **How privacy is enforced**   | **Zero-knowledge proofs** verify correctness without exposing sensitive data. This shows *how private actions stay verifiable*.                                                                                                                                                                                                                                                          |
| **How computation is proved** | **Kachina** is Midnight’s proving system. It converts private computation into verifiable proofs. This shows *how we trust execution we cannot see*.                                                                                                                                                                                                                                     |
| **How it all comes together** | **ZSwap** applies these concepts in practice. It uses private state, proofs, and confidential execution. This shows *how a real private dApp works end-to-end*.                                                                                                                                                                                                                          |

### [Accounts](https://docs.midnight.network/concepts/account.md)

Learn how Midnight accounts, addresses, and keys relate to each other.

[Read →](https://docs.midnight.network/concepts/account.md)

### [Ledgers](https://docs.midnight.network/concepts/ledgers.md)

Compare the UTXO and account models and see how Midnight uses each for tokens.

[Read →](https://docs.midnight.network/concepts/ledgers.md)

### [UTXO model](https://docs.midnight.network/concepts/utxo.md)

Review how UTXOs represent value and how Midnight extends the model.

[Read →](https://docs.midnight.network/concepts/utxo.md)

### [Web3](https://docs.midnight.network/concepts/web3.md)

Understand how Midnight fits into wallets, dApps, and existing tooling.

[Read →](https://docs.midnight.network/concepts/web3.md)

### [Zero-knowledge proofs](https://docs.midnight.network/concepts/zero-knowledge-proofs.md)

Understand how ZK proofs protect data while proving correctness.

[Read →](https://docs.midnight.network/concepts/zero-knowledge-proofs.md)

### [Kachina](https://docs.midnight.network/concepts/kachina.md)

Learn about the proving system that powers Midnight’s confidential computation.

[Read →](https://docs.midnight.network/concepts/kachina.md)

### [ZSwap](https://docs.midnight.network/concepts/zswap.md)

See how confidential swaps preserve privacy while enabling efficient exchange.

[Read →](https://docs.midnight.network/concepts/zswap.md)

***

Midnight uses zero-knowledge proofs to keep sensitive data private while still verifying contract logic. Its smart contracts combine public on-chain state with private state that stays on your machine, reducing transaction correlation and supporting secure, confidential on-chain atomic swaps of tokens and metadata.

### [Learn the building blocks](https://docs.midnight.network/concepts/how-midnight-works/building-blocks.md)

Review circuits, ledgers, and assignments that form Midnight’s foundation.

[Explore →](https://docs.midnight.network/concepts/how-midnight-works/building-blocks.md)

### [Explore Compact contracts](https://docs.midnight.network/concepts/how-midnight-works/smart-contracts.md)

See how Compact defines confidential logic and interacts with verified data.

[Open →](https://docs.midnight.network/concepts/how-midnight-works/smart-contracts.md)

### [Keep data private](https://docs.midnight.network/concepts/how-midnight-works/keeping-data-private.md)

Learn the patterns that restrict data visibility to authorized participants.

[Learn →](https://docs.midnight.network/concepts/how-midnight-works/keeping-data-private.md)

### [Understand Compact semantics](https://docs.midnight.network/concepts/how-midnight-works/semantics.md)

Trace how the runtime enforces rules over public and private data.

[Read →](https://docs.midnight.network/concepts/how-midnight-works/semantics.md)

### [Examine ZSwap](https://docs.midnight.network/concepts/how-midnight-works/zswap.md)

See how confidential swaps maintain privacy and efficiency.

[See →](https://docs.midnight.network/concepts/how-midnight-works/zswap.md)

### [Assess the impact](https://docs.midnight.network/concepts/how-midnight-works/impact.md)

Consider how privacy-preserving computation changes decentralized systems.

[Assess →](https://docs.midnight.network/concepts/how-midnight-works/impact.md)
