GitHub - OKX Proof of Reserves V2: Technical Deep Dive

·

Background

OKX has launched its Proof of Reserves (PoR) initiative to enhance asset security and transparency for users. This system enables independent audits of OKX's reserves, ensuring they exceed user liabilities and confirming the exchange’s solvency.

👉 Learn how Proof of Reserves protects your crypto assets


Technical Specifications

The PoR V2 leverages Zero-Knowledge (ZK) Merkle Sum Tree technology, built with Plonky2, to enable privacy-preserving verification of user assets. Key features:


How to Run the Proof of Reserves System

1. Generate Test Data

file_num=10  
per_file_account_num=131072  # Must be a multiple of 1024  
python3 scripts/gen_test_data.py ${file_num} ${per_file_account_num}  

2. Generate Proofs

sed -i '' 's|/opt/data/zkpor/users/|test-data/user-data|g' config/local.toml  
cargo run --release --package zk-por-cli --bin zk-por-cli prove --cfg-path config --output-path ./test-data/proof  

3. Verify Proofs

👉 Explore advanced ZK-proof techniques


CLI Tool

Run ./target/release/zk-por-cli --help for command options.


Code Coverage & Docker


FAQs

1. What is Proof of Reserves (PoR)?

PoR is a cryptographic method to verify an exchange holds sufficient reserves to cover all user deposits.

2. How does ZK technology protect privacy?

Zero-knowledge proofs allow verification without revealing individual account details.

3. Why use Merkle Sum Trees?

They enable efficient aggregation of balances while maintaining cryptographic proof integrity.

4. How long does verification take?

Global proof verification varies by system resources (3–30 minutes).

5. Can I audit OKX’s reserves independently?

Yes, the open-source PoR V2 toolkit allows self-verification.

6. Is Docker required to run PoR?

No, but Docker simplifies environment setup.