Scaling Blockchain Applications with Off-Chain Transactions

68a8092ba46ca5848bcdfc453d81c4bb?s=47 Koshik Raj
January 22, 2019

Scaling Blockchain Applications with Off-Chain Transactions

Scalability is a crucial factor in an application deployed in any network and many applications often fail to scale due to certain limitations. Scalability has been one of the concerns even in the blockchain space. Although there are several ways to build scalable blockchain systems, off-chain transactions are the best-known solution. In this free live online session, we will be covering a few of the concepts surrounding this hot topic to get a deeper insight into the solution.


1. Scaling issues in the existing blockchain platforms
2. Basics of layer 2 blockchain protocols
3. Introduction to off-chain state channels and sidechains
4. The Lightning network: Design and implementation
5. Getting to know side chain implementations: Plasma, Rootstock,Loom
6. Other scaling solutions

Meetup link:

Few of the slides have animations, so I have uploaded the presentation in google drive:


Koshik Raj

January 22, 2019


  1. Scaling blockchain with off-chain transactions By Koshik Raj

  2. Scaling issues in blockchain • Remember CryptoKitties? 7 TPS 50,000

    TPS • Bitcoin cannot scale like centralized payment gateways such as VISA ◦ In December, 2017, CryptoKitties clogged up Ethereum network due to increased transactions
  3. Why doesn’t blockchain scale? • CAP theorem states any distributed

    system cannot possess consistency, availability and partition tolerance properties • Due to blockchain trilemma, any DLT can possess only 2 of the 3 properties Scalability Decentralization Security
  4. How to scale? Layer 1 solution: • Modifying the core

    blockchain consensus algorithms to support higher transaction rates: • Increase the blocksize Layer 2 solutions: • Take the transaction outside blockchain (offchain transactions) ◦ State channels ◦ Sidechains
  5. Off-chain state channels Nodes create a channel and perform a

    series of transactions and commit only the final state to the blockchain Alice Bob
  6. Lightning Network (LN) • A layer-2 protocol built for Bitcoin

    based blockchain. • It was created to reduce the transaction fee for micropayments. • Lightning network essentially performs only 2 blockchain transactions for every channel • Currently runs beta implementation on Bitcoin mainnet
  7. A basic design • Create a payment channel by committing

    initial funds • Perform microtransactions using and update the funds in the channel • Close and broadcast the final state at any time to include in the blockchain Alice Bob Multisig account
  8. Routed payment channel in LN • LN can perform transactions

    without creating a direct channel • Routed payment system uses Hash time lock contracts (HTLC) • HTLC makes sure that none of the actors in the routed channel can cheat Alice Carol Bob
  9. Routed payment channel in LN • Alice creates a routed

    channel with Carol via Bob • Carol creates a Secret and shares only its hash value • Alice constructs an HTLC worth 1.1 BTC and shares it with Bob • Bob constructs an HTLC worth 1.0 BTC and shares it with Carol • Funds are retrieved by Bob and Carol only after they disclose the secret 1.1 BTC 1.0 BTC 2.0 2.0 4.0 3.0 3.0 0.9 4.1 Alice Carol Bob
  10. LN implementations • There are several implementations of LN. Few

    of them are: ◦ Lightning network daemon (Scala implementation by Lightning Labs) ◦ C-lightning (C) ◦ Eclair (Go) • Huge number of apps (LApps) have been built using these LN implementations: ◦ FileBazar - A marketplace for images, video. ◦ Lightning Tip - Tipping service in LN ◦ HamerCoin - RPG that uses LN for payment
  11. Sidechains • Sidechain is a chain that runs parallel to

    the main blockchain • Sidechain is attached to the main chain using 2 way peg • Sidechain is permanent, unlike state channels • A same asset can transacted between main chain and side chain • Sidechain is responsible for its own security
  12. A basic design • Assets on the mainchain is locked

    up by sending it to a special address • This is communicated to the sidechain • Sidechain releases the similar assets once the assets are locked in mainchain • Similar process can be carried out in the other direction 1.0 BTC 1.0 BTC
  13. Sidechain implementations • The sidechains are an independant chain with

    their own consensus mechanism ◦ Example: Sidechain can run on proof-of-stake while mainchain uses proof-of-work ◦ • Several sidechains have been implemented for both Bitcoin and Ethereum: ◦ Rootstock : ▪ Smart contract platform on top of Bitcoin blockchain ▪ Provides the same level of security as Bitcoin ▪ Scales upto 100 TPS ◦ Loom Network ▪ Helping Ethereum to scale with a DPoS sidechain ▪ Secured by Plasma on Ethereum ▪ Several games have been built on this network
  14. Other layer 1 scaling solutions • Sharding ◦ Provides solution

    to the Increasing size of blockchain ◦ Ethereum is implementing sharding in the serenity release using PoS • Improved consensus algorithms: ◦ Variants of BFT (FBFT, DBFT) ◦ PoS, DPoS, PoET, PoA
  15. Contact me: Koshik Raj linkedIn: koshikraj GitHub: koshikraj twitter: rajkoshik “keep calm and scale blockchain”