On-chain or Off-chain?

This question will be at the core of future software engineering.

Just a few days ago the Raiden Network blessed us with the developer preview for their state channel implementation. This technology is super exciting and one of several important projects that bring scalability solutions to Ethereum. Raiden does this in particular by offloading on-chain transactions and giving folks the tools to communicate off-chain. While these words may sound complex to you I promise that 80%+ of the complexity here has been undertaken by the Raiden team. Major kuddos to them! To explain this on-chain/off-chain paradigm, as well as the tradeoffs, I’ll break down the concepts of state and give an explanation of how the Raiden network gives us an example of off-chain benefits. So let’s start by talking about the reason blockchain technology itself is important.

Universal Acceptance of State

If you’re tired of reading about and/or understand this concept already please skip this section, I personally love it too much to not talk about it.


A distributed system is one that shares all of its information with any one participant and without regard for who, everyone is an equal participant. In addition, every participant is able to access all information, and able is an important distinction because not every participant needs all of the information but it’s there whenever they want it. A fully distributed system then is one that has a transparent network protocol which gives every participant a high degree of confidence that all information has been made available. Read that three times then wiggle your nose.


Ledgers are much easier to understand because we’ve been using them in one way, shape, or form, since our species began writing. Ledgers are nothing more than a record of what is… or state. Hopefully, if you haven’t already, you can wrap your head around the concept of state with these few sentences. An accounting ledger, for instance, keeps track of where money is allocated, the state of money.

Distributed Ledger Technology

At this point you can see that there is a lot of trust between a number of people and organizations that make traditional accounting ledgers work. So what happens when you have value outside of this traditional network of trusted “nodes” so to speak? Generally it’s worthless until you bring it in to the network. Skills, for instance, are worthless unless you generate currency with them. This not only requires that you have access to a trusted network, but also that you access the specific network that will adequately recognize the value you wish to trade. Is all of this trust necessary though?

Final Authority

Now that we’re confident in our ability to have all information available in this distributed system we can be confident in the changes handed to us. Anytime a participant wants to change something it will go through every single one of us and we’ll all agree to the change through the stated protocol. Think of our agreement as the final authority. This sounds great but presents one small problem; sending every single change to every single participant requires every single participant to record every single change. This process has a limit, even in the digital world.

Private keys and off-chain deals

Now you may be asking, if we send transactions off chain, how do the other people verify I sent a valid transaction without using the blockchain? I thought the whole crux of the distributed system is that everyone has access to all information? Without that you don’t have a suitable value-tracking system right?

Tying it together

We now have the learning blocks in place to build upon our understanding of state channels and a project like the Raiden network. One thing we learned in the previous section is that we can actually create a transaction that WILL change the state in our distributed ledger IF we sent it. In addition, two sections ago we learned that sending all changes to the blockchain for a final authority approval is cumbersome and akin to having a notary follow us around all day errday. (Errday was purposeful there because it’s funny.)

What’s the catch?

If I sent and received checks from you, what is my incentive? Throwing all trust and ethics aside, my incentive is to keep all of the transactions that show you sent me assets and toss all of the ones where I sent you assets. In true game theory form however, you have the same exact incentive. The risk lies in the ability for both parties to post the final state to the final authority… Ethereum mainnet.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store