Please describe your proposed solution.
The Perun Channel Network is a proposed solution that aims to address the scalability limitations of the Cardano network by implementing a lightning network-like system. Channels allow for off-chain transactions to be made between parties, allowing for high volumes of small transactions to be processed quickly and at a low cost. We already implemented a Perun payment channel backend in F8. The Perun Channel Network aims to become a payment processing infrastructure on Cardano network by introducing a highly performant decentralized network of virtual channels. This is especially useful for micropayments and high-frequency dApps. This proposal deals with making (existing) Perun channel backends for Cardano virtual-channel-ready. Virtual channels make it possible to open indirect channels between parties which currently have no channels between them. This grant will allow users, companies and communities to create fully functional virtual channel networks independently. A future proposal will extend on virtual channels to support multiple hubs and have a truly decentralized network approach by connecting individual virtual channels over different hubs.
Scope
The scope of the Perun Channel Network project includes the development and implementation of a network-like system (virtual channels) for the Cardano blockchain network as an extension to the existing open-source Payment Channel backend developed as part of Catalyst F8: Cardano scaling solutions. The proposal will involve the following steps:
- Research and development of the Perun Virtual Channel protocol on utxo-chains including the extension of the existing Perun smart contracts.
- Implementation of the Perun Virtual Channels on the Cardano blockchain.
- Testing and optimization of Perun Virtual Channels to ensure its functionality and scalability.
- Making the project tangible: Development of documentation and educational materials to help users understand and utilize the Perun Virtual Channels, including guides and tutorials.
- Community engagement and outreach to promote the adoption and usage of the Perun Virtual Channels on the Cardano network.
Overview of the Perun L2 technology
Perun protocol: The Perun channel protocol is an instance of a state channel protocol that results from a series of renowned research papers (EUROCRYPT, CCS, S&P). The protocol allows a fixed group of participants to open a channel between each other such that the deposited funds can then be transferred within the group with a local consensus at zero cost and nearly zero latency using off-chain transactions. The Perun protocol guarantees the security of the funds at all times. If a dispute arises (for example, one party goes offline) the protocol provides a way for honest participants to receive a payout according to the most recently agreed off-chain state.
Custom transaction logic: The Perun protocol also allows for imposing arbitrary logic on a channel so that transactions can be made even without full off-chain consensus. For example, this allows for realizing atomic off-chain swaps with complex transaction logic.
Cross-chain transactions: Due to the local consensus mechanism, the Perun protocol can be extended to supporting cross-chain channels, where the deposited assets may lie on different blockchain networks (e.g., ETH and ADA). Implementing this functionality is work in progress but we eventually plan to bring it to all supported blockchain backends.
Implementation: The Go-Perun library implements the Perun protocol in an abstract sense so that it can be used with arbitrary blockchain backends given an implementation of the corresponding backend module.
Virtual Channels: The main focus of this proposal lies on the virtual channel technology. A virtual channel is a channel that is established off-chain, resulting in great scalability, minimum delays and fees. It allows connecting parties that do already have an open ledger channel with the same intermediary (Hub). The idea is that if the parties have an open ledger channel to the same intermediary (Hub), then a virtual channel between the parties can be established through transactions in the open ledger channels. This is much more efficient compared to opening a channel via slow and costly on-chain transactions. Our papers [1, 2] describe how to realize virtual channels on a single network.
- White paper: <https://perun.network/wp-content/uploads/Perun2.0.pdf> (with references to the scientific papers)
- Main scientific paper “Perun: Virtual Payment Hubs over Cryptocurrencies”: Published at IEEE S&P 2019, <https://ieeexplore.ieee.org/document/8835315>, Open access: <https://eprint.iacr.org/2017/635>
The current state of the Perun Channel Framework
- Many backends (EVM chains, Polkadot, Cardano, Nervos, Hyperledger Fabric, Internet Computer)
- App Channel integration on Polkadot and EVM chains
- EVM compatible Cross-Chain Channels (non-EVM compatibility in planning)
- Many corporations with industry partners, blockchain foundations and web3 startups
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
In our proposed approach, we tackle existing outlined challenges by:
- Scalability research & solutions: Expanding Payment Channel Networks to facilitate swift, secure off-chain transactions for anyone engaging with the Cardano network. The speed, diminished transaction costs, and inherent security from the Cardano blockchain are a few advantages that Perun Channels bring to the table.
- Node & SPO tools & software: Launching a Go SDK via our Perun SDK, which introduces a fresh method for interfacing with Cardano using the Go programming language. This expansion allows Cardano to tap into additional developer communities and furnishes an abstract layer for sophisticated payment applications on Cardano.
- Blockchain interoperability: Providing a blockchain-agnostic Perun Channel Framework that encourages interoperability between Cardano and other blockchains compatible with Perun.
Our focus on these strategic areas positions us to enhance the growth and prosperity of the Cardano ecosystem. We aim to equip developers with the necessary research-backed infrastructure and software, allowing them to create innovative applications and bolster the overarching infrastructure.
How do you intend to measure the success of your project?
We handle the overall planning and tracking of the proposed project in our Github (https://github.com/perun-network/perun-cardano-contract and https://github.com/perun-network/perun-cardano-backend). Due to already running our fund 8 funded project in a similar fashion, we are well familiar with the Catalyst Coordinator and acquainted with the relevant reporting processes. We are further tracking our progress as follows:
KPI Progress and Success Measurement for our activities
KPI 0: The delivered code is open-source and available under the Apache 2.0 license. (Y/N)
KPI 1: The delivered code is fully tested. (test coverage > 70%)
KPI 2: Progress of development as outlined above (0-100%) (must be 100%)
KPI 3: Provide documentation for interacting with our channel network (Y/N)
KPI 4: The delivered code has passed at least 1 code review (Y/N)
KPI 5: Community interaction
KPI 5.1: Number of unanswered Questions in our Discord Channel for Cardano Support (Target 0)
KPI 5.2: Number of Likes on Cardano-Related blog posts in the last month (target > 200)
KPI 6: Provide demo code and a demo video (Y/N)
What does success for this project look like?
Our Definition of Done and our success criteria by the end of the project are derived from the above-listed KPI measurement:
- Having a well-documented and clean open-source code as a delivery. (Y, test coverage > 70%)
- Progress of activities as outlined above (must be 100%)
- Number of major partners and interacting projects/initiatives (3+).
- Passing code review (Y)
- Community interaction through at least two blog posts (2 or more)
- Provide a demo video as well as example code for developers (Y)
Please describe your plans to share the outputs and results of your project?
Besides the KPIs listed above, we intend to regularly update our communities using social media channels, podcasts and interviews. Part of our community outreach strategy is the systematic screening for community-integrated media (for reference, check out Nervos #Hashingitout podcast or the ICP gallery post).
In particular, we aim to implement the outputs of this proposal in a collaboration with a Cardano application or functionality to increase the traction and impact of our solution. Further, we plan to uphold the friendly exchange with our colleagues at Hydra and to keep our eyes and minds open for opportunities of cooperation.