Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)

Celer Network is without doubt one of the most enjoyable initiatives within the crypto area. It is a layer-2 scaling platform that permits quick, simple, and safe off-chain transactions for each cost transactions and off-chain sensible contracts. However, earlier than we acquire a greater understanding of Celer, let’s see why the crypto area wants this undertaking within the first place.

Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)

Crypto has a scalability downside

If you have got been within the blockchain/crypto area, then you need to have heard concerning the “scalability problem.” Simply talking, cryptocurrencies, obtained too fashionable for their very own good. During the growth of 2017 – when Bitcoin charted its all-time excessive – increasingly folks entered the area. However, as all of us quickly discovered, the standard public blockchain structure isn’t actually meant to accommodate numerous customers.

This level was brutally pushed residence through the cryptokitties fiasco.


Cryptokitties is a recreation that was constructed on prime of the Ethereum blockchain. In the sport, you might be speculated to nurture and breed digital cats. The web instantly fell in love with the sport. It grew to become so fashionable that even the mainstream media began to cowl it. It felt like “Cryptokitties” was going to be that “magical dApp” that was going to make cryptocurrency mainstream.


Unfortunately, issues quickly took a flip for the more serious. The Ethereum blockchain merely wasn’t well-equipped to deal with this sudden surge in customers. It simply couldn’t deal with the stress. The variety of unconfirmed transactions within the blockchain elevated exponentially.

Image Credit: Quartz


Because of this, Axiom, aka the corporate behind cryptokitties, was pressured to extend the fuel charges. This is what they stated of their medium article:


“The excitement and adoption we’ve seen this week has been overwhelming and we couldn’t be happier! However, the Ethereum network is completely full. The only way to keep CryptoKitties from lagging is to increase the gas prices so that all transactions can complete quickly. We know that increased prices will mean that some of you will need to slow down your breeding regimen, and we are incredibly disappointed by that. But who knows? Maybe this slowdown will just mean that you’ll love the Kitties you already have that much more.”


So, now that we all know what the issue is, how can we repair it?


Fixing scalability

Fixing the blockchain’s scalability normally comes down to 2 issues:

  • Layer 1 scalability.
  • Layer 2 scalability.


Layer 1 Scalability

Layer 1 or base-layer scalability means making modifications to the underlying blockchain structure itself. The two most important ways in which this has been performed to date is by:

  • Increasing the block dimension.
  • Opting for leader-based consensus algorithms.


Increasing the block dimension


One of the strategies proposed to extend layer-1 scalability was to easily enhance the block dimension. However, this methodology has three outstanding drawbacks:

  • In a proof-of-work system, this methodology requires the nodes to do extra work. As it’s, mining is a really costly course of. Making it dearer will solely make the larger swimming pools extra highly effective and reduce general decentralization.
  • As we now have seen with the Bitcoin-Bitcoin Cash fiasco, rising the block dimension can result in a break up neighborhood. No one desires a hard-fork if it may be utterly averted.
  • Increasing the block dimension leads to linear scalability versus exponential scalability. Eg. Bitcoin Cash is simply 10-15 instances sooner though Bitcoin’s block dimension is 1 MB and Bitcoin Cash has an adjusted block dimension of 32 MB.


Leader-based consensus algorithms


The different method that individuals have been taking is to make use of leader-based consensus algorithms. In these algorithms, there are particular nodes within the community that are thought of stronger than the remainder. These nodes are answerable for the consensus and general community well-being. However, this answer goes towards the precept of decentralization. Having a small variety of nodes certain will increase the pace, but it surely additionally makes the system extra insecure and centralized.

Layer 2 Scalability

Layer 2 options are scalability options constructed on prime of the present base blockchain. These options depart the base-layer alone and create protocols on prime of it. This is the place we re-introduce ourselves to Celer. There are a number of layer 2 options just like the lightning community and Raiden community already within the later levels of improvement. However, what makes Celer distinctive is that whereas these are for cost solely, Celer can even execute generalized off-chain sensible contracts.

Going deeper into Celer

At its very core, the 2 most important elements of Celer Network are:


  • cStack: Celer’s off-chain technology stack that may be constructed on totally different blockchains.



cStack consists of the next layers in bottom-up order:

  • cChannel: Generalized state channel and sidechain suite.
  • cRoute: Provably optimum worth switch routing.
  • cOS: Development framework and runtime for off-chain enabled purposes.


