Perun Channels available on Polkadot
Author: Matthias Geihs
The Perun Framework is a toolkit for increasing a blockchain’s transaction throughput and enabling transactions across blockchain networks. In addition to supporting Ethereum and Cosmos blockchains, the Perun Framework now also supports Polkadot blockchains. The development of the Polkadot backend is supported by the Web3 Foundation through its Grants Program.
The Perun Framework
The Perun Framework is a toolkit for improving scalability and interoperability on and across blockchain networks through state channel technology. Its core component is the go-perun library, which is a library written in the Go programming language that makes the channel technology accessible to a wide range of applications. In particular, go-perun is blockchain-agnostic, meaning that it can be paired with almost any blockchain network. So far the framework has blockchain backends for Ethereum-style chains and Cosmos chains.
The Polkadot Backend for Perun
The Polkadot Backend enables using Perun Channels on Polkadot. It connects the core Perun protocols to the Perun Pallet module, which we developed earlier and highlighted in a previous blog post. In particular, it implements a Polkadot-specific account model (Milestone 1 of the Web3 Foundation grant) and establishes the communication between the Perun core components and a Polkadot network (Milestone 2). We also developed end-to-end tests (Milestone 3), enhanced the Perun Pallet (Milestone 4) and developed a CLI demo application (Milestone 5), which we describe in more detail further down below.
In the current version, the Polkadot Backend supports Payment Channels that allow for payments in a chain’s default currency at high throughput and zero fees between two Polkadot clients. In the future, we plan to enable general state channels, which can carry arbitrary data and allow to realize arbitrary transaction logic, and potentially virtual channels, which enable zero-fee channel creation.
The backend is available at https://github.com/perun-network/perun-polkadot-backend and the repository contains instructions on how it can be used.
CLI Demo
For demonstration purposes, we also developed a CLI client, which demonstrates how the go-perun library can be used with the Polkadot backend to establish a payment channel between two clients and send payments across the channel. It also includes a benchmark function that allows testing the performance of the implementation.
Outlook
Hopefully, we piqued your interest! Perun Channels are now available on Polkadot and we are looking forward to enhancing the set of supported features next. In particular, we plan to add support for arbitrary transaction logic and for handling multiple assets in one channel. Besides this, we are especially looking forward to supporting channels between different Polkadot chains. Stay tuned!
Contact
If you are interested in learning more about the Perun Channel Technology and how it can be used to scale your blockchain application, visit our website (https://perun.network/) and our GitHub repo or contact us directly by writing us an email at info@polycry.pt.