Anonymity Set

Overview

The anonymity set for a specific pool is the current number of user's who have deposited but not yet withdrawn.

You can determine a pool's current anonymity set by inputting it's address and a tree index and clicking current Anonymity Set.

The first 4,096 deposits are tree index 0, the next 4096 deposits are tree index 1, and so on. You can determine your deposit's tree index by looking at the transaction logs from your deposit's transaction hash using a block explorer like https://otter.pulsechain.com/.

You can also see the current tree index for any pool at any time by calling treeIndex for the pool's address.

Small Anonymity Sets

A very small anonymity set does not mean transactions are not private.

For example, if there are only two depositors and neither have withdrawn, when someone withdraws, nobody knows which depositor withdrew.

Assuming actions taken after the withdraw can't be linked to the depositor's mannerisms, an outside observer has a purely random guess with a 50% chance of guessing the correct depositor-recipient pair.

In a sense, any anonymity set greater than 1 guarantees privacy. Or rather, guarantees that nobody can know for certain which recipient belongs to which depositor.

Maximum Anonymity Set Size

The maximum theoretical anonymity set size is 4,096 (2^12), because this is the maximum number of commitment leaves for a merkle tree of height 12. In reality, the maximum anonymity set will be smaller because withdraws will happen over time before the tree fills up.

Edge Case

If 4,095 people have deposited and withdrawn from a pool, the current anonymity set is 0. The next depositor will take up the last slot of the tree and the anonymity set will be 1, meaning the withdraw transaction will not be private.

Generally, if the last depositor in a tree with 4,095 deposits increments the anonymity set from 0 to 1, their withdraw will not be private.

This shouldn't happen in reality, as there are nearly guarenteed to be an unequal number of withdraws after 4,095 deposits. If it is the case, this depositor can just immediately withdraw and then deposit again to start a new tree, entering into an entirely new anonymity set.

Last updated