The current Cardano network is limited in its ability to handle high transaction loads efficiently. This bottleneck limits the growth of Cardano for several use cases.
We propose to extend our existing Perun Payment Channel Backend (completed in Fund 8) with Virtual Channel support (no need for direct connections) as a first step to build micropayment networks.
This is the total amount allocated to Perun Virtual Channels as Payment Infrastructure.
Jan Bormet, Norbert Dzikowski, Sebastian Faust
PAB: https://github.com/input-output-hk/plutus-apps
Our proposal involves leveraging the capabilities of the Plutus Application Backend (PAB) to host contract endpoints, providing seamless interaction between our backend and the contract.
Project will be fully open source.
SDG goals:
Promote sustained, inclusive and sustainable economic growth, full and productive employment and decent work for all.
Build resilient infrastructure, promote inclusive and sustainable industrialization and foster innovation.
SDG subgoals:
Strengthen the capacity of domestic financial institutions to encourage and expand access to banking, insurance and financial services for all.
Achieve higher levels of economic productivity through diversification, technological upgrading and innovation, including through a focus on high-value added and labour-intensive sectors.
Develop quality, reliable, sustainable and resilient infrastructure, including regional and transborder infrastructure, to support economic development and human well-being, with a focus on affordable and equitable access for all.
Increase the access of small-scale industrial and other enterprises, in particular in developing countries, to financial services, including affordable credit, and their integration into value chains and markets.
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:
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.
The current state of the Perun Channel Framework
In our proposed approach, we tackle existing outlined challenges by:
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.
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:
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.
Relevant Experience
PolyCrypt has been developing off-chain protocols and frameworks since 2018. Our research lead, Sebastian Faust (Prof. for Computer Science at TU Darmstadt, Germany), is a co-inventor of state channels, Proof of Space, and the CommiTEE sidechain.
We have already successfully completed our project “Perun Channels for Cardano” in F8 (https://cardano.ideascale.com/c/idea/400079) and therefore have gained considerable expertise developing software for the Cardano ecosystem. More specifically:
Further, we have experience working with a variety of different blockchain ecosystems and have successfully completed similar projects for ecosystems such as:
In our past project, we have developed a Payment Channel Smart Contract compatible with Cardano's Babbage era. It allows multiple parties to conduct unlimited off-chain payments securely. We have also integrated it into our Perun framework go-perun, providing a streamlined go-SDK for Cardano's Perun channels.
By implementing the following extensions during this project, we aim to significantly enhance the efficiency and scalability of the Cardano network, making it more robust and versatile for a wide range of applications.
Milestone 1: Protocol Extension (2 months)
In the first part of the work package we will develop a virtual channel protocol extension for our previously developed Perun Channel Protocol on Cardano. In the second part of the work package the protocol will be formalized and a security argumentation will be given. Virtual channels between users can be established completely off-chain minimizing on-chain interactions to an absolute minimum resulting in great scalability, minimum delays and fees.
Tasks:
Milestone 2: Cardano Virtual Channel Extension (4 months)
The second work package is split into an on-chain part where we will extend the existing Perun contracts on Cardano to support sub-channels as well as an off-chain part where will implement the support for sub-channels to the existing Perun Cardano backend.
Tasks:
Milestone 1: Protocol Extension
Deliverables: A paper with a formalization of the virtual channel extension protocol, including a security argumentation.
Outputs: Research findings on a eUTXO compatible virtual channel extension protocol for Cardano.
Outcomes: A formalized, security-assured virtual channel extension protocol for Cardano that minimizes on-chain interactions and improves scalability, delay, and fee performance.
Milestone 2: Cardano Virtual Channel Extension
Deliverables: Sub-channel support for the existing Perun Contracts on Cardano and Cardano backend.
Outputs: The development of on-chain support for sub-channels on Perun Contracts on Cardano and off-chain support for sub-channels on Cardano backend.
Outcomes: Enhanced functionality and flexibility for the existing Perun Cardano Backend, making it capable of supporting sub-channels.
For Milestone 1, Research & Development (R&D) and Project Management (PM) activities are planned. This involves 2 months of Core Developer engagement and 2 months of Researcher engagement, along with 1 month of PM/Marketing effort. The total cost associated with this milestone is 259,876.19 ADA.
Within Milestone 1, Subtask 1.1 is purely R&D work involving 1.5 months of both Core Developer and Researcher time. The cost for this subtask is 407,168.37 ADA. Subtask 1.2, also an R&D task, requires 0.5 months of Core Developer and Researcher involvement, costing 196,335.04 ADA.
Moving to Milestone 2, Development (D) & PM tasks are intended, involving 8 months of Core Developer work and 1 month of PM/Marketing effort. The total cost of this milestone is 417,123.81 ADA.
Under Milestone 2, Subtask 2.1 is a Development task requiring 3 months of Core Developer time, costing 141,428.57 ADA. Subtask 2.2, also a Development task, requires 5 months of Core Developer time and costs 235,714.29 ADA.
In total, the project spans 10 months of Core Developer time and 2 months of Researcher time. The total budget requested for this project is 677,000.00 ADA. In terms of individual costs, the cost per month for a Researcher is 62,804.76 ADA, for a Core Developer is 47,142.86 ADA, and for Project Management/Marketing is 39,980.95 ADA.
The project manager and the marketing manager will not be assigned to individual subtasks but rather will work within the context of the entire project.
The Perun Cardano project represents a significant value proposition for the Cardano ecosystem in several crucial ways:
Scalability Boost: The project resolves Cardano's scalability issues by implementing a lightning-like network with Perun channels. This leads to quicker, more efficient transactions and increased network capacity, rendering the project a beneficial investment for the ecosystem.
Cost Efficiency: Perun channels allow for off-chain transactions on Cardano, reducing associated fees and making transactions more affordable. This translates into long-term cost savings for the ecosystem.
Improved User Experience: The project optimizes user interactions with the Cardano blockchain, ensuring rapid transaction confirmations and lower fees, thus elevating user satisfaction and engagement.
Competitive Edge: Implementing Perun channels enhances Cardano's standing in the competitive blockchain space by offering scalable, cost-effective decentralized payment channels.
In summary, the Perun Cardano project offers high value for the investment, enhancing scalability, cost-effectiveness, user experience, and providing a competitive advantage for the Cardano ecosystem.
The costs are based on equivalent to a lower-than-average rate for blockchain developers and researchers in Germany. Additionally, the project's focus on research and development further contributes to the higher cost. Research and development activities often require extensive expertise, resources, and time, leading to increased expenses. The investment in R&D ensures that the project stays at the forefront of innovation and delivers valuable contributions to the field of cryptography.
Prof. Dr. Sebastian Faust (Head of research): Co-founder of PolyCrypt and co-inventor of the Perun Protocols. Head of research group for applied cryptography at TU Darmstadt, Germany. Numerous publications at renowned cryptography and computer security conferences such as CRYPTO, EUROCRYPT, S&P, CCS.
Hendrik Amler (Head of business and project management): Co-founder and CEO of PolyCrypt. Leads the business development. Will lead the project management.
Norbert Dzikowski (Core developer): Core developer of the Perun Framework since mid 2020. Experienced in a variety of programming languages including Go and Haskell who also worked on the F8 project Perun Channels on Cardano.
Jan Bormet (Core developer): Core developer of Perun since 2022, and experience in programming Perun Channels on Cardano from the F8 project, complementing our Cardano & eUTXO expert team with Norbert.