What is cChannel?

cChannel makes use of the 2 cornerstones of off-chain scaling platforms – state channel and sidechains. 


Firstly, let’s perceive what a state channel is. It is a two-way communication channel between contributors that allow them to conduct interactions. This interplay, which might usually happen on the blockchain, will likely be occurring off the chain. Let’s do a fast run-through of the necessities to execute an off-chain state channel:


  • A phase of the blockchain state is locked up through multi-signature or some kind of sensible contract. This is pre-agreed upon by the contributors.
  • The contributors work together with one another by signing transactions amongst one another with out submitting something to the miners.
  • After the channel is closed down, the ultimate state is added to the blockchain.


The Lightning Network is a selected type of state channels referred to as “payment channels.” These channels monitor the state of funds between events. A state channel like Celer’s tracks the state of any arbitrary program between the events, which may embody funds. 


Why have been state channels wanted?


To perceive why we want state channels, let’s take a look at how transactions work in Ethereum. The decentralized crypto ecosystem has been constructed utilizing a Byzantine fault-tolerant mannequin. This mannequin at all times assumes that it’s constantly working in an especially hostile atmosphere. Eg. In the case of Ethereum, particular person customers don’t belief the miners, miners don’t belief the consumer, and miners don’t even belief one another.


So, how does a transaction truly occur?


  • Suppose Alice desires to ship Three ETH to Bob. She will sign this intent to the miners.
  • She may even must pay some further transaction charges or fuel charges to compensate the miners for his or her companies.
  • This state transition (the transaction on this case) must be accredited by a majority of all of the nodes inside Ethereum’s community.
  • Only after the verification has been acquired, will Bob’s account be up to date by Three ETH.


When you overview this course of, you’ll discover two attainable weak factors:


  • The course of itself is sluggish. Waiting for transactions to get a supermajority vote from a community as huge as Ethereum’s isn’t preferrred.
  • As Ethereum will get extra fashionable, extra nodes are going to enter the community. This will make the verification time even longer.


This is the place state channels can utterly change the sport. By leveraging sensible contracts and fundamental recreation concept, state channels will enable customers to create an atmosphere the place they’re incentivized to cooperate and progress the general state of the appliance.


The better part? This whole interplay occurs off the blockchain.


So, if Alice have been to ship 1 ETH to Bob inside the state channel, she will accomplish that while not having to achieve approval from the super-majority of the community. It is straightforward, direct, and quick.


Having stated that, there is a vital factor that you just want to remember relating to state channels. It requires unanimous consent from the contributors to replace the state. In the channel, each the contributors have to return to an settlement earlier than conducting an operation. Since the variety of contributors is so low (two as a substitute of the supermajority of a complete community), this settlement course of is swift.


How do state channels work, and why are they helpful?

Suppose Alice and Bob wish to work together with one another by way of a state channel. Here is what occurs:

  • Alice and Bob lock up a few of their funds into a wise contract. Both events might want to give their consent to do something with these locked funds.
  • Alice and Bob will alternate messages over the web to mutually consent on a selected cost. This will outcome within the alternate of funds between the 2.
  • At any time, both Alice or Bob can exit the sensible contract by reinforcing the most recent state and committing it to the blockchain.


Important options to remember:


  • Thanks to sensible contracts, Alice and Bob don’t want a trusted third occasion to carry on to their belongings, whereas they do their operations.
  • Even if for some purpose the state channels fail, the contributors will be capable to restore the unique state within the blockchain itself.
  • State channels even have robust privateness options. While blockchain transactions themselves are clear and open for everybody to see, state channel interactions are solely seen to the contributors. For occasion, Alice may ship Bob a conditional cost in a state channel the place no-one besides Alice and Bob has to know the situation. When the conditional cost resolves, it would appear to be a traditional cost and fund switch from the surface world even when Alice “disconnects” from the state channel community.


Practical use of State Channels


While the reason to date has been about particular person state channels, Celer expects its customers to principally use state channel networks. A state channel community is a community of particular person state channels which can be linked in such a manner that it will likely be attainable to route state modifications by way of them. Let’s take an instance. 

Suppose, Alice and Bob don’t have channels open with one another, however they wish to play a recreation. As lengthy as each of them have a channel with a typical middleman, they are going to be capable to open a digital channel with one another. Once a consumer connects to a state channel community, interacting with totally different channels turns into a pure, default expertise. Users will be capable to set up, use, and uninstall purposes immediately with zero transaction charges.


