Here is the hole in the most elegant idea in solvency proofs, and I had missed it for a week because I loved the idea.
A Merkle sum tree has two jobs. The hashes guarantee nobody can quietly edit a leaf. The sums guarantee the root total is the sum of the leaves. What neither guarantees is that a leaf's number is a *sensible* number. The tree will happily hash and add anything. If a leaf says one million, it adds one million. If a leaf says minus one million, it adds minus one million, and the root total shrinks by exactly that much, and every honest customer's path still verifies with a green tick.
"So you can lower the total," Ines said slowly, "by adding a customer who is owed less than nothing."
"A customer who *owes* the exchange money, on paper. That's all a negative balance is. It's a phantom debt. It cancels real liabilities in the sum, so the headline looks smaller than the truth." I wrote on the whiteboard. *Reported total = sum of positives + sum of negatives.* "Every path still checks out. Every sum balances. The proof is valid. The liability total is a lie."
"Why wouldn't anyone have noticed?"
"Because everyone checks their *own* leaf. Nobody checks the stranger's." I pulled up Ines's path. At level eleven, her sibling subtree totalled −120,000. "That's a whole branch with a negative total. A subtree can only go negative if it contains negative leaves."
The cause of my embarrassment is that I had been shown this sort of thing in my own advisor's seminar: the original research on privacy-preserving proofs of solvency, from Dagher and colleagues in 2015, warns precisely that a sum tree must prove every leaf value is non-negative. I'd read the paper twice. I'd cited it in my own proposal. And I had built my audit around the *sums*, and never around the *range* of the numbers being summed.
"Don't," Ines said, reading my face. "Fix it."
How do you look for negative leaves in a tree you cannot open? You don't need to open it. You need the part Halcyon had published itself. For its "full transparency" page Halcyon exposed the entire node table: for every one of the 2,097,151 nodes of the tree, a hash and a total. The customers behind the leaves were pseudonymous labels, no names, no accounts, just numbers. It was public. It was in a downloadable file. I did not touch a server.
I wrote the search in twelve lines: for every node, test whether its total is negative. A negative node means a negative leaf somewhere under it. Descend into the negative child. Repeat until you reach a leaf. The work is proportional to the number of negatives times twenty, not to a million.
It took four seconds.
*31 leaves with negative balances.*
I read the line twice, and the second time my hands were cold.
"Add them," Ines said.
The negatives came to −3,690,000 exactly. Not −3,689,742. Not −3,690,014. Exactly.
"And the positives?" she said.
I summed every leaf that wasn't one of the thirty-one. 13,530,000.
I did the subtraction aloud, slowly, so she could check my arithmetic. "Thirteen million five hundred thirty thousand minus three million six hundred ninety thousand is nine million eight hundred forty thousand. That's the number on the root. The honest tree is thirteen-point-five-three. The published root has been shaved by thirty-one phantoms."
"So what's the true ratio?"
I divided the reserves by the real liabilities. 6,150,000 over 13,530,000.
0.4545. Repeating.
"Five elevenths," I said. "Forty-five-point-four-five percent."
A silence. The old radiator ticked. Somewhere in the stairwell a bucket clanked.
"That's less than half," Ines said. "If forty-six customers in a hundred ask for their money at once..."
"Then the last ones get nothing. And the page says he holds sixty-two and a half, above his own sixty. That is no longer a disclosed fractional-reserve bank. That is a bank that *lied about its denominator.* It promised a minimum of sixty percent and holds forty-five. The shortfall is seven million three hundred and eighty thousand credits."
I put the marker down so I wouldn't throw it.
This time I made myself write the limits before the claim. *What I have shown:* the published root total is smaller than the sum of the positive leaves by 3,690,000, through 31 negative leaves; the reserve address holds 6,150,000. *What I haven't:* who put the negative leaves there; whether the 31 have any legitimate explanation; whether the reserve address is *controlled* by Halcyon today.
"A legitimate explanation for a negative customer?" Ines asked.
"There could be one. A real exchange might credit a market maker's loan, or net an internal account. But then it would have to show it, and it didn't, and none of those entries carry a label. If there's an innocent reason, he can tell us on stage. That's what Open Audit Day is for."
At that moment the girl in the corner, the teenager who had come to see how the magic worked and had kept coming, looked up from her laptop. Her name was Tamsin; she was sixteen and she'd never spoken to me without being asked.
"Um," she said. "Can I show you something that's probably nothing?"
"Show me."
"The customer labels. The pseudonymous ones, the long random strings. They're supposed to be random, right? But I got bored and sorted them, and they repeat." She turned the screen. "The first string appears at position 0, and again at 65,536, and again at 131,072, and so on. Sixteen times. All the way down. It's the same sixty-five thousand labels, copied sixteen times."
I stared. "That's the period of a sixteen-bit counter. A random number generator with only sixteen bits of state can only produce 65,536 different values before it starts over. That's all it can do. Whoever wrote the label generator used a toy."
"Is that bad?"
"It means the account labels aren't random. It means two thousand customers might share an ID with a stranger sixty-five thousand places along." I frowned. "It's also not unusual for a startup to write sloppy code. A million customers is a lot of labels, and sixteen bits is cheap."
Sixteen times 65,536 is exactly 1,048,576. I noted that. It was a very *round* mistake: a toy generator, sixteen copies, no remainder, a tree with not one customer left over. If the number of customers had been 1,048,576 by luck, then the sloppy generator had also needed exactly sixteen cycles by luck.
I said none of this. I said, "Good catch, Tamsin," and meant it, and wrote *labels: 16-bit generator, period 65,536* on the whiteboard with the rest of the noise.
Ines made tea in the staff kettle and we checked everything a second time, the slow way, by hand, because I do not trust a result I have seen only once. She read the thirty-one leaf positions aloud. I added them on paper with a pencil. The pencil agreed with the machine. There is a particular calm that comes when two independent methods give the same answer, and I let myself feel it for exactly one minute.
"We've got the proof," Ines said. "Haven't we? Isn't that it?"
"We've got a proof I can run on a laptop. We don't have a proof people will *watch*. The same man who's signed every document in this story is going to stand on a stage next to me and say it's all on page nine." I turned. "Every single person who hears me say 'five elevenths' has to be able to do the division themselves. That's what I need. Not a speech. A kit."
My phone buzzed. A new message from Nadia, the first in a day. Two lines.
*He moved Open Audit Day. It's tomorrow at noon. And Salma, I can get you the database. All of it. Tonight.*