Sidechaining: the Next Step in the Blockchain Revolution

Alex Bruns
Topl
Published in
6 min readAug 8, 2018

Trustless Sidechaining: the Next Step in the Blockchain Revolution

First came the internet. Revolutionizing the speed and volume at which knowledge could be created, catalogued, and found. Then came Bitcoin. Revolutionizing money and trust. Then came Ethereum, and Litecoin, and Cardano, and Sia, and Storj, and Ripple, and Bitcoin Cash, and Eos, and Stellar, and, and, and…

Now, there are over 1600 blockchain-based-things on coinmarketcap.com, at least 10 of every archetypal coin type, and more coins are being created each day. Most see this as proof that the the industry has no basis in reality. (“If you’re stupid enough to buy it, you’ll pay the price for it one day” — Jamie Dimon). Others think it’s an indictment of an over crowded innovation space that will inevitably collapse to one winner. (“Bitcoin will go to zero the day that all politicians become honest” — KK Jain).

Personally, I’m an optimist. I think that some, though, certainly not all, of the thousands of coins and tokens being created now will last. They will eventually be part of a global economy that isn’t centralized or slow, or regarded in the fashion of a far-removed pecuniary religious idol, like the old order.

As more and more blockchains are being created, however, it is becoming increasingly important to be able to transfer value between them.

I’m Alex Bruns, one of Topl’s blockchain engineers, and for the last few months, I have been heading up our sidechaining project. I’ve read countless papers on theoretical sidechaining systems, real world implementations, and grandiloquent attack reports, all of which strengthen my belief that sidechaining is the future of blockchains.

Sidechaining is the next step in the blockchain revolution.

At Topl, we’ve considered everything from Atomic Swaps to NiPoPoWs, and at the end of the day, we’ve concluded sidechaining isn’t some sphinxlike feature whose implementation is only to be contemplated and respected as, “a hard nut to crack”. It’s a bounded problem space that systematic ideation and testing can solve. Also — spoiler alert — we think we’ve cracked it.

What is a Sidechain?

But let’s back up a moment. Put simply, a sidechain is a channel that allows value to be transferred between two blockchains. By this definition, every centralized crypto exchange listing assets from two different chains is a sidechain. Coinbase would be an example of this.

Sidechains also typically require low or non-existent trust. Ideally, sidechains would be completely trustless. Afterall, the idea trustlessness is one of the central themes on which blockchain as a whole is based — reliable transactions between two parties without third-party involvement or oversight. For the moment, many users seem willing to accept the intermediary (counterparty) risk involved with using a trusted sidechain, given that the cost of using the sidechain is reduced by enough to justify the new risk.

Topl’s Solutions

With this in mind, I stand before you with two sidechaining implementations: Heimdallr and Heimdallr Genesis. The first is a trusted solution that we are currently deploying to a set of testnets and plan to include in our mainnet launch this Winter. The second is the ideal — a fully trustless and decentralized sidechaining solution with a fraction of the costs of a current trusted models.

Heimdallr Genesis a fully trustless and decentralized sidechaining solution with a fraction of the costs of a current trusted models.

Heimdallr: The Trusted Solution

Heimdallr allows for two way value transfer between two blockchains via a trusted intermediary. While not particularly exciting, this is state of the art, and Topl’s primary goal is to provide as much functionality to users as quickly as possible. So, with this in mind, we’ve made the decision to include Heimdallr in our mainnet launch rather than take on the more complex project of Heimdallr Genesis and delay sidechaining for Topl blockchain users until a later hard fork.

Heimdallr may be trusted, but it’s no Coinbase. Since Heimdallr is a completely open source project, all of our code can be audited. Additionally, for users participating in sidechaining via a third party, we are developing a transaction matching autonomous auditor; this will allow users to prove that funds were only payed out when the rules of the sidechain said they should be. Should a sidechain with Topl be found to be creating phony assets we expect the community would execute a high consensus level hard fork to remove that sidechainer’s stake.

Heimdallr Genesis: The Trustless Solution

Let’s turn our attention to the ideal: the trusted sidechain. The problem of creating a trustless sidechain between two proof-of-work sidechains has been solved before. For example, a simple solution is an SPV proof; a smart contract on one chain can ask for new block headers from a second chain by incentivizing users of both chains with payment proportional to the the header’s correctness and value to the contract. Therefore, many users will submit series, but only the most correct — the canonical headers — will win. In PoW, this is easy to verify because the canonical chain is always the longest chain submitted, according the Bitcoin whitepaper. With these headers, the chain can confirm sidechaining transactions, using a bit of game theory and some clever crypto.

Things get a little tricky, trying to approach proof-of-stake sidechains in the same manner. Because PoS chains have no sense of ‘work done’ the headers of different forks are all just as valid as the main chain and can be generated with a trivial amount of computational power. This means the smart contract can’t use the longest chain rule to determine which headers are right and, as a result, it can’t confirm sidechaining transactions.

Topl solves this with Heimdallr Genesis.

Ouroboros Genesis introduced the concept of a genesis proof that says, given a set of Ouroboros Genesis block header sequences starting at the same block, the canonical chain can be found by computing a density coefficient and applying it to chain length. This density coefficient is computable because Ouroboros Genesis is one of a small number of consensus mechanisms that doesn’t measure time in blocks. Ouroboros Genesis’ blocks are held within a higher time structure called “slots”. Since slots are assigned to forgers in advance, any fork which is not actively adopted by the majority will have a larger number of unfilled blocks, in other words, a lower density. By simply comparing the density — and by extension the level of activity between different forks — we can be sure to always select the canonical, more active, fork. With this proof, assuming that both of the chains use Ouroboros Genesis PoS (or a similar consensus algorithm), the Heimdallr Genesis smart contract can determine the canonical headers and confirm sidechaining transactions.

Using the Ouroboros Genesis proof, Topl’s Heimdallr Genesis smart contract can determine the canonical headers and confirm Proof-of-Stake sidechaining transactions.

The best part of Heimdallr Genesis is its efficiency. It requires a trivial amount of extra computation compared to current PoW trustless sidechains, since Genesis proofs are not resource dependent proofs. Additionally, because of another piece of cryptographic pixy dust, Heimdallr Genesis can also be used to sidechain to PoW chains if one side is replaced by a NiPoPoW proof rather than Genesis proof. Of course, that’s probably a whole article in and of itself.

In conclusion, as we work together to improve the blockchain and crypto spaces, we work towards a brighter, more decentralized future. I see a world in which blockchain technology improves the security guarantees of almost every complex service that exists, while simultaneously allowing frictionless movement of value between any and every coin, or token. It sounds fanciful, I know. But my conviction is supported by a basic a simple assumption, systems are stronger together. As a bundle of sticks is stiffer than a twig, so too is a collection of blockchains stronger than a standalone chain.

Check out Heimdallr on Topl’s test-net : https://github.com/Topl/Bifrost/releases/tag/v0.2.1-alpha

If you want to learn more about the development of Topl’s protocol, and our work with Ouroboros Genesis follow us here and join us on Telegram: t.me/Topl_protocol.

Ouroboros Genesis is a product of IOHK, as is the proof that makes it work. I just read a research paper and thought about how else it could be applied to the space.
Read more about Ouroboros Praos: https://iohk.io/research/library/#XJ6MHFXX
Read more about Ouroboros Genesis:https://eprint.iacr.org/2018/378.pdf

--

--

Alex Bruns
Topl
Writer for

Blockchain Engineer @ Topl & Undergrad Majoring In Product Design @ University of Minnesota — Twin Cities