According to Celer, the next purposes are best suited for state channels:


  • If the appliance has to take care of numerous transactions or interactions between customers.
  • When a selected session of the appliance offers with a comparatively small variety of contributors. 
  • When the appliance requires quick, near-instantaneous UX.
  • When the set of contributors within the utility don’t have to vary too usually.


How does the cChannel use sidechains?


A sidechain is a separate blockchain that’s hooked up to its mum or dad blockchain utilizing a two-way peg. The two-way peg permits the interchangeability of belongings at a predetermined fee between the mum or dad blockchain and the sidechain.

In conjunction with state channels, cChannel additionally makes use of sidechains. Eg. when a number of customers have to pay one another, they’ll pool their deposits to a central contract. This central contract will act as a sidechain contract with the off-chain service suppliers forming a “multi-party hub.” This will allow one-to-many cost relationships inside a hub.


The sidechain mannequin has the next advantages over the state channel mannequin:


  • The receiver doesn’t have to be on-line and conduct an on-chain transaction. The purpose is that they’ll obtain their funds on the sidechain with out performing any deposit themselves.
  • Secondly, no per-party fund lock-up is required. When side-chain based mostly channels are used for multi-party cost, every occasion (apart from the block proposer) doesn’t have to lock their deposit upfront earlier than they pay one another.

What is cRoute?

For a state channel community to scale up effectively, the state routing must be designed appropriately. State routing determines the pace and quantity of transactions flowing on a given system. Unfortunately, current state channel networks, like Lightning Network and Raiden, have sure pitfalls that stop environment friendly routing.


  • Lightning Network: Lightning Network makes use of a type of Landmark Routing protocol referred to as “Flare.” The thought of Landmark routing is to find out the shortest path from the sender to the receiver by way of an intermediate node referred to as “Landmark,” which is normally a widely known node with excessive connectivity.


  • Raiden Network: Raiden makes use of the A* tree search which is a distributed implementation of shortest path routing. 


Long story brief, each of those routing mechanisms are about “finding the shortest route between two points.” Pursuing this methodology in a standard information mannequin offers a great throughput. This is especially as a result of the general community stays comparatively steady and the hyperlink capability is stateless (since every hyperlink is unaffected by previous transmissions). 


Unfortunately, the off-chain channels are stateful fashions since fixed transactions are occurring inside it, altering particular person capability (or balances). 


The shortest path routing results in frequent modifications in community topology and doesn’t account for channel balancing. Check out the determine under, which exhibits how the shortest path routing results in topology modifications each time slot.


Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)


Let’s take a look at what all is going on right here:


  • In the start, node A, node B and node C every provoke a cost of 100 tokens to node B, node C and node A, respectively. 
  • During the preliminary channel stability distribution (i.e. time slot 1), each pair of nodes are linked by a bi-directional hyperlink, and every node selects a direct path to its vacation spot below the shortest path routing.
  • However, over time, this leads to a unidirectional switch over every channel as is clear in time slot 2. Also, be aware that in this time, the community topology is anticlockwise.
  • During this time slot, the shortest path routing retains making uni-directional transfers (e.g., selects route A -> C -> B for cost A -> B). this reverses the channel stability topology from anticlockwise to a clockwise cycle. This will repeat indefinitely.


As you might think about, this isn’t essentially the most environment friendly method to go about issues. In a decentralized ecosystem, the fixed topology modifications may result in poor efficiency because it takes time for the algorithm to regulate to the brand new topology.


In truth, if node C took the longer route (C -> B -> A), not solely will all of the channels stay balanced, the community topology will likely be unchanged as effectively.


Celer’s answer: Distributed Balanced Routing


Celer’s routing mechanism is the Distributed Balanced Routing (DBR) which achieves transparency and optimum channel balancing through the routing course of. To perceive DBR’s design philosophy, think about a water stream that’s flowing downhill. The water doesn’t know the place its last vacation spot is, it simply follows gravity. 

Similarly, DBR doesn’t carry out any express path computation from supply to vacation spot. DBR merely follows the present community’s congestion gradients. The DBR algorithm has an innate state channel balancing skill that transparently maintains balanced switch flows for every state channel. 


