> For the complete documentation index, see [llms.txt](https://thias-organization.gitbook.io/p256-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thias-organization.gitbook.io/p256-documentation/zero-knowledge-proofs/uses-of-zkps-in-blockchain.md).

# Uses of ZKPs in Blockchain

Examples of how ZKPs can be used

## Privacy Preserving Transactions

Traditional blockchain transactions can reveal sender, receiver, and transaction amount. ZKPs can allow users to prove the validity of a transaction without revealing these details, enhancing user privacy on the platform.

> Alice sends Bob cryptocurrency using a ZKP to prove she has sufficient funds without revealing her account balance.

## Smart Contracts

Smart contracts are self-executing contracts stored on the blockchain. ZKPs can be used to ensure that smart contracts are executed correctly without revealing the underlying logic of the contract. This can improve the security and trust in DeFi (Decentralized Finance) applications.

> A ZKP proves a DeFi loan meets all the eligibility criteria without revealing the borrower's specific details.

## Scalability Improvements

Blockchain networks like Ethereum can suffer from scalability issues during periods of high traffic. ZKPs can help by reducing the amount of data stored on the blockchain for each transaction (via Rollups), making the network more efficient and scalable.

> A Layer 2 network utilises zkSNARKs to bundle multiple transactions into a single proof, reducing the load on the main blockchain.

*zkSNARKs are more commonly used here due to their smaller proof size*

## Identity Verification

ZKPs can be used for identity verification without revealing any personal information beyond confirmation that someone meets specific criteria (e.g., being above 18 years old). This can be helpful for KYC (Know Your Customer) compliance on exchanges or platforms.

> A user proves they are over 18 using a ZKP to access age-restricted content on a platform without revealing their date of birth.

*zkSNARKs are preferred for smaller data points like age verification*
