Today, an independent developer focused on Bitcoin and the Lightning Network, Super Testnet, unveiled its latest invention, Hedgehog, a protocol for the asynchronous layer of Bitcoin payments.
“This is a protocol similar to the Lightning Network,” Super Testnet states. “And it's a second layer to Bitcoin payments, only in this layer, unlike the Lightning Network, both parties don't have to be online, it's asynchronous. One party can send the other money and then they go offline.”
One of the advantages of Hedgehog channels is their simplicity compared to Lightning channels, according to the project’s Github website. Status updates in Hedgehog channels only require the sender to suggest an update, which the recipient can then accept at their convenience. This asynchronous nature allows for greater flexibility and efficiency in payment processing.
The protocol works by leveraging a primitive element in the Bitcoin script known as “cancellable connectors.” These connectors are built on two more primitive components: cancelable scripts and connector outputs. Cancelable scripts allow either party to cancel the transaction after a certain period, adding an extra layer of security and control. Connector outputs allow you to create a pre-signed transaction that spends a separate UTXO alongside the connector output, allowing the transaction to be invalidated by spending the connector output alone.
To illustrate how hedgehog channels work, consider a scenario where Alice opens a channel with Bob by sending a certain amount of Bitcoin to a multi-signature address. Using revocable connectors, Alice can then send off-chain payments to Bob when he is offline. These payments are included in a piece of text, similar to a check, and can be sent via email or other communication methods.
When Bob connects to the Internet, he has the option to accept or reject the payment. If he accepts, he can sign the transaction and broadcast it to update the channel balance. If he refuses, he can suggest an alternative deal for Alice to consider.
One potential problem that Hedgehog needs to solve is that, for example, if one party sends money to the counterparty, it loses the ability to forcefully close the channel because it does not have the other party's signature. The protocol provides a conditional revocation mechanism. This mechanism is intended to allow the sender to conditionally overturn a previous state, giving both parties a window of time to override the transaction if necessary.
Additionally, Hedgehog addresses the issue of funds stuck in a multisig address if one party becomes permanently unavailable. By incorporating time-locking conditions into the text, the protocol can ensure that funds remain accessible after a certain period, even if one party is unable to provide their signature.
Super Testnet posted that it had an idea on how to use Hedgehog Channels to create a unified CoinPool that it called Burrow. Those interested in this can learn more about it here.