The benefits of DBR algorithms are as follows:


  • Provably optimum: DBR will at all times monitor essentially the most optimum route for a given fee of worth switch requests.
  • Transparent channel balancing: DBR rebalances every state channel to keep up balanced worth transfers in the long run.
  • Completely decentralized: DBR is a totally decentralized algorithm. Each node solely wants to speak to its neighbors within the state channel community topology. DBR additionally occurs to have low messaging prices within the protocol.
  • Resilience to Failure: DBR is very strong towards failures. The algorithm can detect and adapt to unresponsive nodes rapidly. In the case of node-failure, the remaining obtainable nodes will likely be delivering the utmost attainable throughput.
  • Privacy: Since DBR favors a multi-path function, the algorithm preserves the privateness of transferred values. They can do that with out utilizing any extra privacy-preserving strategies. DBR can even combine onion routing to guard anonymity.


What is cOS?

cOS is a mix of utility improvement framework (SDK) and runtime system. cOS goals to assist builders to rapidly construct, function, and use scalable off-chain decentralized purposes with a excessive degree of abstraction.


Directed Acyclic Graph (DAG)


To assist use instances past easy P2P funds, Celer makes use of a system of off-chain purposes as a DAG of conditionally dependent states. Let’s see how generalized state channels can leverage dependency graphs to handle advanced multi-party interplay.

Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)

Consider the diagram above.


  • Let’s say that “Off-chain App 2” is a chess recreation that Alice is enjoying with Carl.
  • Suppose Alice units a situation – “I will pay Carl 10 ETH if Carl wins the game.”
  • Even if Alice and Carl don’t have a direct channel between them, they’ll work together with one another by way of a typical middleman. In this case, that middleman is Bob.
  • This direct channel will likely be fashioned with two layers of situations. The first layer is a straightforward time hashed lock to be sure that Bob relays and resolves the cost in an inexpensive period of time. The second layer locks the cost conditioning on the results of the chess recreation. 
  • This conditional assertion may be settled through Bob though he isn’t part of the sport.




Celer’s cOS SDK is an entire toolchain answer for the creation, monitoring, and determination of states in off-chain purposes. Developers will be capable to create purposes utilizing the SDK to speed up the off-chain scaling answer and the cost community offered by Celer Network. This will assist construct a sturdy ecosystem. Developers will be capable to create two lessons of decentralized purposes:


  • Simple pay-per-use purposes: In these purposes customers obtain microservices from a  real-world entity and streams funds by way of the cost community.
  • Complex multi-party purposes: Developers can leverage conditional state dependency graphs to construct advanced multi-party purposes. Celer plans to increase the current sensible contract languages with trendy software program development strategies reminiscent of metaprogramming, annotation processing, and dependency injection. 


cOS Runtime 


cOS Runtime acts as an interface between cApps and Celer Network transport layer. 

Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)

It helps cApps when it comes to each community communication and native off-chain state administration. The runtime handles numerous features inside the system:


  • One the community entrance, the runtime handles multi-party communications through the cApp’s lifecycle.
  • It offers a set of primitives for advanced multi-party use instances reminiscent of gaming.
  • If there are cases of counter-party failure, the runtime relays these disputes to the on-chain state.
  • If the shopper goes offline, the runtime handles availability offloading to the State Guardian Network. When the shopper comes again on-line, the runtime synchronizes the native states with the State Guardian Network (extra on it in a bit).


The second pillar of Celer’s worth proposition is its cryptoeconomic mannequin referred to as “cEconomy.” This mannequin has been constructed to offer community impact, steady liquidity, and excessive availability for the ecosystem. Any off-chain answer whereas gaining scalability must make tradeoffs with liquidity and availability. The mechanisms used to handle these tradeoffs are:


  • Proof of LIquidity Commitment (PoLC).
  • Liquidity Backing Auction.


Celer Network: Layer-2 Scaling (The Most Comprehensive Deep Dive)

Proof of Liquidity Commitment (PoLC) 


PoLC is a digital mining course of that acquires ample liquidity for the off-chain ecosystem. In Celer Network, there are particular person members referred to as “Network Liquidity Backers” (NLB). The mining course of consists of NLBs locking up their liquidity – which may very well be any sort of digital belongings like ETH – in Celer Network. They lock up the belongings in a “dumb box” referred to as Collateral Commitment Contract (CCC), for a sure time. In alternate, the NLBs get rewarded with the native CELR tokens. This maintains the liquidity of belongings inside the community.


Liquidity Backing Auction (LiBA) 


