Merkle Sum Tree
A tree that also carries running totals, used to prove reserves without exposing individual balances.
Basically
A Merkle sum tree lets an exchange prove the total it owes customers and show that your balance is included. You can check it without seeing other users' data, but the exchange must separately prove it owns enough assets.
Key Takeaways
- A Merkle sum tree adds a running sum of values to each node alongside its hash. This lets you prove cryptographically that a specific balance forms part of a known total.
- Exchanges use Merkle sum trees for proof of reserves. The root shows total liabilities, you can verify your own balance, and the exchange separately proves it holds assets greater than or equal to that total.
- Adoption spread after the FTX collapse in November 2022. Vitalik Buterin proposed combining Merkle sum trees with zero-knowledge proofs to stop exchanges hiding negative balances or leaving users out.
What Is a Merkle Sum Tree?
A Merkle sum tree adds cumulative value sums to every node in a standard Merkle tree. Each internal node in a regular Merkle tree stores only a hash of its children, while each internal node in a Merkle sum tree stores both a hash and the sum of all values in its subtree. The root therefore contains a hash that commits to every entry and a total sum representing the aggregate value of all leaves.
Gregory Maxwell first proposed the concept in 2013 so Bitcoin exchanges could prove they held enough funds to cover all customer deposits. Before Merkle sum trees, verifying an exchange's solvency meant trusting a third-party auditor. The structure lets you independently verify that your balance is included in the exchange's reported total liabilities without seeing any other user's data.
The collapse of FTX in November 2022 made the structure a focal point for the cryptocurrency industry. Vitalik Buterin published a widely cited proposal arguing that every centralised exchange should adopt Merkle sum tree-based proof of reserves, combined with zero-knowledge proofs to address the structure's known limitations.
Tree Construction
Tree construction starts at the leaves and moves upwards, as in a standard Merkle tree. The key difference is that each node carries both a cryptographic hash and a numeric sum.
Generating an Inclusion Proof
A Merkle proof in a sum tree works like a standard Merkle proof but includes the sum values at each sibling node. Alice's 30-unit balance can be proved as part of the 150-unit total:
The proof is O(log n) in size: for a tree with one million users, it requires only about 20 sibling nodes. You can verify your proof independently without seeing any other user's balance.
Combining with Proof of Assets
A Merkle sum tree proves liabilities, meaning what the exchange owes users, but solvency also requires proof of assets. The exchange must demonstrate that it controls on-chain funds at least equal to the root sum. Common approaches include:
Proof of liabilities through a Merkle sum tree and proof of assets through on-chain verification together form a proof of solvency. The exchange can then demonstrate that its assets exceed its obligations.
Why It Matters
Before Merkle sum trees, you had no way to verify independently that an exchange held sufficient reserves. Traditional financial audits happen periodically, involve trusted third parties and provide only a point-in-time snapshot. The FTX collapse revealed that even major exchanges could misrepresent their financial position for extended periods, with customer funds being diverted to related entities.
Merkle sum trees shift trust from auditors to cryptographic verification. You can check your own inclusion at any time, and the published root sum makes total liabilities transparent. The structure is not a complete solution on its own (see limitations below), but it is a significant improvement over opaque, trust-based systems.
Proof of reserves gives the wider cryptocurrency ecosystem confidence that centralised custodians are not fractionally reserving customer assets. The approach is particularly relevant for stablecoin issuers and centralised exchanges that hold significant user funds. The stablecoin proof of reserves evolution research article provides a deeper analysis of how stablecoin issuers approach reserve transparency.
Exchange Proof of Reserves
Binance, OKX, Kraken, Bitget, and Gate.io adopted Merkle sum tree-based proof of reserves after FTX's collapse in November 2022, publishing tree roots and individual verification tools. You can look up your leaf in the tree and verify that your balance is included in the reported total. Some exchanges publish regular attestation reports, monthly or quarterly, with updated tree roots.
Stablecoin Reserve Verification
Fiat-backed stablecoin issuers can use Merkle sum trees to prove that total token supply matches reserve holdings. Most stablecoin attestations today rely on accounting firms, but on-chain Merkle sum tree commitments could enable real-time, user-verifiable reserve checks without depending on periodic audits.
Custodial Wallet Providers
Any service that holds assets on behalf of users can use Merkle sum trees to prove solvency, including custodial wallets, lending platforms, and cryptocurrency brokerages. Self-custodial users avoid this concern entirely because they hold their own keys, so there is no counterparty whose solvency needs verification. Layer-2 protocols like Spark provide self-custodial ownership while maintaining the convenience of instant, low-cost transfers.
Data Integrity in Financial Systems
Merkle sum trees also have applications beyond cryptocurrency in any system that needs to prove aggregate values are consistent with individual entries. Regulatory reporting, fund accounting, and supply chain finance can all benefit from cryptographic commitment to itemised totals.
Negative Balance Attacks
A dishonest exchange can insert fake accounts with negative balances into the tree, artificially reducing the root sum and total reported liabilities. If real liabilities total 1,000 BTC, the exchange could add a fake leaf with a balance of -200 BTC, making the root sum appear as 800 BTC. The exchange could then pass a solvency check while actually being insolvent.
The fix requires proving that every leaf balance is non-negative. Zero-knowledge proofs provide this capability: a zk-SNARK can prove that all balances in the tree are non-negative without revealing the individual balances, and Vitalik Buterin's 2022 proposal specifically advocated for this combination.
User Omission
An exchange can simply exclude some users from the tree, reducing reported liabilities. You can only verify your own inclusion, so you might not know you have been excluded unless you actively check. If 10% of users never verify their proofs, an exchange could omit those users and underreport liabilities by 10%.
Mitigations include encouraging widespread user verification, publishing the total number of accounts alongside the root, and comparing the published total against known on-chain deposit activity. No purely cryptographic solution fully prevents user omission without some form of user participation.
Point-in-Time Snapshots
A Merkle sum tree proof represents a single moment. An exchange could temporarily move borrowed funds into its reserves before generating the proof, then return them immediately afterwards. Such "window dressing" makes the exchange appear solvent at the snapshot while being insolvent in practice.
More frequent attestations, daily or real-time, reduce this window, but real-time cryptographic solvency proof remains an open problem. Some proposals involve committing to the tree on-chain at unpredictable intervals to prevent preparation.
Off-Balance-Sheet Liabilities
The tree only captures liabilities the exchange chooses to include, so loans from related entities, derivative obligations, or undisclosed debts remain invisible. FTX's insolvency was partly caused by loans to Alameda Research, a liability category that would not appear in a customer-balance Merkle sum tree. Merkle sum tree proofs are therefore necessary but not sufficient for full solvency verification.
Privacy Tradeoffs
A naive implementation reveals sibling node balances in the proof path, leaking partial information about other users' holdings. Enough proofs from different colluding users may make it possible to reconstruct significant portions of the tree. Hashing user identifiers prevents direct identification, but balance patterns could still enable inference.
Privacy-preserving implementations use zero-knowledge proofs to hide sibling balances during verification. You learn only that your own balance is included in the correct total, without learning anything about other entries.
Merkle Sum Trees vs. Traditional Audits
The ideal approach combines cryptographic proof of reserves for real-time user verification with traditional audits to catch off-balance-sheet risks. The stablecoin reserve transparency and audit research article explains how stablecoin reserves are structured and verified.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.