zkopru
Getting started🔗 Source code
1.0.0
1.0.0
  • What is zkopru?
  • Getting started
    • Install CLI
    • Deposit
    • Transfer
    • Withdraw
    • Configure Coordinator
    • [WIP] Atomic swap
    • [WIP] Migration
  • How it works
    • Burn Auction
    • Transaction
    • Block structure & serialization
    • Account
    • UTXO
    • Encrypted memo field
    • Atomic swap
    • Grove: Merkle trees of zkopru
    • Merged leaves & optimistic rollup
    • Mass deposit
    • Mass migration
    • Instant withdrawal
  • Roadmap
  • RPC API
Powered by GitBook
On this page

Was this helpful?

  1. How it works

UTXO

UTXOs include the following properties.

Property

Description

Ether

The amount of ETH

Public Key

A Babyjubjub point of the note owner

Salt

Random salt. Zkopru generates UTXO hash using this salt.

Token Address (Optional)

The address of the token contract when it includes ERC20 or ERC721. The default value is 0.

ERC20 Amount (Optional)

The amount of the ERC20 token when it includes ERC20. The default value is 0.

NFT Id (Optional)

The id of the ERC721 token when it includes ERC721. The default value is 0.

And then Zkopru computes the leaf hash with Poseidon hash:

var intermediate_hash = poseidon(ether, pub_key.x, pub_key.y, salt)
var result_hash = poseidon(intemediate_hash, token_address, erc20, nft)
PreviousAccountNextEncrypted memo field

Last updated 4 years ago

Was this helpful?