New Brainwave for Bitcoin Scaling: Can LayerTree Allow Millions to Share a Single UTXO?
Title: A New Brainstorm for Bitcoin Scaling: Can LayerTree Enable Millions to Share a Single UTXO?
Author: 798.eth
Lightning Labs co-founder Olaoluwa Osuntokun recently introduced a novel Bitcoin scaling design named LayerTree. It proposes a radical idea: enabling thousands, even millions, of users to share a single Bitcoin UTXO while each retains independent ownership of their funds and unilateral withdrawal capability.
Typically, a million individual bitcoin holders require a million UTXOs on-chain. Centralizing funds at an exchange uses few UTXOs, but users must trust the exchange's database. LayerTree aims for a middle ground: a single on-chain UTXO represents the total funds, while individual balances are recorded in an off-chain Merkle Sum Tree. The service operator maintains daily operations but cannot alter user balances or prevent rightful withdrawals.
Key Components & Mechanisms:
1. **The Merkle Sum Tree**: Each user is a leaf node containing their balance, public keys, lease term, and a state sequence number (`seq`). Parent nodes sum child balances and hashes, culminating in a single root. The on-chain UTXO holds the total sum, and the root cryptographically commits to all individual balances. Altering any leaf changes the root.
2. **User Withdrawal (O(1) Exit)**: To exit, a user broadcasts a single transaction providing their leaf data, a Merkle proof to the root, and their signature. Bitcoin script verifies the proof, pays the user's balance to their address, and creates a new UTXO committing to the updated tree (minus the exited user). Exit transaction count is constant (O(1)), though proof size grows logarithmically (O(log N)).
3. **Payment Methods**:
* **Channel Leaf**: A leaf can act as a Lightning channel between a user and the operator, enabling fast, off-chain Lightning-style payments routed through the operator without altering the tree root.
* **Voucher**: A user can issue a digitally signed "check" representing a payment promise. The payer signs a message specifying the payment details and current `seq`. The payee can hold it off-chain or later submit it on-chain via a `CLAIM` transaction, which the Bitcoin script enforces by deducting funds from the payer's leaf and creating a new leaf for the payee. Vouchers are stateful (bound to a specific `seq`) and can be cumulatively updated.
Trade-offs and Considerations:
* **Credit Risk with Vouchers**: Before on-chain settlement, vouchers carry issuer credit risk. A payer could issue multiple vouchers exceeding their balance or update their leaf (changing `seq`), invalidating old vouchers. The payee who claims first gets paid. Thus, unpaid vouchers are akin to traditional checks.
* **Value of Vouchers**: Despite the risk, vouchers offer flexibility: they don't require pre-established channels, enable direct issuance, support cumulative updates, and can bridge payments from the Lightning Network into the LayerTree system.
* **Bitcoin Upgrades Required**: LayerTree currently cannot run on Bitcoin mainnet. It requires covenant functionality (constraints on how a UTXO can be spent). Its various implementation designs (FULL, MID, MIN, CCV) depend on several proposed Bitcoin Improvement Proposals (BIPs) like BIP 348 (for verifying signatures on arbitrary data, crucial for vouchers), OP_CAT, OP_TX, and others. An ideal, highly efficient version would also need a specialized opcode like `OP_MERKLESUMUPDATE`.
* **Scalability & Withdrawals**: While compressing on-chain footprint during normal operation, LayerTree cannot increase Bitcoin's block capacity itself. Mass simultaneous exits from the same tree would require queuing transactions over many blocks. Practical deployment would distribute users across multiple smaller trees and use batched operations.
* **Role of the Operator**: The system has a clear operator responsible for user onboarding, service maintenance, and payment routing. It is not fully decentralized but is **non-custodial**: the operator controls service access but cannot unilaterally seize user funds stored in the tree leaves.
Conclusion:
LayerTree presents a creative scaling approach. It introduces a new form of asset: a digitally signed, chain-enforceable voucher that flows instantly off-chain but retains a permissionless on-chain execution path for final settlement. It doesn't eliminate credit risk or block space limits but strategically confines credit to the off-chain phase while providing a cryptographic guarantee of on-chain enforceability.
marsbit10/16 16:26