Super Testnet launches Hedgehog, a protocol for asynchronous layer 2 Bitcoin payments
Today a freelance developer focused on Bitcoin and the Lightning Network’s Super Testnet unveiled his latest invention, Hedgehog, a protocol for asynchronous layer 2 Bitcoin payments.
“This is a similar protocol to the Lightning Network,” Super Testnet said. “And this is Layer 2 for Bitcoin payments. Only in this case, unlike the Lightning Network, both parties don’t have to be online, it’s asynchronous. One party sends money to the other and then goes offline.”
According to the project’s Github, one of the characteristics of Hedgehog channels is their simplicity compared to Lightning channels. Status updates in a Hedgehog channel simply require the sender to propose an update and the recipient can accept it at their convenience. This asynchronous nature increases flexibility and efficiency when processing payments.
The protocol works by leveraging a primitive in Bitcoin Script known as a “revocable connector.” These connectors are built on two more basic components: a cancellable script and connector output. Cancellable scripts allow either party to cancel the transaction after a certain period of time, adding an additional layer of security and control. Connector outputs allow you to construct pre-signed transactions that use a separate UTXO along with the connector output, allowing the transaction to be invalidated using the connector output itself.
To illustrate how a Hedgehog channel works, consider a scenario where Alice opens a channel with Bob by sending a certain amount of Bitcoin to a multisig address. Using a revocable connector, Alice can send off-chain payments to Bob when he is offline. These payments are contained in a text similar to a check and can be sent via email or other communication method.
Once Bob is online, he can accept or decline the payment. If he accepts, you can co-sign and broadcast the transaction to update your channel balance. If he refuses, Alice can offer an alternative deal for him to consider.
One of the potential problems Hedgehog has to solve is that, for example, if one party sends money to the other party, it loses the ability to force the channel to close because the other party doesn’t have the other party’s signature. The protocol provides a conditional cancellation mechanism. This mechanism aims to allow the sender to conditionally cancel the previous state, giving both parties time to redefine the transaction if necessary.
Hedgehog also solves the problem of funds becoming stuck in multi-signature addresses when one party becomes permanently unavailable. By incorporating time lock conditions into the script, the protocol can ensure that funds remain accessible after a certain period of time, even if one party is unable to provide a signature.
On the Super Testnet, they posted that they had an idea for how to build a federated CoinPool named Burrow using the Hedgehog channel. Those interested can find out more here.