Celer Network’s alpha mainnet launch, Cygnus, marks that the very first generalized state channel network on Ethereum goes live. To make the mainnet immediately useful, we released two products: CelerX and CelerX eSport Gaming SDK. For the blockchain hard-core developer community, we would like to use this separate blog to talk about what are the features and caveats for this very first alpha mainnet launch on the platform and some of our future plans.
Even though it is our first version of the mainnet, we aim to make it useful and feature-rich from the get go. Here is a list of key features supported by this alpha release:
- ETH and ERC20 Token Support for CELR and DAI
- Generalized State Channel development framework
- Simple non-custodial off-chain payment
- Duplex channel with full bi-directional concurrency
- Boolean and numerical conditional payment support
- Boolean circuit condition resolution logic
- Single-transaction channel bootstrapping
- Channel top-up and cooperative withdrawal
- Cooperative channel closing
- Batch multi-channel settlements
- Batch multi-payment liquidation
- State sync and backup
- Web SDK
- Blockchain agnosticity using protobuf data specification
- 0-downtime upgradeable architecture
You can access these features through our SDKs.
How to build on Celer?
Build something like the Generalized State Channel Gomoku
We have been using the Gomoku game to demonstrate Celer Network’s trust-free generalized state channel functionality. If you are interested in building similar games using generalized state channel, like a chess game, you can go through the following code repositories and our developer doc.
Gomoku state channel smart contract: The repo also contains many general templates to write generalized state channel smart contracts.
cChannel contract: The underlying generalized payment network contract to send out the off-chain conditional payment when the game starts. This will be mostly for general understanding of the Boolean conditional payment construct of Celer Network. No actual code integration is actually needed from this repo.
For the time being, feel free to explore the code base and go through the integration code by following our developer doc. Stay tuned for a video step-by-step tutorial!
Build a Simple Game using CelerX eSport Gaming SDK
Just checkout this video:
The code in the video is available here.
Conditional payment design pattern and more
One low-level design pattern we would like to specially highlight here is layer-2 conditional payment. Take the simplest example of a boolean conditional payment, Alice can conditionally pay Bob off-chain instantly with zero gas fee. Whether this payment actually happens or not will depend on some future on-chain verifiable condition being true or false. The on-chain verifiable condition can take many shapes and forms: it can be results from an Oracle contract, such as whether Golden State Warrior wins the NBA finals; it can be some execution results of another smart contract, e.g. whether the ownership of a Cryptokitty was transferred to Alice; it can also be a result of a generalized state channel smart contract, such as whether Alice win the state channel game or not. The kind of conditional payment resolution can also be flexible beyond the simple “yes” and “no”, we will talk more about that in our technical deep dive article.
Three main benefits of using layer-2 conditional payment are:
- Instant. Do not need to wait for any on-chain confirmation delay.
- Low-cost. No high gas cost for small payment.
- Private. The dependent condition remain entirely private with no on-chain trace.
Tapping into the raw power of Celer Network through Celer SDK, not only gaming, a wide range of applications can be finally made possible on all platforms. Just to name some examples:
- Usage based car insurance
- Peer-to-peer electricity metering and payment system
- Peer-to-peer social betting
- Fine-grained metered hosting services with SLA guarantee
- Decentralized and high liquidity financial derivative exchanges
- Instant order-matching prediction market
- Crowd insurance with micro payments
- Micro auction and instead payout for advertisement publisher
- Peer-to-peer VPN services with instant payment
- P2P Wifi and data connection sharing
- Live streaming with instant tipping from global audience
- Usage-based content sharing
- Merchant and PoS system with extremely low transaction fee
Celer Network is first-of-its-kind: before us, there was no generalized state channel network. As a result, security auditing firms are taking longer to analyze and make sure that the security and correctness of the smart contract, protocol and systems software are all bulletproof.
As we are just starting to roll out the first version of the mainnet, we believe it is necessary to put in some temporary security considerations and precautions in the current mainnet release:
- There is a limit on the funds that can be deposited into each channel.
- The total amount of funds injected in cChannel smart contract cannot exceed $150,000.
- cChannel contract can be paused by owner and distribute remaining funds in case of malfunction or security issue in the smart contract.
We deeply appreciate your feedback if you encountered any bug while building on top of Celer. Feel free to shout out in our discord channel and send us an email to email@example.com.
What’s Coming Next?
There are a couple of things to expect in the near future on the techncial front:
- Open source our protocol specification yellow paper documenting the detailed off-chain generalized state channel protocol and our design rationale. We are also releasing
- Release of security audit report for cChannel smart contract and remove the security precautions
- Pen-test report for the Celer Network full node
- Gradually roll out cEconomy components
- Complete 5-lesson tutorial about how to build with CelerX eSport Gaming SDK
- Bug bounty for the alpha mainnet
Please stay tuned!🎉🎉
Disclaimer: Please remember that the Celer Network code is alpha software and will be prone to bugs. The system that is running may also become not available. You might encounter some unforeseen errors and bugs. Celer team is committed to ensuring that these issues are resolved quickly. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.