Alex Thorn breaks down the Liquid Bitcoin hack exploiting cached proofs to trick nodes into approving a 4000 LBTC withdrawal
"It is effectively fooling the bridge into allowing the underlying Bitcoin that collateralizes effectively tokenized Bitcoin on this Liquid sidechain to be issued there."
"It's a federated sidechain. These withdrawals and other consensus actions there require 11 of 15 of these federated nodes."
"They have a confidential transactions feature where you can send and receive assets among yourself on the sidechain without revealing the amounts. To do that you have to submit a range proof and a balance proof that the nodes can use to verify that the in and out on the transaction equal each other and that there's not a negative number."
"It's computationally intensive to calculate the range proof, so if an identical transaction were submitted, the nodes cache it in their memory."
"These attackers submitted a 1 LBTC in, 1 LBTC out transaction and the proof was cached. The bug itself was their ability to create a collision to insert a 1 LBTC in, 4,000 LBTC out transaction and have the same hash as the prior proof. And because the nodes had already seen it, they said, oh, we don't have to compute this again, we know it's good."
"Now they have 4,000 LBTC on Liquid. And then they submit that to SideSwap, one of the federation members that allows the pegging out back into the main Bitcoin network."
