WOO X Merkle Tree PoR: How to directly verify account balances against WOO X holdings

WOO X Merkle Tree PoR: How to directly verify account balances against WOO X holdings

To further demonstrate WOO X’s commitment to upholding traders’ trust, WOO Network has unveiled its Merkle tree-based proof of reserves and liabilities in addition to its live self-reporting dashboard, which the team developed with the goal of making crypto exchanges more trusted than traditional finance (TradFi).

Merkle tree proofs are a cryptographic solution for users to directly verify account balances against WOO X holdings, without revealing sensitive details about individual accounts. Apart from the ability to access data from the website, WOO X has taken one step further by open-sourcing the code and methodology behind the Merkle tree calculations.

Verify your account on WOO X Merkle Tree

Using the WOO X Merkle tree is as simple as selecting an audit snapshot time and inputting your unique Merkle hash, which you can find when you click the Get your Merkle hash URL while logged into your WOO X account.


Your unique Merkle hash is on your account’s Audit page.

Make sure that the audit snapshot time matches with the corresponding Merkle Hash and click verify.


Successful verification will show you the Asset List and the Merkle Hash List where your assets belong. It means that your assets are included in the Merkle tree for that specific snapshot time.

Users can also download the full Merkle tree to review the full Merkle tree data. As a further gesture of our commitment to transparency, we have open-sourced the code on GitHub, which you can review using the Download the Merkle Tree button.


The screen will also display when the verification is not successful. Please note that accounts with no assets or who did not pass KYC will not see their information on the Merkle tree. Negative assets will not be reflected on the tree.


How the WOO X Merkle tree works

The sample code on GitHub demonstrates how to validate the Merkle tree. The sample code is written in Java. It consists of only 1 Java file.

MerkleCheck.java.

The entry point is the main() function in MerkleCheck.java. There are only two variables you need to provide and substitute:

  1. Path of the Merkle tree binary file. (download from WOO X website)
  2. User hash for your account for the specified audit. (obtained from WOO X after logging in)

Using the two variables will enable the code to run the Merkle tree validation process and retrieve the balance of your account for the audit. You are welcome to review the code yourself to verify the validation approach.

Merkle Tree Binary Format

Tree structure

The leaf nodes are users' balances split into N parts (determined at random for each audit), and the Merkle Tree is a binary tree. Each leaf node, therefore, represents a portion of each user's balance at the time of the audit snapshot. The root node represents all users' balances at the time of the audit snapshot.

Any accounts with no assets or that did not pass KYC will not be represented on the Merkle tree. Also, any negative assets are not reflected on the tree to ensure no misrepresented negative balances can be added to the tree to under-report the overall sum of the users' balances. Each sub-account is represented separately from the main account in the tree.

In order for the leaf nodes to be at the same level, some leaf parents will only have a single leaf child. We also ensure every Level 2 node has at least one child. So we will assign at least one leaf node to every Level 2 node, and assign the remaining leaf nodes from left to right.


Merkle Tree Format

The Merkle tree is serialized in ProtoBuffer format. The Proto files are as follows:

The tree binary file starts with a list of token names (e.g. BTC, ETH), and the index for the token is used to represent the token itself in the corresponding representation [1].

The second file is a list of Merkle Node messages. It represents a single node in the Merkle tree. The format is as below:

The attributes left/right are the hashes of the left/right child of the current node. When the tree is loaded, we can construct the binary tree structure using the left, right, and parent attributes.

The hash attribute represents the hash of the node. The hash of the intermediary MerkleNode (non-leaf) is generated by:

And the hash of a leaf MerkleNode is generated by:

For the leaf_balance_vector and leaf_position_index parts, we use the MerkleBalanceVector Proto message as the byte array input. The format is shown below:

The index attribute is a list of tokens. We can find the mapping for the token-string representation in [1]. The balance attribute represents the quantity of each token.

The calculation process for leaf node hash is as follows:

And finally, the userHash use ProtoBuffuer message like this:

Validation Algorithm

The validation algorithm attempts to find all leaf nodes that match the UserHash by calculating the hash of the leaf nodes based on the UserHash input and comparing it against the hash of the leaf node. Matches are ensured to be unique by adding the leafIndex which is the leaf's unique id in the tree.

After finding all matched leaf nodes, the algorithm will sum up the balances of the leaf nodes, which should then equal the total balances of the account at the time of the snapshot (also provided in the WOO X Audit page after logging in for each account/subaccount).

The content above is neither a recommendation for investment and trading strategies nor does it constitute an offer, solicitation, or recommendation of any product or service. The content is for informational sharing purposes only. Anyone who makes or changes the investment decision based on the content shall undertake the result or loss by himself/herself.

The content of this document has been translated into different languages and shared throughout different platforms. In case of any discrepancy or inconsistency between different posts caused by mistranslations, the English version on our official website shall prevail.




We use cookies to improve your experience. To find out more, please read our Privacy Policy. By clicking "Accept", you consent to our cookie and Privacy Policy. Or you may click "Decline" to refuse to consent.