👨🏾💻 Dev corner: how proof of reserves works (and what it can't prove)
Binance published a new proof-of-reserves snapshot on Nov 12, so here's what happens under the hood.
Step 1: Count what users are owed (a Merkle tree)
🔹 Each user's balance is hashed together with a private ID to make a "leaf"
🔹 Leaves are hashed in pairs, level by level, until one final hash is left: the Merkle root
🔹 You get your leaf plus the path of hashes. If they rebuild to the published root, your balance was counted. Change one balance and the root changes
Step 2: Show the assets
🔹 The exchange shows it controls on-chain wallets holding at least as much as the total owed
Step 3: Zero-knowledge proof
🔹 A zk-SNARK proves the totals add up and that no account was slipped in with a negative balance, without revealing anyone's balance. This is the part Binance said was still being generated
What proof of reserves can't show:
🔹 Debts or obligations that sit outside the tree
🔹 What happens after the snapshot. It's one moment in time
🔹 Whether some assets were borrowed just for the snapshot
Have you ever checked your own balance in a proof-of-reserves tool? 👇
📷 Photo: Myles Bloomfield / Unsplash
Binance published a new proof-of-reserves snapshot on Nov 12, so here's what happens under the hood.
Step 1: Count what users are owed (a Merkle tree)
🔹 Each user's balance is hashed together with a private ID to make a "leaf"
🔹 Leaves are hashed in pairs, level by level, until one final hash is left: the Merkle root
🔹 You get your leaf plus the path of hashes. If they rebuild to the published root, your balance was counted. Change one balance and the root changes
Step 2: Show the assets
🔹 The exchange shows it controls on-chain wallets holding at least as much as the total owed
Step 3: Zero-knowledge proof
🔹 A zk-SNARK proves the totals add up and that no account was slipped in with a negative balance, without revealing anyone's balance. This is the part Binance said was still being generated
What proof of reserves can't show:
🔹 Debts or obligations that sit outside the tree
🔹 What happens after the snapshot. It's one moment in time
🔹 Whether some assets were borrowed just for the snapshot
Have you ever checked your own balance in a proof-of-reserves tool? 👇
📷 Photo: Myles Bloomfield / Unsplash
