DEV Community

HarpoZK
HarpoZK

Posted on

πŸ”„ Harpo in Action: Private Transfers with Cryptographic Security

Last time we explored private swaps using ZK proofs β€” now let’s dive into another essential operation: wallet-to-wallet transfers, where N input UTXOs are transformed into 1 or 2 output UTXOs (transfer value + optional change).

This goes far beyond simple balance movement. It’s a cryptographically verified operation, with privacy guaranteed by zero-knowledge proofs (ZKPs) and auditable compliance.

βš™οΈ How does this transfer work?

Inputs and Outputs
Your assets are represented as UTXOs β€” like digital banknotes.
When transferring, you select N input UTXOs and generate:

1 output UTXO with the transferred value
1 change UTXO (optional)
All of this happens privately β€” without revealing the amount or recipient publicly.
Press enter or click to view image in full size

πŸ§ͺ Transaction Verifications

🌳 Existence Proof
Each UTXO is a commitment in the private Merkle Tree.
The ZKP proves the UTXO exists in the tree β€” without revealing which one.
The Merkle root is published on the public blockchain.

πŸ“œ Root History
Prevents fraud by ensuring the UTXO existed in a valid tree state recently.

πŸ”‘ Ownership Proof
Only the holder of the secret key can spend the UTXO.
This is proven via ZKP β€” without revealing the key.

βš–οΈ Mass Conservation
Sum of input values = sum of output values.
No tokens are created or destroyed.

🚫 Nullifier (Double-Spend Prevention)
Each spent UTXO generates a unique nullifier.
It’s published on the public chain.
Harpo checks if the nullifier has already been used before validating the transaction.

πŸ›‘οΈ Lock Verification
If a UTXO is blocked by an authority (e.g. regulatory reasons), it cannot be spent.
The ZK circuit enforces this in the proof.

πŸ“€ Auditing
Harpo enables selective auditability.
ZKPs ensure that data shared with authorities for compliance matches the original transaction β€” without revealing secrets.

βœ… If everything checks out…

Nullifiers are added to the public list to prevent reuse
New commitments are created in the Merkle Tree with updated balances
The transaction is recorded β€” with privacy for users and verifiability for regulators

πŸ” In Harpo, every transfer is a commitment to integrity and privacy.
Powered by UTXO architecture + ZK proofs + Merkle Trees + nullifiers

To see more πŸ‘‰click hereπŸ‘ˆ

Top comments (0)