Skip to main content

From offchain to offchain: Statechains meets Lightning

 


Without a doubt, the most significant off-chain Bitcoin solution is the Lightning network. But in its wake, the statechain has emerged as an intriguing replacement. There is currently a proposal to link the two offchain networks.


From an ocean, for example, you can see sunbeams glistening in the water, waves rippling, and possibly a jellyfish drifting toward the light.


But you only see a small portion of it. The distance from the sea's surface to its bottom is hundreds of meters. It has dozens of different fish species swimming in it, crabs and starfish crawling on the bottom, shells clinging to rocks, and sea plants climbing up. A completely new world starts where your gaze diverges.


You can picture a blockchain like Bitcoin, just like the sea. What you see on the outside is only a small portion of what is actually there; the set of UTXOs (coins) and transaction history that full nodes store are just the beginning of a much larger world.


It's the plan, at least. With Bitcoin, it is primarily Lightning that acts as "Layer 2" on the blockchain and transports transactions "offchain.". However, there are other layers below the surface in addition to Lightning. The state chain is another. It is more recent, experimental, and scarcer still. But it already functions.


The idea of fusing Statechain and Lightning has even been floated recently, which is an intriguing idea. Let's first define a statechain, though, before moving on.


Statechains: deliver keys rather than sending bitcoins.

The fundamental concept behind the statechain is that private keys are transferred rather than actual bitcoins when sending money using the blockchain. Similar to how the fabled coins that were featured in every bitcoin article's image used to.


It goes without saying that there are drawbacks: There is no assurance that I won't keep my private key if I give it to you. To be certain, you would need to initiate a transaction right away to send the bitcoins to a new address for which you hold the private keys. The key handover could have been abandoned at that point.


A solution to the issue was put forth by Bitcoin developer Ruben Somsen back in 2018: the bitcoin is stored in a 2-of-2 multisig address, making it impossible to move it without two keys approving the transaction. As usual, I've got one key that I'd like to give to you instead of making a transaction. On the other hand, the second key is held by an independent entity that controls the statechain. When the final owner of the given key requests it, it must co-sign a transaction.


The sender tells her, and she tells the receiver, which is a fairly straightforward way for the neutral party to find out who the true owner of the key is. The sender also signs a message indicating that he is sending the recipient the key at the same time, and so on. By doing this, a public mini-blockchain that lists the true owner is created. Although this does not stop the neutral party from lying, at least it makes it known.


The sender then creates a backup transaction that sends the coins from the multisig address to a new address, but only after a specific amount of time has passed, in case the neutral party disappears or misplaces their keys. Before the sender deposits the coins on the multisig address, this transaction is signed by the neutral party. The recipient creates an analog transaction that can replace mine in order to stop me from paying the coins back to myself in the past.


The construction is reminiscent of Lightning's payment channels, and the details are intricate.


Mercury's initial use of it.

Schnorr, for the multisig construction, and Sighash_Anyprevout, a unique method of hashing the signature, were still lacking in the Bitcoin protocol when Ruben Somsen first proposed statechains in 2018.


Taproot enabled the activation of Schnorr, but a softfork is still required to enable Sighash_Anyprevout. Although there is a thorough BIP, it still appears to be up for debate. At least no date has been set for when it should be turned on.


The creators of CommerceBlock 2020 have begun to implement a variant that does not need Sighash_Anyprevout in order to still enable statechains. They make use of a clever nLocktime design known as Mercury, where the backup transactions are only valid at a specific block height X. the initial backup transaction at X, the subsequent ones at X-1, X-2, and so forth. In the event of a fraud attempt, the current owner can always pay out the bitcoins to himself first thanks to this method.


The Mercury Wallet, developed by CommerceBlock, embodies this idea. In addition, the Mercury Wallet offers CoinSwaps, which let users trade their own coins for those of other users in an anonymous fashion. This is a risky, but intriguing, way to increase privacy. It's risky because you might get unlucky and receive bitcoins that are extremely soiled.


Lightning and statechain collide.