LiBA permits off-chain service suppliers to acquire liquidity by way of “crowdlending.” The lender priorities are decided by the rate of interest, the quantity of provisioned liquidity, and the quantity of staked CELR token. This is how the mechanism works:


  • The service supplier initiates a LiBA to borrow a number of the liquidity for a selected period of time.
  • One of the liquidity backers submits a bid. The bid will embody – the rate of interest supplied, the quantity of liquidity, and the quantity of CELR they’re prepared to stake.
  •  The quantity of liquidity is submitted through a CCC.
  • The borrowed liquidity will likely be used as a fraud-proof bond or an outgoing channel deposit.


State Guardian Network (SGN) 


The SGN is a particular sidechain to protect off-chain states when customers are offline, to make sure availability. The CELR token holders can stake their CELR into SGN and develop into state guardians. The main function of those guardians is to protect the state of a consumer for a selected time. A consumer can submit their state to the guardian in alternate for some charges. The variety of guardians chosen to be accountable to protect a state depends upon:


  • The state hash
  • The Responsibility Score, which is the revenue circulation generated by the consumer to the SGN.


What is CelerX?

CelerX is Celer’s consumer-facing product and it’s the primary and solely layer-2 utility platform on iOS and Android. CelerX customers will be capable to:


  • Use Celer Pay to immediately switch cash with zero charges.
  • Play varied skill-based video games with no latency.


Since the July eighth mainnet launch, CelerX has reached $1.4M+ complete prizes awarded, 11Ok gamers and 300Ok matches from 88 nations. Celer doesn’t management the tokens deposited in Celer Pay and you’ve got full management of your fund always. The Game Token (GT) is the native ERC-20 token used within the CelerX app. One can use the GT tokens to attempt to observe video games within the app. CelerX offers real-money competitions for roughly 80% of the world and 38 US states – the exceptions being Arizona, Arkansas, Connecticut, Delaware, Florida, Louisiana, Maryland, Montana, South Carolina, South Dakota, and Tennessee.


As we now have talked about earlier than, the largest downside with blockchain area is the shortage of adoption. However, the entire “Cryptokitty” factor confirmed us that there’s a large market within the blockchain area for leisure/leisure dApps. This is one thing that we now have seen time and time once more. Between March 3-9, 2019, Tron was the largest sensible contract platform within the area:


  • Tron DApps skilled a 207% rise in weekly transaction quantity with a complete quantity of $180 million, which far exceeded that of EOS ($102 million) and Ethereum ($24 million).
  • They acquired 33,000 new customers, triggering a 64% progress.


During this era, the three hottest dApps on Tron have been – Epic Dragons, CrazyDogs, and TronGo. As you possibly can see, all three of them are leisure (gaming and playing) Dapps. CelerX will capitalize on this market by offering a platform for skill-based gaming and cellular e-sports. CelerX affords shopping for cryptocurrencies inside the app by way of Credit Cards, PayPal, and Apple Pay, which is an unprecedented method within the cellular gaming trade, not to mention blockchain gaming. 


CelerX goes to be a vital element of the expansion of Celer’s ecosystem. You can obtain CelerX right here. 


Celer Conclusion

As you possibly can think about, Celer Network is a extremely formidable undertaking. The undertaking is led by –  Dr. Mo Dong, Dr. Junda Liu, Dr. Xiaozhou Li, and Dr. Qingkai Liang, who’ve all acquired Ph.Ds from a number of the most prestigious universities on this planet. Celer Network resolves the scalability downside of cryptocurrencies by using intelligent layer-2 ways, which don’t compromise on general system safety. 

On the technical entrance, Celer is engaged on some actually promising developments:


  • An open-source yellow paper which particulars its off-chain generalized state channel protocol and design rationale. 
  • Release a safety audit report for cChannel sensible contract and take away the safety precautions.
  • A full pen-test report for the Celer Network full node.
  • Gradually roll out and construct on the totally different cEconomy elements –  Proof of LIquidity Commitment (PoLC), Liquidity Backing Auction, and State Guardian Network.
  • Complete a 5-lesson tutorial about find out how to construct with CelerX eSport Gaming SDK.
  • Create a Web3 appropriate javascript native shopper and SDK Bug bounty for the alpha mainnet.


With the cStack (technology) and cEconomy (cryptoeconomic) elements working congruently, Celer is all set to dominate the crypto area. It will likely be very fascinating to see the way it grows sooner or later. 


Comments (No)

Leave a Reply