An interactive exploration of Menger's theorem as a Sybil defense
Here is a question that matters for decentralized reputation: if an attacker creates five fake identities that all vouch for each other, how do you tell them apart from a genuine cluster of collaborators? Density metrics — degree centrality, clustering coefficient, weighted trust score — cannot. The attacker controls the internal wiring and can make it look arbitrarily healthy.
But there is a structural asymmetry the attacker cannot fake: the diversity of paths through the surrounding graph. Honest nodes accumulate trust relationships organically, through independent interactions with different parts of the network. Their paths to any verifier pass through many different intermediaries. An attacker's paths all funnel through the same few bridge nodes — the ones they actually compromised or befriended.
This is Menger's theorem applied to trust: the maximum number of vertex-disjoint paths between two nodes equals the minimum vertex cut. A node embedded in dense organic topology has a high vertex connectivity. A Sybil cluster, no matter how internally dense, has connectivity bounded by its bridge count.
Below is a trust network. The blue nodes are honest participants with organic, sparse connections. Hidden among them is an attacker cluster — densely interconnected fake identities that connect to a few real nodes. Watch how density metrics are fooled.
Toggle "Reveal Attackers" to see which nodes are fakes. Notice the attacker cluster scores higher on both degree and clustering coefficient. A naive trust system that uses these density metrics would rate the attackers as more trustworthy than the honest nodes. This is the density shield.
Now click any node to select it. The system computes all vertex-disjoint paths from that node to the verifier (the gold diamond node). Honest nodes have paths that spread through many different intermediaries. Attacker nodes have paths that all converge through the same bridge nodes.
| Node | Type | Degree | Clustering | Disjoint Paths | Path Diversity | Density Verdict | Diversity Verdict |
|---|
Here is the key economic question: how much does it cost to fool each metric? For density, the attacker just adds more fake nodes with mutual attestations — cost scales linearly with the target score. For path diversity, the attacker must compromise existing independent nodes in the organic graph to create new bridge points — cost scales combinatorially because each new independent path requires a node in a different region of the graph.
The chart shows two cost curves. The red curve (cost to fool density) grows linearly — each additional fake node adds a fixed cost. The green curve (cost to fool path diversity) grows much faster because to add each new independent path, the attacker needs to compromise a node in a different part of the graph, and available targets get scarcer.
A reputation protocol built on density metrics is a reputation protocol that can be gamed by anyone willing to spin up VMs. A protocol built on path diversity forces attackers to compromise the organic topology — to actually embed themselves in the real social graph in ways that require sustained real-world relationships. The cost isn't just sats; it's time, social capital, and the risk of exposure at every compromised node.
The practical implementation uses a modified max-flow algorithm with vertex splitting (each node becomes an in-node and out-node connected by a single edge) to compute vertex-disjoint paths efficiently. For a network of N nodes and E edges, this runs in O(V * E) time — fast enough for real-time evaluation on Nostr relay networks.