StateChain
Statechains are a cryptographic structure that consists of a chain of digital signatures transferring ownership of a specific statecoin (a bitcoin UTXO) between owners. Similar to a blockchain or sidechain, the statechain acts as immutable cryptographic proof of ownership and a proof that a statecoin (bitcoin UTXO) has not been double spent.
In February 2022, MercuryWallet was the first implementation that had been deployed.
How it works
Ruben Somsen presented statechains at Scaling Bitcoin in Tokyo and published the design on 4 June 2019. A coin is locked in a 2-of-2 between the statechain entity and the current user. To transfer the whole UTXO, the user hands the "transitory key" to the recipient; partial amounts are not moved on the statechain itself, though larger coins can be swapped for smaller ones off to the side. Each transfer also creates an off-chain Bitcoin transaction so the latest owner can withdraw on-chain without help from the entity. Somsen's original write-up used Eltoo for that exit path.[1]
Trust model
The statechain entity can cheat only by colluding with a previous owner who still knows an earlier transitory key. Somsen's design uses adaptor signatures so that every signature the entity makes is disclosed, making cheating visible, and the entity can be a federation (for example an 8-of-12) rather than a single operator. Theft of a given coin still needs a colluding prior owner of that coin. Somsen later prefers the phrase "pro-actively non-custodial", because the protocol is non-custodial only while the entity behaves.[1]
Lightning channels can be opened on a statechain UTXO without the entity learning about them, and blind statechains hide from the entity what it is signing.[1]
Backup transactions and exit
Mercury Layer, CommerceBlock's later protocol, keeps a backup transaction with an nLockTime so the current owner can exit unilaterally if the service disappears, and it defines orderly closure steps in which the parties cooperate to spend the UTXO on-chain. On each transfer the server updates its key share so that the combined public key of the 2-of-2 stays the same even though the client's share changes.[2][3]
Blinded statechains
Mercury Layer blinds the co-signing step. The server uses a blinded MuSig2-style protocol and learns neither the transaction identifiers, the keys, nor the signatures it helps produce, while clients still perform all bitcoin transaction construction and statechain verification themselves.[3][2]
Implementations
CommerceBlock's Mercury Wallet was a consumer wallet for statechain deposits and transfers, and it also shipped a production CoinSwap feature. Support for Mercury Wallet was discontinued in September 2023, with services kept available for a three-month period equal to the duration of a statecoin while the team moved to Mercury Layer.[4]
Mercury Layer was released on 8 January 2024 as a library and command-line tool for other wallets to integrate, rather than as a ready-made consumer wallet.[3]
External links
- https://medium.com/@RubenSomsen/statechains-non-custodial-off-chain-bitcoin-transfer-1ae4845a4a39
- https://github.com/commerceblock/mercury
- https://www.mercurywallet.com/
- https://mercurylayer.com/
References
- ↑ 1.0 1.1 1.2 Statechains: Non-custodial Off-chain Bitcoin Transfer, Ruben Somsen, 4 June 2019.
- ↑ 2.0 2.1 Mercury Layer, CommerceBlock.
- ↑ 3.0 3.1 3.2 Mercury Layer: A Massive Improvement On Statechains, Shinobi, Bitcoin Magazine, 8 January 2024.
- ↑ Support for Mercury Wallet To Be Discontinued As Developers Focus on Mercury Layer, No BS Bitcoin, 6 September 2023.