By Daniel Hines, from Deku team
In July, we launched an alphanet for Deku Canonical, a sidechain for Tezos featuring a Web Assembly smart contract platform.
Today, we are pleased to announce the launch of a Deku Canonical betanet running on the Tezos Ghostnet. This network features better performance and stability, major improvements to the API and developer experience, and the debut of a new Wasmer-based virtual machine. You can see the smart contract addresses and API endpoints at https://marigold.dev/deku.
There’s lots of hype and also lots of confusion over sidechains and Layer 2’s in general, so it’s worth reviewing what exactly a sidechain is.
A sidechain is a blockchain with a light client embedded in a host blockchain (the Layer 1). This light client forms a bridge between the two networks, allowing assets to move onto and off of the Layer 2 - in this aspect sidechains are similar to rollups.
As with rollups, sidechains are used to scale. But while rollups are bounded by the L1’s bandwidth and are primarily used to scale computational power, sidechains are more flexible, allowing us to choose virtually any point in the design space of consensus algorithms and blockchain implementations, which is very large.
In Deku’s case, we’ve focused on maximizing throughput and minimizing latency by using a modified Tendermint consensus algorithm, an un-Merkelized in-memory layout for storage, and exploiting OCaml 5’s multicore capabilities to parallelize as much hashing and cryptography as possible.
Tezos users can transfer virtually any asset to the Deku-C network by first wrapping the asset as a ticket, then depositing that ticket via the deposit endpoint of the Deku consensus contract on Tezos. Standardized assets such as FA1.2 and FA2 tokens can be automatically wrapped and deposited via TzPortal.
Deposited tickets are locked in a vault and minted to a given recipient on the Deku-C side, where they can be transferred to other uses or used to interact with WASM smart contracts.
When a user is ready to withdraw their assets to Layer 1, they can issue a withdraw command to one of the Deku nodes. On inclusion in a Deku block, they’ll receive a withdraw proof that can be submitted to Tezos to withdraw from the vault. TzPortal partially automates this process for standardized tokens.
Smart contracts for Deku-C are written in Web Assembly, making it easy for developers to access the Tezos ecosystem with Rust, C++, Go or any WASM-compiling language. Our compiler team has developed a Michelson to WASM compiler, enabling Ligo contracts to be deployed to Deku-C.
The latest version of Deku-C follows an OpenAPI specification. Additionally, we’ve built a Typescript library developers can use to create DApps that interact with Deku-C.
We intend to grow Deku-C into a rich ecosystem of WASM DApps that enjoy high bandwidth and throughput. However, operating a smart contract platform is not all Deku can do.
Deku-C is just one instantiation of Deku, which itself is framework for creating sidechains. While Tezos and Ethereum are designed to run the Michelson virtual machine and EVM respectively, Deku is parametric with respect to the virtual machine it runs. While lots of use cases could benefit from blockchains, different applications have different needs in terms of data privacy, governance and centralization, and hardware requirements. The idea with Deku is to separate these concerns from the consensus layer, allowing developers to quickly deliver blockchain solutions tailored to their use case, yet with full access to all the assets on Tezos.
Deku-C is the first use case for the Deku framework, jointly operated by the Tezos core developers. But we anticipate other Deku networks to follow. Some other good use cases for the Deku framework include private blockchains in compliance-heavy industries, high-performance blockchains, and low latency order-book exchanges.
To showcase the Deku framework and how to develop applications for it. We’ve launched an additional Deku network on the Tezos network running a blockchain game we’re calling Decookies. Inspired by classic cookie-clickers, you can click, bake, and industrialize your way to the top of the leader board. We encourage developers to check out the Deku virtual machine that powers the game implemented using our Node JSSDK. We additionally have SDK’s for creating Deku VM’s in Go, OCaml, and Rust, but virtually any language could support the 50 line protocol.
We are very excited for users and builders to try out our betanets. The Deku team can be reached on the #Deku channel in Tezos Discord, on Reddit, and Twitter.
If you want to know more about Marigold, please follow us on social media (Twitter, Reddit, Linkedin)!