The BLIP provided by CommerceBlock is equally as daring. BLIP stands for "Bitcoin Lightning Improvement Proposal," i.e. e. a suggestion to make Lightning better.


It should be possible to create a Lightning channel through a statechain balance rather than by sending an onchain transaction, as proposed by CommerceBlock, to connect Lightning with Statechain.


To accomplish this, the sender must simply create a statechain transaction that creates a lightning channel with the contents of the statechain address, along with all the information and Lightning-specific smart contracts.


One way this connection helps is by allowing fractions of the coin to be transferred within the payment channel rather than having to spend the entire coin, which is required when a key is given. On the other hand, a state chain makes it possible to transfer a payment channel to another party.


From a higher perspective, such as the sea's surface, connecting statechains to Lightning would have several benefits. For one, it would enable Lightning to scale even further since onchain transactions would no longer be required to generate an open Lightning channel. They would also enhance privacy by erasing the link between a Lightning channel and users' wallets.


Interestingly shaped but unlaid eggs.

Naturally, we're still discussing unhatched eggs here. Statechains appear to still have a niche existence, centered around CommerceBlocks or Mercury, while Lightning is experiencing increasing adoption. There is a statechain transaction every few hours, or occasionally just every few days, according to the Mercury block explorer.


It is still unclear whether the BLIP will be put into action. Since lightning is already complicated, adding more complexity might not be the best idea at this time. How do stock exchanges handle this, and how should wallet developers ever do something like this?


Despite this, the proposal makes one thing abundantly clear: a vast array of off-chain layers are capable of developing beneath the surface of the Bitcoin blockchain.

My Top Picks
Honeygain - Passive earner that pays in BTC or PayPal
MandalaExchange -The Best no KYC crypto Exchange! 
Womplay - Mobile dApp gaming platform that rewards in EOS and Bitcoin
Cointiply - The #1 Crypto Earning Site
LiteCoinPay - The #1 FaucetPay earner for Litecoin 
LBRY/Odysee - YouTube Alternative that lets you earn Money by viewing videos!
FaucetPay - The #1 Microwallet Platform
FREEBTC - The #1 FaucetPay earner for Satoshi's
FireFaucet - An earning site that pays better for some than Cointiply

Comments

Popular posts from this blog

Phishing attack on popular crypto sites tries to empty wallets

  Several major crypto sites such as Etherscan, CoinGecko, DeFi Pulse, and others report malicious pop-ups scammers use to try to trick users into connecting their MetaMask wallets. The phishing attack came from a domain displaying the Bored Ape Yacht Club (BAYC) logo. "We are investigating the root cause of this attack to fix the threat as soon as possible," CoinGecko founder Bobby Ong tweeted. The phishing attack appears to have been triggered by a malicious ad script from Coinzilla, a crypto ad network, according to CoinGecko. Etherscan also advises its users not to confirm any transactions that may appear on the website. The attackers attempted to use the hype around the “bored monkeys” non-fungible tokens (NFT) to gain access to the cryptocurrencies of unsuspecting website visitors. Although the websites affected by the scam attempt have reacted in the last few hours and deactivated the advertising pop-up, it is still recommended not to connect your MetaMask wallet to ne...

Bored Ape Yacht Club NFTs stolen through phishing on Instagram

  Bored Ape Yacht Club ( BAYC ) developers announced on Monday that hackers have hijacked the official Instagram page of the popular NFT collection and posted links to a fake airdrop. Crypto enthusiasts who connected their MetaMask wallet to the rogue website subsequently had their Ape NFTs stolen. Apparently, the attack was planned to coincide with the one-year anniversary of the BAYC collection. This increased the "perceived credibility" of the phishing link. About 100 NFTs are said to have been stolen in the phishing attack . According to CoinGecko data , the minimum price for a BAYC NFT is 139 Ether ( ETH ) or $400,726. So if reports are correct, over $40 million worth of NFTs were stolen in the attack. These numbers are only the lowest estimate, however, as they are based on the lowest price.  At the time of writing, it was still unclear how the hackers gained access to BAYC's official Instagram account. Social media users have pointed out the importance of two-fact...