<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[PolyCrypt - Medium]]></title>
        <description><![CDATA[PolyCrypt addresses the inherent scalability and privacy challenges of current blockchain systems. It enables to securely process thousands of transactions in real-time supporting complex full-fledged decentralized applications. - Medium]]></description>
        <link>https://medium.com/perunnetwork?source=rss----797b9bc1662f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>PolyCrypt - Medium</title>
            <link>https://medium.com/perunnetwork?source=rss----797b9bc1662f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:10:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/perunnetwork" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Distributed Wallets for Polkadot using TCVRFs]]></title>
            <link>https://medium.com/perunnetwork/distributed-wallets-for-polkadot-using-tcvrfs-47f89fd951a1?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/47f89fd951a1</guid>
            <category><![CDATA[web3-foundation]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[threshold-signature]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 08:58:37 GMT</pubDate>
            <atom:updated>2025-08-25T08:58:37.377Z</atom:updated>
            <content:encoded><![CDATA[<p>In our recently completed project funded by the Web3 Foundation, we researched on advancing the security of Polkadot wallets by developing a threshold BIP32 wallet using Threshold Commitment Verifiable Random Functions (TCVRFs).</p><p>This article outlines our journey, key findings, and contributions, focusing on the technology and its impact on the Polkadot ecosystem. For those interested in diving deeper, we’ve linked our milestone reports including the technical paper below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E1WzXdR7xq6KVtvW" /></figure><h3>About PolyCrypt and Our Mission</h3><p>At PolyCrypt, we’re passionate about building secure, decentralized solutions for different blockchain ecosystems. This project aimed to enhance the security of Polkadot wallets by leveraging threshold cryptography, which distributes trust across multiple parties to prevent single points of failure. By integrating TCVRFs into the BIP32 wallets, we’ve created a system that supports secure key derivation for both hardened and non-hardened nodes, making it ideal for multi-device or multi-party custody scenarios. This work strengthens Polkadot’s vision of a secure, interoperable decentralized web.</p><h3>Why Polkadot and Threshold Wallets?</h3><p><strong>We chose to build on Polkadot</strong> because of its versatility as a leading cryptocurrency with a vibrant ecosystem of decentralized applications (dApps) and a large user base managing substantial assets. Its unique cross-chain interoperability enables seamless communication between diverse blockchains, making the security of Polkadot wallets critical. Our threshold BIP32 wallet enhances this security, ensuring robust protection for users engaging with Polkadot’s interconnected dApp ecosystem.</p><p><strong>Cryptographic wallets</strong> store private keys that control blockchain funds. Traditional wallets rely on a single stored private key, causing a risk where a single compromise leads to total loss. Threshold wallets mitigate this by splitting the private key across multiple parties or devices (e.g., servers in different data centers), requiring a minimum number — the “threshold” — to collaborate for transaction signing. This involves using threshold signature schemes, allowing to collaboratively create signatures without reconstructing the full key. In our Milestone 1 Report, we compared threshold Schnorr signature schemes, as used in Polkadot, evaluating their security, efficiency, and network compatibility to select the best fit for our wallet.</p><p>Here’s the link to Milestone report 1 analyzing various threshold Schnorr signature schemes: <a href="https://github.com/perun-network/polkadot-wallet-grant/wiki/Milestone-1">https://github.com/perun-network/polkadot-wallet-grant/wiki/Milestone-1</a></p><p>Our project builds on BIP32, a standard for hierarchical deterministic wallets that generates a tree of keys from a single seed. We made BIP32 threshold-based, ensuring secure and distributed key derivations, particularly for hardened nodes as proposed in <a href="https://eprint.iacr.org/2023/312">this paper</a>. In this project we improve upon the prior work by introducing TCVRFs for better efficiency.</p><h3>Understanding TCVRFs: A Secure, Distributed Tool</h3><p>Threshold Commitment Verifiable Random Functions (TCVRFs) are at the core of our wallet design. Think of a TCVRF as a secure, distributed random number generator that multiple parties can use together without revealing their secrets. Unlike standard Verifiable Random Functions (VRFs), which produce a single random output, TCVRFs generate a tuple: an evaluation (the random value) and a commitment (a cryptographic guarantee of that value). Each party knows its share of the commitment, which can be combined into a common commitment, essentially acting as the shared public key, ensuring all contributions are verifiable.</p><p>In our wallet, TCVRFs enable hardened node derivation in a threshold setting. Hardened nodes, unlike public-derived non-hardened nodes, require private key information, making them challenging to distribute securely. With TCVRFs, each party computes a share of the evaluation and commitment, which are combined to form the new key without any single party knowing the full secret. This commitment allows the public key to be reconstructed without the need to communicate with the derived node, enhancing security of the derivation process. Our <a href="https://github.com/user-attachments/files/17775711/main.pdf">Milestone Report for 2 &amp; 3</a> details the new Threshold Commitment Verifiable Random Functions (TCVRFs) primitive including a construction and extensive proofs of security.</p><h3>Our Approach: Building a Threshold BIP32 Wallet</h3><p>We constructed a BIP32-compatible threshold wallet using a modified Olaf threshold Schnorr signature scheme, enhanced with TCVRFs for hardened node derivation. Here’s how it works:</p><ol><li><strong>Threshold Schnorr Signatures</strong>: We adopted a modified version of the Olaf threshold Schnorr signature scheme to support re-randomizable keys. This ensures that signatures remain secure even when keys are reused across multiple derivations.</li><li><strong>Hardened Node Derivation with TCVRFs</strong>: For hardened nodes, we replaced the standard verifiable random function (VRF) with a TCVRF. Each non-hardened node evaluates its share of the TCVRF, and these shares are combined to generate the hardened child node’s secret key. This process ensures that no single party can derive the key independently, maintaining the threshold property.</li><li><strong>Security Guarantees</strong>: We ensured that our construction preserves key properties, such as the indistinguishability of randomized public keys and the confidentiality of secret keys, even in the presence of an adversary controlling up to the threshold number of parties.</li></ol><h3>Key Findings and Contributions</h3><p>Throughout the project, we made several significant contributions:</p><ul><li><strong>Practical Threshold Wallet Design</strong>: We successfully demonstrated how to integrate TCVRFs into a BIP32 wallet, enabling secure, distributed key derivation for both hardened and non-hardened nodes. This makes threshold wallets more practical for real-world use cases, such as multi-device or multi-party custody solutions.</li><li><strong>Enhanced Security Analysis</strong>: Our security analysis, detailed in our Milestone 4 Report, shows that TCVRFs prevent adversaries from learning the combined evaluation of key shares, even if they compromise a subset of nodes. This ensures robust protection against attacks.</li><li><strong>Open Challenges</strong>: We identified that converting Shamir secret shares into replicable shares (for TCVRF compatibility) remains a non-trivial problem, as noted in our Milestone 5 Report. This opens the door for future research into more efficient sharing schemes.</li></ul><h3>Future Plans and Impact on Polkadot</h3><p>Looking ahead, we aim to optimize TCVRF efficiency and explore alternative secret-sharing schemes to make threshold wallets even more scalable. This work strengthens Polkadot’s ecosystem by providing secure, distributed wallet solutions that support DeFi, gaming, and other applications, challenging centralized Web 2.0 platforms. Our wallet design enhances Polkadot’s shared security and cross-chain composability, enabling developers to build trustless, decentralized systems.</p><p>For a comprehensive look at our technical approach, see our Final Report.</p><p>Here’s the link to our full final report: <a href="https://github.com/user-attachments/files/20159985/final-report.pdf">https://github.com/user-attachments/files/20159985/final-report.pdf</a></p><h3>About Web3 Foundation</h3><p>Web3 Foundation funds research and development teams building the technology stack of the decentralized web. Established in Zug, Switzerland by Ethereum co-founder Gavin Wood, its flagship project, Polkadot, is a scalable sharded chain that provides a secure environment for cross-chain composability and introduces an advanced governance system for rapid innovation. Learn more at web3.foundation and follow their updates on Medium or Twitter.</p><h3>Contact Us</h3><p>We’re excited to share our progress and welcome any feedback. To get in touch with us to discuss our work, or explore collaboration opportunities, please reach out via email at info@polcry.pt or join our <a href="https://discord.com/invite/HdSUC6djEx">Discord server</a>. You can also follow our updates and engage with us on <a href="https://www.linkedin.com/company/polycrypt/">Linkedin</a> or on X at <a href="http://x.com/PolyCrypt_">@Polcrypt_</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f89fd951a1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/distributed-wallets-for-polkadot-using-tcvrfs-47f89fd951a1">Distributed Wallets for Polkadot using TCVRFs</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrade your NFTs to cNFTs with PolyCrypt]]></title>
            <link>https://medium.com/perunnetwork/upgrade-your-nfts-to-cnfts-with-polycrypt-3f604ec8c20e?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f604ec8c20e</guid>
            <category><![CDATA[art]]></category>
            <category><![CDATA[confidentiality]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 07:04:27 GMT</pubDate>
            <atom:updated>2024-08-06T06:42:32.065Z</atom:updated>
            <content:encoded><![CDATA[<p>In <a href="https://medium.com/perunnetwork/introducing-confidential-nfts-cnfts-e62429567c6b">a previous post</a>, we introduced the general concept of cNFTs. Since then, we have further refined and improved the idea of cNFTs. Since the initial conception, the idea has come a long way and matured into something even more exciting than what we presented initially. This article is part of a multi-part series which aims to re-introduce our product from both a technical and a user’s perspective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*911WVt8Av5RqTLfENX_Y4Q.png" /><figcaption>Figure 1: Access encrypted metadata such as high resolution art work when you own a cNFT</figcaption></figure><h3>Part 1: What are cNFTs?</h3><p>PolyCrypt’s cNFTs are <em>confidential</em> NFTs — NFTs with private metadata attachments only accessible to the current token owner. The creator can set the private metadata and thus create special value for the owner apart from mere ownership of the publicly visible metadata. As blockchains are inherently public, the secret metadata cannot be stored on the blockchain. Instead, we built a service called <em>cNFT Oracle.</em> It employs TEE (trusted execution environment) technology (such as Intel’s SGX) to securely store and manage access to the confidential data in a provable and trustworthy manner. The cNFT Oracle tracks the on-chain ownership status of cNFTs and allows the current owner of the token to request its secret metadata if he proves that he has access to the wallet currently owning the token.</p><p>The ability to have both public and private metadata for a token allows them to be used in many more scenarios, which go beyond ownership of a publicly known good. This may range from special owner-only benefits, such as high-resolution or watermark-free versions of image-type NFTs, or software license keys attached to an NFT, to cryptographic access control for an organisation’s sensitive documents, and even for access rights to premium content of streaming platforms.</p><h3>Case study: watermark-free full-resolution version of an image</h3><p>Conventional NFT collections, which mostly represent ownership of an image or artwork, have the unfortunate restriction that the associated artwork is fully public, and the NFT really only serves as a collector’s trophy. Everyone can see and download and copy the image represented by the NFT, and even create a duplicate collection that also represents the same artwork.</p><p>With cNFTs, the creator can opt to only publish a watermarked or low-quality / thumbnail version of the artwork with his NFT, and make the original full-quality work confidential. He mints his NFT collection as usual, but instead of attaching the original work to the NFT, he only associates a preview version to the token on-chain. Next, he registers the cNFT with the cNFT Oracle service and securely uploads the original work to it. The cNFT Oracle only ever receives and stores an encrypted version of the artwork, so the service provider cannot leak it. The decryption key is secured via the hardware key burned into the TEE module of the cNFT Oracle’s CPU. This protects the data from being accessed in an unintended manner. Now, everyone can still see and enjoy the painting, but only an actual buyer will be able to access the full-quality version. The creator can now advertise his artwork without devaluing it or risking theft, and he can trust the cNFT Oracle on a technological level to keep his work secret.</p><p>The buyer can now buy or auction the NFT to get access to the real artwork, while also having assurance that he is buying a unique premium article. After buying, he can then make a request to the cNFT Oracle to grant access to the original artwork. The oracle confirms that according to the latest state of the blockchain, his account is the current owner of the NFT, and that he is the owner of that account by requiring him to provide a signature belonging to that account. If he proves his ownership and access to the account, the cNFT Oracle now sends him the decrypted artwork. Since the cNFT Oracle runs in a TEE, the servers hosting the oracle service do not see the unencrypted artwork.</p><h3>The capabilities of trusted execution environments</h3><p>This strong security guarantee is only possible since we leverage the trusted execution environment capabilities of modern server-grade CPUs. This technology allows the cNFT Oracle server to cryptographically prove that it is running an unmodified version of the database software, and it can also prove that it is running in a tamper-proof and hack-proof blackbox. Even if a malicious actor manages to get administrator-level access to the cNFT servers, he would be unable to breach the TEE hardware black box that controls access to the encrypted artwork. The data is hardware-encrypted in a way so that only the program that encrypted the data can also decrypt it again. Any attempts to modify the software will be detected by the hardware and make decryption attempts fail. As long as the TEE’s blackbox is not breached at the hardware level, the data stays secure.</p><h3>Conclusion</h3><p>cNFTs allow artists and creators to sell their works on the blockchain without having to publish the full work, and without having to interact with the buyer and manually making the content available to him. This simplifies the technical hurdle for the creator, and makes selling artwork on the blockchain attractive to a wider range of creators who wish to sell premium or exclusive content. The standardized way of access creates technological trust between the buyer and the artist, and makes artwork NFTs interesting for collectors who do not wish to merely have a trophy, but want to exclusively own the work they are buying, with an assurance that he is the work’s sole owner. These vital aspects are important for many kinds of digital tokenization of real or virtual goods, and cNFTs are therefore a vital and solid foundation for many digital tokenisation use cases that were previously infeasible or too complicated to achieve using blockchains alone.</p><p>In the next part of our series on cNFTs, we will highlight more technical details of our product, as well as new features we built that make them much more versatile than was initially planned.</p><p>We thank the Hessian Ministry for Digitalisation and Innovation for funding this project as part of the Distr@l programm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f604ec8c20e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/upgrade-your-nfts-to-cnfts-with-polycrypt-3f604ec8c20e">Upgrade your NFTs to cNFTs with PolyCrypt</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perun Channels on UTXO Ecosystems]]></title>
            <link>https://medium.com/perunnetwork/perun-channels-on-utxo-ecosystems-3c9de70aabd?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/3c9de70aabd</guid>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[utxo]]></category>
            <category><![CDATA[channel]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 07:52:38 GMT</pubDate>
            <atom:updated>2023-07-24T07:52:26.499Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*UUBd9XTt33vbr9Pv" /></figure><p><em>By Jan Bormet and Marcel Kaiser</em></p><h4><strong>Abstract</strong></h4><p>In this article, we provide a comprehensive overview of the current state of the Perun Channel Framework within the context of UTXO ecosystems. Drawing on our expertise from prior integration projects, we offer a discourse on the practical application and benefits of Perun Channels. Furthermore, we compare Perun with other scalability solutions which may not offer the same degree of compatibility with UTXO ecosystems. In the end, we explore the potential applications of channels on ledgers, which we believe will shape the next wave of blockchain technology adoption.</p><h3>Motivation, Background and Applications</h3><p>Channels have emerged as a promising solution for enabling scalable and secure transactions on blockchain networks. In this article, we delve into the role and potential of Channels, with a specific focus on their functioning principle in the context of UTXO (Unspent Transaction Output) based blockchains.</p><p>Traditional blockchain transactions often suffer from scalability limitations and high transaction fees. Channels address these challenges by establishing off-chain transaction channels between participants, allowing them to conduct multiple transactions without burdening the underlying blockchain. By reducing the need for on-chain transactions, Channels enable faster and more cost-effective transactions, leading to improved scalability and enhanced user experiences.</p><p>UTXO-based blockchains rely on the concept of unspent transaction outputs to manage transactional states. In the context of Channels, this model can be leveraged to enable efficient transactions. Participants create a channel contract instance and lock their funds in outputs specific to the channel contract. Once the channel is funded, they can conduct an unlimited number of free off-chain transactions among themselves. These transactions modify the channel’s state while preserving the underlying blockchain’s security guarantees. For Perun, it has been extensively proven that the <a href="https://perun.network/wp-content/uploads/Perun2.0.pdf">protocol is secure</a>.</p><p>They only need to interact with the channel contract and the locked funds again, when they want to close the channel and redeem their funds.</p><p>Participants can freely transact within the channel, with the ability to settle the final state on-chain whenever desired. This flexibility and security make Channels an ideal solution for micropayments, recurring transactions, and machine-to-machine interactions.</p><p>The adoption of Channels brings forth several benefits to blockchain ecosystems themselves. Channels enable instant transaction finality, as transactions occur off-chain and do not require a confirmation from the underlying blockchain right away. Furthermore, Channels reduce transaction costs significantly, as participants can avoid paying on-chain fees for each transaction within the channel. This cost-effectiveness makes this technology particularly attractive for applications requiring low-latency, frequent or small-value transactions.</p><p>Channels also promote privacy, as most transactions occur off-chain, reducing the visibility of transactional details to external observers. This privacy-enhancing feature is crucial for applications that prioritize data confidentiality and user anonymity.</p><p>Moreover, Channels unlock new use cases and business models, enabling innovative applications such as micropayments, gaming platforms, content subscription services, and decentralized finance (DeFi) protocols. By harnessing the potential of Channels, blockchain ecosystems can streamline their transactional processes and improve efficiency.</p><p>Therefore, channels can play a pivotal role in improving a blockchain’s transaction regimen by enhancing scalability, reducing costs, and improving privacy. The functioning principle of Channels in UTXO-based blockchains offers a promising framework for secure and efficient off-chain transactions. Channels are poised to transform various industries and unlock the full potential of decentralized applications.</p><h3>Integration of Perun Channels in UTXO-based Blockchains</h3><ul><li>Account based blockchains usually have singleton contracts. In UTXO-based blockchains, the executed script to consume an output is usually specified along with the output. While the specifics depend on the concrete utxo-based blockchain, we follow the paradigm to deploy the channel smart contract(s) on-chain once. If a set of parties now chooses to open a channel, they instantiate the channel smart contract in the form of one or more outputs referring to the possibly parameterized Perun smart contract code. The key difference to account-based Perun channels is that in UTXO every channel is its own contract instance as an output, while on account-based chains, all channels live in a singleton contract instance.</li><li>The UTXO-based design is superior in that regard, as it provides a cleaner separation between different channel instances. The funds of different channels are locked in different outputs and every channel’s state lives in its own output.</li><li>In our Perun implementation for CKB, we deploy three separate scripts, the perun-channel-type-script (PCTS), the perun-channel-lock-script (PCLS) and the perun-funds-lock-script (PFLS).</li><li>Upon channel opening, a channel participant posts a transaction with the channel smart contract as an output. The type script of this output is an instance of PCTS, parameterized to handle this exact channel instance. It governs the channel’s state as well as the control logic for state transition, funding, closing and more. It is also responsible for storage: The channel’s constants, such as the participants, are stored in the script args and the variable data such as the channel’s state is stored in the transaction’s data field corresponding to the channel cell. The channel cell is locked by a PCLS instance, which basically restricts access to interacting with the channel to the channel’s participants. Finally, the channel is funded by locking funds in a cell locked by a PFLS instance specific to this channel.</li><li>Parties interact with the channel by consuming the live channel cell and reflecting the new channel state after the interaction in the outputs (e.g. in the form of a new channel cell with the same PCTS but updated data). The PCTS verifies the validity of the interaction according to the Perun protocol.</li><li>Parties can close the channel by consuming the live channel cell and the channel’s funds locked to the PFLS, possibly across different outputs, and paying out the channel’s participants accordingly in the transaction&#39;s outputs. Again, the PCTS is executed upon this interaction and verifies the validity of the transaction according to the Perun protocol</li><li>For more details, check out <a href="https://medium.com/perunnetwork/perun-channels-coming-to-nervos-ckb-1d72081ee887">https://medium.com/perunnetwork/perun-channels-coming-to-nervos-ckb-1d72081ee887</a></li></ul><h3>Looking Ahead: Potential and Application Areas</h3><p><strong>Payment Channel Networks</strong></p><p>Perun, named after the Germanic God of Thunder, draws inspiration from the lightning network on Bitcoin. Perun was also designed to be able to span a large-scale payment channel network. These networks can strongly facilitate the way we interact with each other in decentralized ecosystems if widely adopted. A strong case can be made for Perun. Perun’s virtual channels (channels between parties which are only indirectly connected) serve as a gap-closer, enabling the transition from bi-directional payment channels to a full-fledged channel network.</p><p><strong>Games and Applications in real-time</strong></p><p>Perun state channels (an extension to Perun payment channels) can run arbitrary logic and contracts. Due to its lightweight architecture, Perun can achieve ultra-low latency. Thus, channels can be used to scale applications also on the temporal dimension. This property can be exploited for P2P-Gaming. We have already implemented state channels on EVM chains as well as Polkadot with demonstrators.</p><p><strong>Interoperability</strong></p><p>Channels are not only a great tool for scalability on the temporal and economic dimension but can also be used to interconnect different blockchain ecosystems with compatible channel deployments. Effectively, Perun channels allow for cross-rollup and cross-chain communication and transaction. However, it has to be stated that we are in the early stages of enabling cross-chain functionality using Perun.</p><p><strong>Wallet Integrations</strong></p><p>To facilitate the use of channels across these various use cases, seamless integration into existing wallets is crucial. This integration ensures that channel usage becomes convenient and accessible to all users. We are actively seeking partnerships with wallet providers to pilot this integration and explore the potential of Perun’s capabilities. If you are interested in collaborating and piloting this innovative solution, we would love to hear from you.</p><h3>The go-Perun SDK: Abstraction and Application</h3><p>Perun Channels, as implemented on CKB, possess unique properties that distinguish them from other channel implementations.</p><p>One key property is the uniqueness of channels, where each live channel is represented by a single unit (i.e. a cell or a eUTxO or related concept) containing the channel’s type script, lock script, and state. This ensures that a channel’s state is not spread across multiple units, and each channel exists in its own unit.</p><p>The channel state consists of various components such as the ChannelID, balance distribution among parties, IsFinal bit, and version number. These fields are essential for understanding the protocol and can be explored further in our documentation.</p><p>In addition to the channel state, the on-chain smart contract maintains constant, immutable information such as party identifiers and dispute time lock length. There may also be mutable auxiliary state to track funding and the channel’s state machine, but these details are separate from the Perun protocol itself.</p><p>In the case of CKB, for example, a channel is represented by a live channel cell within a transaction. Adjacent to the channel cell, there may be UDT cells locked by the PerunFundsLockScript, which identify assets used for channel funding.</p><p>The script codes for the PerunFundsLockScript, PerunChannelLockScript, and PerunTypeScript are predeployed, each receiving unique arguments to identify the specific channel.</p><p>This structure of Perun channels ensures efficient operation and enables secure and scalable transactions within the Perun network. However, this structure does not necessarily have to be the only channel logic that is possible on UTXO-Chains.</p><h3>Comparison to other Layer-2 Solutions</h3><p>Perun Channels provide a unique approach to off-chain transactions on UTXO-based blockchains, offering distinct features and advantages compared to alternative Layer-2 solutions like rollups and plasma.</p><p>Channel technology is particularly well suited to be implemented on UTXO-based blockchains due to their inherent characteristics. In contrast, designing efficient rollups for UTXO-based chains can be challenging for several reasons.</p><p>One key advantage of UTXO-based chains for channels is the ability to handle multiple state updates efficiently. In UTXO-based channels, each channel has its own unique contract instance, allowing for parallel processing of state updates. This parallelism ensures that the scalability of the channel is not hindered by a single contract instance handling all state updates. In contrast, rollups often face challenges when dealing with multiple state updates, as they typically rely on a single contract instance to process all updates. This can lead to significant latency issues due to clogged networks, especially during mass exits from a rollup, which can massively impact the performance of high-traffic protocols. This is particularly troublesome in the case of an incident with a DeFi protocol, for example.</p><p>Furthermore, UTXO-based chains offer advantages for high-traffic protocols that may not be fully realized in rollup implementations. The unique contract instances in UTXO-based channels allow for optimized processing and efficient handling of transactions, even in scenarios with numerous state updates. This can be particularly beneficial for protocols with high transaction volumes, as they can leverage the parallelism offered by UTXO-based channels to maintain performance and responsiveness.</p><p>One noteworthy detail is that Perun State Channels, also often called App Channels, provide an account-based Layer 2 (channel) ledger abstraction to the UTXO-based Layer 1 of a UTXO-based blockchain. Other channel protocols such as Hydra on Cardano have a UTXO-based Layer 2 channel ledger (they actually even claim isomorphism between Layer 1 and Layer 2). While to our knowledge there is no clear superior or more desirable variant for this, the addition of a channel protocol with an account-based channel ledger provides an account-based Layer 2 abstraction to an otherwise UTXO-based Layer 1. This might ease the migration of blockchain applications, DApps and smart contracts that were historically designed for account-based chains such as Ethereum to all UTXO-based chains that provide this account-based Layer 2 abstraction in the form of Perun State Channels.</p><h3>Conclusion and Outlook</h3><p>This article showcases how the Perun framework achieves scalable and secure off-chain transactions on UTXO-based blockchains and argues why UTXO-based blockchains are generally a good fit. The Perun protocol utilizes state channels to enable parties to conduct numerous transactions off-chain while preserving the security guarantees provided by the underlying blockchain.</p><p>We outlined the technical details of the Perun protocol, including the construction of channels, the communication and settlement protocols, and the dispute resolution mechanism. We describe how Perun achieves scalability by reducing the number of on-chain transactions needed for each participant, thereby alleviating congestion and lowering transaction fees, especially in the case of channel networks (or Perun virtual channels).</p><p>Additionally, there are security features in Perun, such as the prevention of fraudulent behavior and the ability to resolve disputes in a fair and decentralized manner (adjudication). If you want to dive deeply into channel states, feel free to <a href="https://labs.hyperledger.org/perun-doc/concepts/protocols_phases.html#finalize-on-the-blockchain">check out our docs</a>. It also touches upon the privacy aspects of the protocol, ensuring that off-chain transactions can remain confidential and secure.</p><p>We envision Perun Channels as a scalable and efficient solution for various use cases, including micropayments, decentralized exchanges, and multi-party computations. Furthermore, the article acknowledges the ongoing research and development efforts to improve and expand the Perun protocol. It mentions potential future developments, such as the integration of cross-chain transactions and the exploration of advanced cryptographic techniques to enhance security and privacy.</p><p>We present a comprehensive framework for achieving scalable off-chain transactions for UTXO-based blockchains. It highlights the potential of Perun Channels, making it an important contribution to the field of blockchain scalability and privacy in the context of UTXO blockchains.</p><h3>Remarks</h3><p>If you want to reach out to us directly for questions or feedback, feel free to do so via email to <a href="/service/mailto:info@polycry.pt">info@polycry.pt</a> or join our discord!</p><p>This article was inspired by the Nervos Foundation. We are grateful for the ongoing support and cooperation!</p><p>Check out <a href="https://polycry.pt/">https://polycry.pt</a>/ and <a href="https://perun.network/">https://perun.network/</a> for more information or join our discord server!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c9de70aabd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/perun-channels-on-utxo-ecosystems-3c9de70aabd">Perun Channels on UTXO Ecosystems</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perun Channels coming to Internet Computer!]]></title>
            <link>https://medium.com/perunnetwork/perun-channels-coming-to-internet-computer-94d68bee689d?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/94d68bee689d</guid>
            <category><![CDATA[dfinity]]></category>
            <category><![CDATA[channel]]></category>
            <category><![CDATA[the-internet-computer]]></category>
            <category><![CDATA[layer-2]]></category>
            <category><![CDATA[dlt]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Tue, 02 May 2023 14:27:46 GMT</pubDate>
            <atom:updated>2023-05-02T14:27:39.168Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*0ftdm3qHxG4FVribHDNZrw.png" /></figure><p><em>Authors: Steffen Rattay &amp; Marcel Kaiser</em></p><p><strong>Perun Network is developing a blockchain agnostic state channel framework in the form of a golang library: go-perun. After successfully implementing a backend for Ethereum, Polkadot and Cosmos, we are now extending our solution to the Internet Computer and have received a Dfinity grant for the project. Possible use cases for our peer-to-peer framework reach from micropayments to low-latency gaming integrations. We currently implement it on the Internet Computer as a </strong><a href="https://www.reddit.com/r/dfinity/comments/mn5w21/what_is_a_canister/"><strong>canister</strong></a><strong>.</strong></p><h3>Why do we move to ICP as well?</h3><p>Lately, it could be observed how bridges failed and centralization in DeFi and other ecosystems wreaked havoc. In contrast to this, we see the future of Web3 and DLT in general in its interconnectedness and trust-free usability. Like cities, different blockchain ecosystems make up different units of the digital economy. Communities are the builders of bridges, docks and railways between those. Our primary interest is safety and the reduction of trust required in participants. Starting off as a research project for payment channels on Ethereum, Perun has evolved to support several ecosystems and the functionality and degree of abstraction grew massively: in the long haul, we expect to be able to keep expanding Perun and related projects to support an interoperable cross-chain and cross-L2 ecosystem.</p><p>ICP’s architecture adds to the repertoire of chains-to-connect. Its community and developer base is most certainly unique in its interaction with us. We are grateful to have the chance to work with all of you!</p><h3>What are Channels?</h3><p>Two users can lock coins on-chain into a so-called payment channel. Once set up, they send transactions by redistributing the coins between them, without contacting the blockchain. When a channel is closed, the last agreed-upon coin distribution is paid out to the users. A channel is similar to a prepaid card: Topped up once, it can be used for numerous smaller transactions.</p><p>Whenever a malicious user tries to close the channel with wrong values, an underlying smart contract guarantees that no coins can be stolen from honest users. State channels are a more powerful channel variant where users can also run smart contracts off-chain. To overcome the fact that channels only connect two users, channel networks have been proposed. They allow payments to be routed off-chain over multiple channels within the network. This variant is called a virtual channel. However, whenever payments are sent over an off-chain link in such a network, every intermediary on this route must lock collateral coins to ensure the correct payout. On top of this, on-chain payment routing introduces delays and additional fees.</p><h3>Internet Computer integration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*iyfoxRQsZ9M1vkNfw_hfRw.png" /><figcaption><em>Figure 1: Based on the state channel technology, our project is the Perun Framework.</em></figcaption></figure><p>We use a canister since it gives us the possibility to directly integrate channels into the blockchain instead of being a 3rd party service. This also makes it easier to realize future projects like cross-chain channels. A structural overview can be found in Figure 1.</p><p>The Perun canister tracks all on-chain information about state channels. Users interact with it by calling its public functions.</p><h3>The Perun protocol</h3><p>There are four public functions available: <em>Deposit</em>, <em>Conclude</em>, <em>Conclude Dispute </em>and <em>Withdraw</em>. They work together as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*c_80INr4Q-_6QhhEQGxx4g.png" /><figcaption><em>Figure 2: Channel phase diagram.</em></figcaption></figure><p>When Alice and Bob want to open a channel with each other (see Figure 2), they both call Deposit. This sends funds from their accounts to the Perun canister. The channel is then open and can be used for sending transactions as long as both see fit.</p><p>After they are done, two possibilities exist: the honest case and the dispute case.</p><p>In the honest case, both Alice and Bob want to close the channel. Here they can directly call Conclude and withdraw the outcome with <em>Withdraw</em>.</p><p>The dispute case happens when Alice and Bob have different outcomes for the channel in mind; they will then use the canister to adjudicate.</p><p>A dispute can go over multiple rounds and is always terminated by a call to ConcludeDispute. Alice and Bob can then withdraw the outcome.</p><p>Thus, the Perun framework works trust-free, independent of who runs a node.</p><h3>Outlook</h3><p>Hopefully, we piqued your interest! The Payment channels for ICP are almost done and we are looking forward to completing the off-chain part.</p><p>We thank the Dfinity Foundation for supporting this project through a grant and are looking forward to future collaboration!</p><p>Check out our forum post where we want to interact with the community directly. Feel free to reach out.</p><h3>Future</h3><p>We plan to add State channels that can execute more complex logic and are much more interesting than pure Payment channels. Besides this, there are many exciting features in the ICP space. We are especially looking forward to supporting multiple currencies per channel and even cross-chain channels. Stay tuned!</p><h3>Contact</h3><p>If you want to get in touch with us, feel free to ask us in the <a href="https://forum.dfinity.org/t/perun-state-channels-ama-with-polycrypt/14292">ICP forum</a>! We have already contributed in several ways to discussions. Now it’s your turn to ask what you want to know and to express how you feel about our project!</p><p>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 (<a href="https://perun.network/">https://perun.network/</a>) and our <a href="https://github.com/perun-network">GitHub repo</a> or contact us directly by writing us an email at <a href="/service/mailto:info@perun.network">info@perun.network</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94d68bee689d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/perun-channels-coming-to-internet-computer-94d68bee689d">Perun Channels coming to Internet Computer!</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perun Channels coming to Nervos CKB]]></title>
            <link>https://medium.com/perunnetwork/perun-channels-coming-to-nervos-ckb-1d72081ee887?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/1d72081ee887</guid>
            <category><![CDATA[ckb]]></category>
            <category><![CDATA[layer-2]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[channel-technologies]]></category>
            <category><![CDATA[nervos-network]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 09:05:51 GMT</pubDate>
            <atom:updated>2023-03-24T09:04:21.793Z</atom:updated>
            <content:encoded><![CDATA[<p>An in-depth description of the Perun project on Nervos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/0*MMfeb1eUJ7V_nLn_" /></figure><p><strong>The Perun channel framework can be used to make transactions more scalable and to enable a plethora of use cases. The first step towards more advanced use cases like payment networks, blockchain interoperability or application channels is, however, a payment channel. PolyCrypt has received a grant from Nervos to implement Perun on CKB. In this article, we outline how we go about this, what will be possible and how you can use channels soon! We are excited to extend Perun channels to Nervos and believe that we can make a big splash in this striving ecosystem.</strong></p><p><em>Authors: Jan Bormet, Norbert Dzikowski and Marcel Kaiser</em></p><h3>Why Payment Channels?</h3><p>This section aims at a brief overview of the usages and benefits of payment channels for UTXO-based chains, especially Nervos, before we take a deep dive into how we implement Perun on Nervos layer 1.</p><p>To remain in the analogy so elegantly lined out by Nervos, imagine a nervous system that, in addition to myelin coatings making interactions smoother, is also enhanced with super-conducting molecules or nano-sized gold particles. The increase in information throughput (i.e. transactions) increases the performance of the entire system.</p><p>Perun’s payment channels should build the foundation for highly performant off-chain transaction processing on CKB. While payment channels are <a href="https://labs.hyperledger.org/perun-doc/introduction.html">already available</a> for the EVM-compatible Godwoken and can also be used there, the objective of this project is to bring them to Nervos layer 1 blockchain as well. It will benefit the main layer in the following ways:</p><p><strong>Cost-effectiveness</strong>: Payment channels can significantly reduce transaction fees since only the final settlement is recorded on the blockchain.</p><p><strong>Instant transactions</strong>: Payment channels enable fast transactions between parties, as they do not need to wait for CKB confirmations.</p><p><strong>Increased privacy</strong>: By conducting transactions off-chain, payment channels can help protect the privacy of the parties involved.</p><p>Further evolutions of channels (app channels, virtual channel networks, cross-chain channels) will of course add massively to the feature set. These benefits make CKB ready for more use cases revolving around payment in the future.</p><p><strong>Micropayments</strong>: Payment channels can enable micropayments in applications such as online games, content-sharing platforms, and social media platforms.</p><p><strong>Online marketplaces</strong>: Payment channels can facilitate transactions on online marketplaces by allowing buyers and sellers to conduct multiple transactions without incurring fees.</p><p><strong>Payment gateways</strong>: Payment channels can be used as payment gateways in e-commerce platforms, enabling seamless and cost-effective payments for users.</p><p>The following sections provide you with a deeper understanding of how we will make Perun channels a reality on Nervos.</p><h3>Implementation</h3><p>This grant aims to integrate Perun payment channels with CKB. This will foster fast and secure payment settlement on Nervos. As part of this grant, we will adapt the <a href="https://github.com/hyperledger-labs/go-perun">go-perun</a> framework so that two-party single-asset payment channels between users on Nervos can be created, processed, closed and disputed.</p><h4>Protocol specification</h4><p>The following protocol specification will outline how the Perun protocol for payment channels will be adapted and realized using the CKB Cell Model. We want to note that if there are multiple solutions given for any of the following sub-problems, it can be assumed that our initial implementation will use the simpler solution first unless we explicitly mention otherwise. This tends to keep our focus on security, and optimizations are only done afterward. The KISS design principle applies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UvA7AecNZOQEclN4" /></figure><h4>Preliminary</h4><p>The diagrams will use some abstractions for the CKB Cell Model, which eases the formalization and explanation of the protocol adaptations. E.g., we refrain from discussing the explicit transaction structure and the fact that the <strong>data</strong> of a given cell is in reality stored in a parallel array of a <strong>transaction</strong>. What follows are explanations of the required abstractions.</p><p>It is assumed that the reader has a basic understanding of CKB’s Cell Model. This includes knowledge about <a href="https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#lock-script"><strong>Lock Script</strong></a>, <a href="https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md#type-script"><strong>Type Script</strong></a> and their execution contexts.</p><p><strong>Cell: </strong>A cell carries the capacity (CKBytes), Lock Script, Type Script and Data.</p><p><strong>Data:</strong> Arbitrary bytes.</p><p>The Perun protocol can be reduced to five steps, each of which will have a dedicated section showcasing <em>how</em> we consider realizing Perun on CKB.</p><h4>Perun Deployment</h4><p>CKB’s unique design and usability allow us to deploy the channel logic into a <strong>reference </strong>cell, which contains the Smart Contract/Script code. At the time of writing, we are still unsure whether or not we will split up the Smart Contract implementation into a <strong>PerunLockScript</strong> &amp; <strong>PerunTypeScript</strong>. Conceptually, we would like to adhere to CKB’s best practices and extract the access right management to its own lock script, which is associated with a Perun-type script upon channel opening.</p><p>We will consider this split in the following but want to mention that it is possible for us to keep the Smart Contract unified into a single type script if there are simplifying arguments to be found later down the line.</p><h4>PerunLockScript</h4><p>The PerunLockScript shall handle the access rights to a channel’s live cell. It holds that any channel participant is allowed to consume a live channel cell as long as he can prove to the lock script that he is indeed a participant of said channel.</p><p>This is done by committing the public identifier of each participant in the PerunLockScript.args field, s.t. any on-chain TX which tries to consume the live channel cell has to contain a <a href="https://docs.nervos.org/docs/basics/glossary/#witness">witness</a> with the proper proof.</p><p>For the Perun protocol to work, it is <strong>mandatory</strong> that only one live cell for a given channel id exists at any time. We will use the PerunLockScript.args field to store the channel id together with the parameters and signatures of all required parties, to ensure this invariant holds as long as there is at least one honest user.</p><p>Only, if <strong>every</strong> participant is colluding with each other, can a channel be created with the same ID. But this would lead to every party being malicious, which makes any security guarantee obsolete.</p><h4>PerunTypeScript</h4><p>The PerunTypeScript shall handle the validation logic for state transitions. It works together with the PerunLockScript in the sense that both Scripts know about the channel ID they were instantiated for. Furthermore, the PerunTypeScript will ensure that only ever a maximum of one live cell for the managed channel can be created in the output.</p><p>The validation logic for state transitions does not change in this design.</p><h4>Channel Funding</h4><p>Channel funding is the process of collecting funds from all channel participants securely. This includes the possibility of aborting a channel funding and reimbursing all users with their already done investments.</p><p>Funding in a UTXO-based system allows for multiple approaches. We will consider two approaches with increasing complexity.</p><p>Sequential funding of a channel in a predetermined order. Users who want to engage in a payment channel with one another decide on an order of funding prior to funding the channel on-chain. This funding commitment is reflected in the channel’s opening parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cksapEeygwzBBd4t" /></figure><p><strong>Note: </strong>We left out showing auxiliary inputs and outputs for other cells containing the assets which get funded and redistributed, for brevity.</p><p>The above diagram shows how an opened channel with capacity <strong>CN</strong> and initial channel state <strong>CS</strong>, stored in the cell’s data part is consumed by a transaction <strong>TX</strong>, which generates an output cell with capacity <strong>CN’</strong> and a transformed channel state <strong>CS</strong>’. The capacity potentially increased, because the channel might use CKBytes as an asset to fund the channel.<br>Obviously, the <strong>PerunLockScript </strong>and <strong>PerunTypeScript</strong> were already deployed beforehand and the input cell for <strong>TX</strong> originates from a <strong>Channel Opening</strong> done by the first participant. This also results in <strong>CN</strong> containing the funding commitment of the first participant, while <strong>CN’</strong> contains the funding commitments for the first and the successive user. Handling of a cell’s <strong>capacity</strong> regarding a Perun channel will be discussed in the <em>Channel Opening </em>section below.</p><p>Funding a channel in successive rounds requires a time lock, s.t. no user is able to block the funds of other users who already funded a channel, by ignoring his funding round.</p><p>CKB allows the creation of multi-sig transactions. Conceptually, users that want to participate in a channel can create a shared off-chain transaction, which can be signed by all participants together using their respective access rights to <strong>fund </strong>and <strong>open </strong>a channel in one go on-chain. Alternatively, multiple users can create transactions funding their own part in parallel. The PerunTypeScript would then ensure that those transactions are only valid if all participants funded the correct amount. In the case of channels containing more than two participants, this speeds up the process but requires incentive considerations to decide <em>who</em> submits the transaction.</p><h4>Channel Opening</h4><p>Every payment channel has to be uniquely identifiable on-chain. Since we plan to pre-deploy the Perun Smart Contract in a code cell, we require a way to parameterize the Smart Contract. The CKB Cell model has a convenient feature, which effectively allows instantiating a Smart Contract instance by passing proper arguments to the <strong>Script.args</strong> field. This is used by CKBs execution engine to group input and output cells and remove redundant script execution where not necessary. Coincidentally, this allows us to easily ensure the uniqueness and on-chain identification of a living payment channel, by passing a <strong>ChannelID</strong> as the script argument. The execution context for CKB then allows access to grouped input and output to guarantee that no forks of a living channel can be created.</p><p>On the topic of a cell’s capacity. CKBytes not only serve as a native asset which can be used in payments but it is also required that a cell always contains <strong>at least</strong> as much CKBytes as is occupied by the cell’s storage. This lower bound for CKBytes has to be considered upon channel creation and can be considered ahead of time. The sizes of the data structure of a Channel’s State together with the hashes in a cell are constant upon creation and persist until the Channel is closed and dead. Initially, we will let the initial funder of a channel carry the capacity cost. This will be reflected in the PerunTypeScript, s.t. the initial funder is guaranteed to regain his investment.</p><h4>Channel Update</h4><p>Updating a channel happens entirely off-chain. Since CKB does not impose any strict encoding rules, this requires no special attention to the protocol implementation itself.</p><h4>Channel Dispute</h4><p>CKB allows access to block headers from on-chain code. It is guaranteed that all block headers which are referenced in a given TX exist and are already committed on-chain. If the previous conditions are not met, the TX cannot be validated.</p><p>For Perun channels, we require relative time locks with the added capability of updating them after on-chain disputes are resolved or ongoing. In CKB, it is convenient to access the time from required TXs as stated above, which makes it straightforward to handle channel disputes. We will likely use a timestamp-based approach for our relative time locks, but generally speaking, it is also possible to use epochs or block height.</p><p>In detail, we will access the time of input cells via its referenced block header <strong>bn_o</strong>. Together with an additional block header <strong>bn_n </strong>added to the consuming TX, we can compare the original time in <strong>bn_o</strong> with the time in <strong>bh_n</strong>.</p><p>A note on the transaction <strong>since</strong> field: A TXs since field cannot be used for this case because inputs are required to possibly be consumed before the time lock is done. The time lock in question is only an assurance for Perun users to eventually force close the channel if other parties do not respond.</p><h4>Channel Close</h4><p>Channel closing on CKB has the added complexity of properly handling and redistributing CKBytes used in the channel opening to the correct parties.</p><h4>Happy Channel Close</h4><p>In the happy case, all parties agreed on a finalized state. This finalized state can then be used by one of the parties to commit an on-chain transaction executing the <strong>close</strong> functionality of the PerunTypeScript. Closing a channel will redistribute all required funds according to the finalized channel state.</p><p>Additionally, we require a way to reimburse all parties CKBytes which were lent as an upkeep for the on-chain channel state. The exact nature of storing this information is still up for debate, but possible options are the PerunLockScript.args field together with the channel ID, or altering the channel state and keeping it there.</p><p>The final decision will probably depend on whether we can make out a good place for <em>static</em> script information, which is not supposed to change over the course of a channel’s lifetime. Currently, PerunLockScript.args seems like the ideal choice for this.</p><p>Closing a channel will not create a new live cell with the PerunLockScript and PerunTypeScript. Only live cells containing the proper assets are created.</p><h4>Forced Channel Close</h4><p>Force closing a channel is subject to the same CKByte consideration as the Happy Channel Close, with the addition of checking that the time lock expired. No other adaptations are required on the protocol level.</p><h3>Implementation steps</h3><h4>On-Chain</h4><p>The Perun Channel Contract will be implemented as a Script on CKB in Rust using the Capsule SDK. Implementing the script requires an adaption to the Perun protocol, such that it is compatible with the cell model used in CKB. Alongside getting to know Capsule and its workflow, challenges such as a Cell model compatible funding protocol, on-chain state handling and unique on-chain channel identification have to be addressed.</p><h4>Off-Chain</h4><p>Our Off-Chain part consists of both the contract bindings and the perun-nervos-backend implementing the necessary interfaces to connect with our go-perun core. We plan to use the <a href="https://github.com/nervosnetwork/ckb-sdk-go">ckb-sdk-go</a> for this.</p><h3>Remarks</h3><p>This project is funded in a grant by the CKB. Find out more about the project <a href="https://talk.nervos.org/t/polycrypt-payment-channels-on-ckb/7061">here</a>!</p><p>We hope we could inspire you with your use cases and potentially private usage of channel technology! We are always eager to receive feedback and to get in touch with new communities. If we piqued your interest, follow us on Medium, <a href="https://www.linkedin.com/company/14005692">LinkedIn</a>, <a href="https://twitter.com/PolyCrypt_">Twitter </a>or join our <a href="https://perun.network/discord">Discord</a> channel! If you want to rather shoot us an old-fashioned mail, we’d love that, too. hi@polycry.pt</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d72081ee887" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/perun-channels-coming-to-nervos-ckb-1d72081ee887">Perun Channels coming to Nervos CKB</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-backend Perun (with Tutorial!)]]></title>
            <link>https://medium.com/perunnetwork/multi-backend-perun-with-tutorial-832798c91284?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/832798c91284</guid>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[cross-chain-swap]]></category>
            <category><![CDATA[multichain]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Mon, 07 Nov 2022 08:51:36 GMT</pubDate>
            <atom:updated>2022-11-07T08:51:36.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*fj0Kd2LSWKadQsl_" /></figure><p><strong>We have been working on scalability solutions for distributed ledger systems for several years now. Our Perun state channel framework has gone a long way since then. It has been at the core of our development efforts. In this article, we want to give an update on our recent developments on multi-chain backends for Perun and the status quo. When the core challenge of blockchain technology shifted from scalability to blockchain interoperability, so did Perun. Now, it does not only enable massive scalability and application execution within peer-to-peer environments but can support multiple different backends. This article dives into what this means technologically and how you can harness the full potential of Perun channels.</strong></p><p><em>Authors: Philipp-Florens Lehwalder &amp; Marcel Kaiser</em></p><h3>Background</h3><p>Blockchains have a fundamental limit on how many transactions can be processed per second. This scalability problem is drastically amplified with the emergence of microtransactions that allow users to transfer small amounts of money, typically less than 1 cent, and can enable many novel business models, e.g., fair sharing of WiFi connection, or devices paying to each other in the “Internet of Things”. Besides the scalability, there are also several other challenges that need to be addressed by ledger-based cryptocurrencies before they can handle massive volumes of microtransactions. First, in many settings microtransactions have to be executed instantaneously, which is a problem, since confirmation of transactions in ledger-based currencies takes some time. Secondly, and more importantly, posting transactions on the ledger usually costs money. An exciting proposal to address the above challenges is a technology called payment channels, which allows two users to rapidly exchange money with each other without sending transactions to the ledger. Examples of such systems include Lightning and Raiden, where the payment channels can be linked to create payment networks.</p><p>PolyCrypt addresses the inherent scalability and privacy challenges of current blockchain systems. We develop secure decentralized software by applying security- and privacy-by-design principles and by using cutting-edge technologies such as blockchain / off-chain and secure multi-party computation. Perun is a state-channel framework designed for machine-to-machine (M2M) and IoT payments.</p><h3>Perun Use Cases in Different Sectors</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*AHVddMAFcpM0msXX" /><figcaption>A few examples of where Perun is currently used. This is not exhaustive.</figcaption></figure><h4>Identity</h4><p>Decentralized identities (DID) are a key component in the digitization of industrial and corporate processes. In addition to identities for people, identities for objects such as cars, production machines, and even small Industrie 4.0 devices are to be digitized. The decentralized management of these identities is crucial in order to be able to link a large number of application areas. In addition, a decentralized approach offers significantly higher security, as single points of failure can be avoided. Closely related to the concept of decentralized identity is the concept of verifiable credentials. This is a type of certificate that testifies that an identity fulfills a certain property. An example of such a property could be the age of a person, where the Verifiable Credential can be used to prove with certainty that the person is over a certain age, but without revealing the exact age or any other information about the person’s identity.</p><p>Our partners at the Technical University of Darmstadt have already conducted research on a solution for the secure and fair exchange of digital goods and credentials. The protocols developed are about protecting both the buyer and the seller from default risk.<strong> The efficient handling of the protocol on decentralized networks is to be made possible with the help of the Perun framework.</strong> Prior to this, a simple protocol for the secure and efficient payment of certificates based on Perun was conceptualized and implemented in a proof-of-concept project called <a href="https://github.com/hyperledger-labs/perun-credential-payment">perun-credential-payment</a>.</p><h4>Ultra-Low Latency Gaming</h4><p>Gaming is one of the fastest-growing sectors globally and in Web3. We are very proud to have Perun implemented in a promising gaming project already: A joint Web3 Foundation grant proposal from gaming pioneer Ajuna Network and decentralized software specialist PolyCrypt seeks to solve latency issues in blockchain games. Ajuna already uses PolyCrypt’s Perun state channels to pursue this goal; processing gameplay off-chain offers a big improvement in scalability. The new proposal goes even further. The programmable “app channels” can support more complex activity, with a transaction logic defined at channel opening. Ajuna’s infrastructure is a perfect use case for our app channels, showing the great benefit this innovation can offer the gaming community. We have seen growing demand for Web3 gaming applications and are excited to help Ajuna solve the latency problem that has till now been holding back the evolution of this sector.</p><p>Cédric Decoster, CEO of Ajuna, said: “<em>We rely on Perun state channels for the fast, cheap transactions that let us create really exciting, varied games on the blockchain. The development of app channels will enable even greater scaling and even more responsive gameplay, taking our platform further in meeting the needs of ambitious developers to escape blockchain’s traditional limitations.</em>”</p><h4>Enabling Interoperability</h4><p>Real blockchain interconnectivity allows moving value more effectively and in a decentralized manner. This will soon be possible with the use of Perun and its multiple blockchain backends.</p><p>The possibility of swapping tokens from different ecosystems as such is already practical. Only with centralized institutions and many steps, this process has been feasible. Interconnected ecosystems make it possible to minimize trust and transaction costs while maximizing efficiency. Perun wants to move one step further and serve as a cross-chain infrastructure with the possibility to execute logic within a decentral ecosystem. One use case would be to extend the use of DeFi protocols across more ecosystems. This would, to use a popular analogy, be adding bricks to the set of available money LEGO parts. Users can create more complex financial mechanisms by combining a larger variety of services. Another important use case is the Cross-Layer-2 functionality that Perun provides. Offboarding from optimistic rollups can take up to 8 days. Furthermore, Perun can be used for the payment of access to information. In a past project, we made sure that the transfer and payment of information and ontologies over the blockchain works.</p><p>Also, the connection between companies using applications from one blockchain or the other has now the possibility to engage with each other without having to adopt a new system. Thus, businesses no longer need to fear using the <em>wrong ecosystem</em> but can confidently go on their chain of choice now.</p><h3>Technical View on Cross-Chain Interoperability</h3><p>From the beginning on, one of the main goals of go-perun was always to keep the components as abstract as possible to allow maximum modularity. For example, you can use your favorite logging software or database library (for persisting channels) in go-perun but most considerably, go-perun was built blockchain agnostic. This means that go-perun is compatible with almost any blockchain, which is referred to as a “backend” in go-perun, and tries to make only minimal assumptions about it.</p><p>Currently, we have implemented support for four blockchains which you can use by importing the respective backend:</p><ul><li>Ethereum: Available at <a href="https://github.com/perun-network/perun-eth-backend/">perun-eth-backend</a></li><li>Polkadot: Available at <a href="https://github.com/perun-network/perun-polkadot-backend">perun-polkadot-backend</a></li><li>Cosmos: Available at <a href="https://github.com/hyperledger-labs/perun-cosmwasm-backend">perun-cosmwasm-backend</a></li><li>Hyperledger Fabric: Available at <a href="https://github.com/perun-network/perun-fabric">perun-fabric</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*qXPUPBZ3mayFkQKT" /></figure><p><strong>A quite new feature added to go-perun with the latest release v0.10.0 (Janus) is <em>multi-ledger channel support</em>. Multi-ledger channels are channels that contain assets that live on different chains and enable various use cases such as trading across different chains or rollups, providing liquidity, payments for information chains and many more.</strong></p><p>The only limitation go-perun currently has is that we can only open channels between blockchains of the same type, e.g., between two EVM chains such as some Ethereum roll-up or side-chain and the Binance Smart Chain. But it’s not yet possible to open a channel between Polkadot and Ethereum, for example. Also, app channels aren’t supported at the moment, so only regular payment channels do work in the multi-ledger case.</p><p>Two noteworthy technical specialties for the multi-ledger feature are that we now need to identify assets across the ledgers and that the Perun contracts, which have to be deployed on every ledger, need to be aware of their own ledger, e.g., by checking the chain ID. Furthermore, the honest client now needs to detect if the channel states are out-of-sync on the different ledgers (which might happen if one party tries to cheat) and send the according transactions such that they are back in sync again.</p><h3>Tutorials &amp; Demos</h3><p>On <a href="http://tutorial.perun.network/">tutorial.perun.network</a> we provide various hands-on developer tutorials for everybody who want to know how to use go-perun in practice. With our newest tutorial, we also show how to set up a multi-ledger channel where we swap ERC20 tokens between two different blockchains! Check it out <a href="https://labs.hyperledger.org/perun-doc/go-perun/multi_ledger_tutorial/index.html#multi-ledger-tutorial">here</a>!</p><h3>Future Developments</h3><p>The logical next steps for the development of Perun are the simultaneous integration of EVM-compatible and non-EVM-compatible backends. This will enable technology that resolves the scalability and the interoperability trilemmata: trust-free, extensible and generalizable bridges between these types of chains — a technological challenge that remained mostly unaddressed in the past. Furthermore, the capability of app execution within Perun channels will be established in more and more blockchain ecosystems. When creating backends for Perun, we start by enabling single-asset payments and work our way up to arbitrary logic execution dealing with multiple assets and multiple backends. With this progress, Perun will be ready for the future of Web3.</p><h3>Our next steps</h3><p>If you want to get in touch with us to learn more about what we do and how you can benefit from Perun, feel free to get in touch with us!</p><p><strong>Homepage: </strong><a href="https://perun.network/"><strong>https://perun.network/</strong></a></p><p><strong>Discord: </strong><a href="https://perun.network/discord"><strong>https://perun.network/discord</strong></a></p><p><strong>Mail: info@perun.network</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832798c91284" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/multi-backend-perun-with-tutorial-832798c91284">Multi-backend Perun (with Tutorial!)</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dimensions of Scalability in Web3 Gaming]]></title>
            <link>https://medium.com/perunnetwork/dimensions-of-scalability-in-web3-gaming-b0743349eeb?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/b0743349eeb</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[gamescom]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Thu, 01 Sep 2022 12:32:38 GMT</pubDate>
            <atom:updated>2022-09-01T12:32:38.269Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLrftekrbec3kp1Dx3arGg.png" /></figure><p><strong>Gaming is taking off in Web3. The internet of ownership arrives in the fastest growing segment of entertainment. However, so far there is no widely adopted gaming project to rival big <em>classical </em>franchises. The reason for this observation is the scalability of Web3-Gaming approaches. In this article, we classify the different types of technical scalability that are involved in this development while outlining a set of solutions and potential applications of technology.</strong></p><p><em>By Marcel Kaiser &amp; Philipp-Florens Lehwalder</em></p><h3>Gaming and its status quo</h3><p>The most played online games in recent years have had a few aspects in common: they are all free-to-play (or transitioned to being free-to-play), draw massive amounts of players, streamers and professionals, and heavily emphasize the individuality of players. This mechanism is also how they usually generate revenue: sales of individual items for looks (skins), special access to content, premium features, and various gimmicks. This situation can spark controversy if bought virtual goods are subject to change, end of support or “inflation”. While, legally, this generally does not pose a problem for the respective providers of the goods, it can raise questions about ownership in Gaming.</p><p>That’s where blockchain technology, SBTs (soul-bound tokens, i.e. for achievements or game ownership) and NFTs can come in. The use of these technologies guarantees real ownership of progress and goods obtained in the context of gaming backed by the blockchain. While not every item, every avatar and every skin need to be an NFT, individual game studios can assess this toolkit to create trust within their user base. Moreover, the use of NFTs can open up items as an entirely new asset market that can play into financial markets as well. While the phenomenon of <em>Gold Farms</em> should at all costs be avoided, a financial co-incentive to play might be interesting for the growing sector.</p><blockquote>“<strong>Gold farming</strong> is the practice of playing a <a href="https://en.wikipedia.org/wiki/Massively_multiplayer_online_game">massively multiplayer online game</a> (MMO) to acquire <a href="https://en.wikipedia.org/wiki/In-game_currency">in-game currency</a>, later selling it for real-world <a href="https://en.wikipedia.org/wiki/Money">money</a>.People who hold full-time employment as gold farmers often reside in developing nations.”</blockquote><p><a href="https://en.wikipedia.org/wiki/Gold_farming">Wikipedia article on Gold Farming.</a></p><p>However, throwing NFTs into a centralized market ecosystem will not add value to the space. An open and decentralized approach to them has to be taken in order to be not misinterpreted as <em>riding the NFT wave for additional short-term money</em>. A careful, yet scalable approach has to be found. And before business scalability can be discussed, technological scalability needs to be considered. Therefore, it needs to be explained and categorized.</p><h3>Different Dimensions of Scalability</h3><p>In the following segment, we will dissect scalability in some sub-themes. Their relevance for Gaming becomes evident when considering what is relevant for a technology to be truly in the spirit of DLT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uZtCiUxXPjF-Z9RW" /><figcaption>An overview of different types of scalability and their interplay with a few selected examples.</figcaption></figure><h3>Temporal Scalability</h3><p>Temporal scalability describes the speed at which interactions and transactions can be processed. Depending on the type of game and its technological realization, this axis can be crucial. Temporal scalability in regard to gaming is not only defined as not having to wait for 5 minutes until a transaction is completed. Additionally, it can be literal latency between moves. Therefore, a very lean approach is required since 100ms of latency can be, depending on the game, high already.</p><p><a href="https://medium.ajuna.io/polycrypt-and-ajuna-break-down-gaming-barriers-with-app-channel-design-bbd91dd74ef5">PolyCrypt addresses this issue on Polkadot together with Ajuna in the Peruna project</a>. This project is supported by the Web3 Foundation.</p><h3>Cost Scalability</h3><p>The efficiency of a transaction on the blockchain highly depends on its speed but of course also on its price. It is not realistic that the future of gaming can be sold if any move in a game costs players money. More on general blockchain cost scalability <a href="https://medium.com/perunnetwork/overcoming-the-scalability-problem-of-blockchains-b18512a899d1?source=collection_home---5------6-----------------------">in a past article</a>.</p><h3>Spatial Scalability</h3><p>While it is not yet (!) a topic for gaming, the transfer of anything across different platforms and ecosystems can become a topic of interest. <a href="https://medium.com/perunnetwork/the-interoperability-landscape-and-perun-x-5289172029cf?source=collection_home---4------2-----------------------">The interoperability of different blockchains</a> has lately been a hot topic. Perun-X is a solution of PolyCrypt that uses the Perun channel framework to perform cross-chain transactions and transmit information across ecosystems. It is possible to execute any logic within a Perun channel. From information to tokens and even games across different chains, the right amount of spatial scalability might be something to plan for in the future as well.</p><h3>Ease</h3><p>While strictly speaking not a classical subcategory of scalability, ease and good user experience pose an existential challenge for combining Gaming and DLTs. <strong>No gamer wants to sign states at every turn of the game.</strong> Consequently, this factor strongly determines the market scalability of a given product: if someone new to gaming can not understand every facet of it, it is too complicated. However, in comparison to the others, ease shall not be interpreted as a dimension of scalability but rather a bare necessity for games on Web3.</p><h3>The next step for Gaming ecosystems</h3><p>Gaming ecosystems and developers have to get ready for their projects to accommodate future customers’ needs today. While a full transition to a DAO would be unrealistic, gaming stores/infrastructure/access systems need to be at least ready to move on-chain.<strong> PolyCrypt can assist GameStudios in that regard along multiple dimensions with security-by-design software products.</strong> Erdstall is a<strong> plasma-like system </strong>based on a TEE (like Intel SGX) and thus auditable but far more cost-efficient. Figure 2 highlights Erdstall as a measure to move from one end to the other without sacrificing the respective benefits of each approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eSNVX4UabopeqjNE" /><figcaption>Figure 2: The scale between traditional gaming and fully decentral Web3 Gaming. There are steps in between!</figcaption></figure><h3>Conclusion</h3><p><strong>Whether we talk about an RPG expert or a shooting star in shooters, players care about fun. But with the advent of the web of ownership, the fun can be supported by keeping one’s inventories. Before we can talk about the scalability of Web3 gaming as a business, technological scalability needs to be considered and defined. PolyCrypt is successfully working on simplifying each type of scalability in gaming, web3 and business.</strong></p><h3>Remarks</h3><p>If you are interested in learning more about Perun, Erdstall and how PolyCrypt can help you move to the blockchain seamlessly, visit <a href="https://erdstall.dev/">https://polycry.pt/</a>) and or contact us directly by writing us an email at <a href="/service/mailto:info@polycry.pt">info@polycry.pt</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0743349eeb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/dimensions-of-scalability-in-web3-gaming-b0743349eeb">Dimensions of Scalability in Web3 Gaming</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Platooning and Blockchain — Perun as a Digital Car Tow]]></title>
            <link>https://medium.com/perunnetwork/platooning-and-blockchain-perun-as-a-digital-car-tow-69581df7a162?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/69581df7a162</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[mobility]]></category>
            <category><![CDATA[platooning]]></category>
            <category><![CDATA[logistics]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Mon, 07 Feb 2022 11:04:30 GMT</pubDate>
            <atom:updated>2021-08-04T06:51:17.348Z</atom:updated>
            <content:encoded><![CDATA[<h3>Platooning and Blockchain — Perun as a Digital Car Tow</h3><p><strong>In this blog post, we introduce a prime use case for blockchain and Perun State Channel technology in logistics called Platooning. Platooning is a new method of driving, where multiple vehicles are linked together to a convoy. It increases economic and ecological efficiency due to slipstream effects and increases the quality of work for truck drivers because they can rest while platooning. This linkage between the vehicles is achieved electronically and allows the whole platoon to accelerate and brake according to the leading truck’s behavior. With the addition of blockchain and Perun State Channels, a fully decentralized solution can be achieved that enables direct communication and transactions between the leading and following vehicles.</strong></p><p><em>Authors: Songyi Jimmy Lin, Hendrik Amler, Marcel Kaiser</em></p><h3>What is Platooning?</h3><p>The word Platoon originates from military lingo and describes a group of 40 soldiers moving closely together. In our context, a Platoon refers to truck convoys that harness efficiency effects on highways by using automated driving support systems and slipstreams in conjunction with blockchain technology.</p><p>The close proximity of the vehicles in a platoon leads to better fuel efficiency due to reduced air resistance and optimized driving in the platoon. Platooning also helps to reduce traffic congestion and thus aids to shorten commute times. Another benefit of the technology is less downtime for vehicles due to the tight linkage between vehicles that allows autonomous driving systems to take over while drivers can rest.</p><p>The introduction of higher traffic risk is not too much of a concern as the automated braking system enables platoons to drive closer to each other than human drivers. Human failure is the main contributing factor in over 90% of traffic accidents. Several cooperative adaptive cruise controllers for truck platooning have been proposed (Nowakowski et al., 2015). Vehicle-to-vehicle communication and string stability (minimized range errors) can be achieved for arbitrary platooning durations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*bs3kZ6d5ysVtIUi9" /><figcaption>Figure 1: Perun as a digital car tow framework for platooning including benefits and functionalities.</figcaption></figure><p>It is estimated that the average fuel consumption savings which can be achieved by platoons highly depend on the distance between the trucks. The closer the vehicles drive, the higher the efficiency of the slipstream usage. While the numbers vary, the trade-off between safety and fuel efficiency is maximized at around 5 meters of distance (Muratori et al., 2017). The same study finds that also the position of the truck is relevant for the saving of fuel. The leading truck does save as well but not as much as the second and third truck. This observation is confirmed by Lammert et al. Further factors impacting fuel reduction positively are aerodynamic trailer configurations like trailer skirts. Interestingly, the speed of a platoon seems to have no large effect on the savings observed. As a consequence, platoons can help to save up to 20% of fuel for following trailers and around 10% of the leading truck’s fuel consumption. This difference needs to be compensated efficiently if platooning should ever be viable. All in all, platooning has the potential to save a relevant amount of carbon emissions.</p><h3>Leveraging blockchain and Perun channels</h3><p>A decentralized solution has many advantages: It is easier to collaborate with other companies, trust is put not on one but multiple shoulders, it creates transparency, reduces the risk of cyberattacks and can improve privacy aspects if combined with other technologies such as zero-knowledge proofs, SMPC (secure multi-party computation) and trusted execution environments. Especially when multiple logistic companies come together to form a Platoon, a shared state of a Platoon is necessary which blockchain technology can provide. It should be possible to join or leave a platoon freely on the highway. This introduces the challenge of swiftly opening and closing connections to precisely track the duration and distance driven.</p><p>However, saving the entire history of states on a blockchain is highly unfeasible. Therefore, second-layer technology is required. It has to be kept in mind that centralized solutions are to be avoided to allow for high interconnectivity and a minimum of fees.</p><p>The Perun framework is able to harness the potential of platoons by enabling vehicles to create a second-layer channel between them for two purposes</p><ol><li>Enable the transferral of a digital car tow by sending driver’s data (with the ability to execute arbitrary logic in them)</li><li>Enable to pay the driver of the leading truck for their data and the opportunity for the second driver to rest</li></ol><p>This resolves the imbalance of benefits between the two or more participants: the leading truck benefits from platooning but less than the following trucks, therefore the following trucks compensate the leading truck monetarily.</p><p>This type of channel supports offline interactions between the parties and is system-agnostic — it does not matter which DLT or non-DLT mobile payment system the trucks use — even if they are different. They work well if trucks do not know or trust each other: payments must be processed authentically, verifiably and trustlessly. This of course requires the correct distance and driven time known to the smart contract executed within channels. Once these conditions are satisfied, Perun channels are cheap and fast for their users and simplify the payment process enormously for truck drivers. In this particular case, it is important that no complicated interaction between drivers is required and they do not need to stop to perform the channel creation, otherwise, the project might end up costing more than solo driving would have.</p><p>To facilitate this process, we need to know more about the security and the key generation for each truck. Each truck is required to have two pairs of keys: one pair for an external account to pay for the platooning service and another pair to establish a connection with the platoon. The second key pair secures the connection between the trucks. To simplify the interaction with the platoon, this key can be in the form of a QR code, which will be scanned automatically without any driver input. This allows trucks to be profit centers and payment units in this ecosystem without exposing large amounts of company funds to drivers’ actions. In the end, the companies all have reduced operational costs from driver and vehicle as well as additional earnings from leading platoons from time to time, while increasing public safety and reducing carbon emissions using blockchain and state channel technology.</p><p>Oftentimes a truck delivery is completed, the delivering truck drives back empty. The shipment of <em>nothing </em>is highly inefficient and a heavy burden on the environment. This problem can be addressed by collaborating with other companies and decentral coordination of trucks. However, the challenge of truck-sharing is discussed in a plethora of literature and shall be discussed in another post.</p><h3>Conclusion</h3><p>In this article, platooning is introduced. We leverage Perun to enable trustless, decentralized offline micropayments for this use case. Due to the nature of Perun channels, different companies can easily let their transporters apply the framework to save money, the environment and their workers’ energy at the same time by sharing slipstream, automated driving and improved working conditions. Blockchain technology can play a vital role in the decentralization and coordination of transportation burden. Consortia of key players might kick off an initiative to get platoons on the roads.</p><h3>Remarks</h3><p><em>To realize this vision, feel free to contact us. The more partners reach out, the more likely it is for an impact to be made. For more information, write a mail to </em><a href="/service/mailto:Marcel@PolyCry.pt"><em>Marcel@PolyCry.pt</em></a><em>. Otherwise, if you would like to generally ask questions about us or the general article, feel free to join our </em><a href="https://discord.gg/84m6bZ2UMC"><em>discord server</em></a><em>.</em></p><p><em>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 (</em><a href="https://perun.network/"><em>https://perun.network/</em></a><em>) and our GitHub repo or contact us directly by writing us an email at </em><a href="/service/mailto: info@perun.network"><em>info@perun.network</em></a><em>.</em></p><p><em>If you want to learn more about us as a company, visit us at </em><a href="http://polycry.pt/"><em>PolyCry.pt</em></a><em> or follow us on Twitter (</em><a href="http://twitter.com/PolyCrypt_/"><em>@PolyCrypt_</em></a><em>).</em></p><h3>References</h3><p>Muratori et al. (2017): Potential for Platooning in U.S. Highway Freight Transport.<em> SAE International Journal of Commercial Vehicles. 10. 10.4271/2017–01–0086.</em></p><p>Nowakowski et al. (2015): Cooperative Adaptive Cruise Control (CACC) for Truck Platooning: Operational Concept Alternatives.<em> UC Berkeley: California Partners for Advanced Transportation Technology. Retrieved from </em><a href="https://escholarship.org/uc/item/7jf9n5wm"><em>https://escholarship.org/uc/item/7jf9n5wm</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69581df7a162" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/platooning-and-blockchain-perun-as-a-digital-car-tow-69581df7a162">Platooning and Blockchain — Perun as a Digital Car Tow</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perun Channels available on Polkadot]]></title>
            <link>https://medium.com/perunnetwork/perun-channels-available-on-polkadot-72539298fd7?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/72539298fd7</guid>
            <category><![CDATA[layer-2]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[polkadot]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Fri, 03 Dec 2021 09:03:58 GMT</pubDate>
            <atom:updated>2021-11-25T09:49:46.327Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/898/0*1VZ0YbEywxL05LyN" /></figure><p><em>Author: Matthias Geihs</em></p><p><strong>The </strong><a href="https://perun.network/"><strong>Perun Framework</strong></a><strong> 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 </strong><a href="https://github.com/perun-network/perun-polkadot-backend"><strong>Polkadot backend</strong></a><strong> is supported by the </strong><a href="https://web3.foundation/"><strong>Web3 Foundation</strong></a><strong> through its </strong><a href="https://github.com/w3f/Grants-Program"><strong>Grants Program</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/0*c9LHIu9W6PRM2f8g" /></figure><h3>The Perun Framework</h3><p>The <a href="https://perun.network/">Perun Framework</a> is a toolkit for improving scalability and interoperability on and across blockchain networks through <a href="https://perun.network/wp-content/uploads/Perun2.0.pdf">state channel technology</a>. Its core component is the <a href="https://github.com/hyperledger-labs/go-perun">go-perun</a> 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 <a href="https://github.com/hyperledger-labs/go-perun/tree/dev/backend/ethereum">Ethereum-style chains</a> and <a href="https://github.com/hyperledger-labs/perun-cosmwasm-backend">Cosmos chains</a>.</p><h3>The Polkadot Backend for Perun</h3><p>The <a href="https://github.com/perun-network/perun-polkadot-backend">Polkadot Backend</a> enables using Perun Channels on Polkadot. It connects the core Perun protocols to the <a href="https://github.com/perun-network/perun-polkadot-pallet">Perun Pallet module</a>, which we developed earlier and highlighted in a <a href="https://medium.com/perunnetwork/perun-channels-coming-to-polkadot-6b3246295f61">previous blog post</a>. In particular, it implements a Polkadot-specific account model (Milestone 1 of the <a href="https://github.com/w3f/Grants-Program/blob/master/applications/perun_channels-integration.md">Web3 Foundation grant</a>) 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.</p><p>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.</p><p>The backend is available at <a href="https://github.com/perun-network/perun-polkadot-backend">https://github.com/perun-network/perun-polkadot-backend</a> and the repository contains instructions on how it can be used.</p><h3>CLI Demo</h3><p>For demonstration purposes, we also developed a <a href="https://github.com/perun-network/perun-polkadot-demo">CLI client</a>, 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.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXj8wJlzVwSo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXj8wJlzVwSo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXj8wJlzVwSo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f19b0040b330ce35a8fbab79781c8d5/href">https://medium.com/media/3f19b0040b330ce35a8fbab79781c8d5/href</a></iframe><h3>Outlook</h3><p>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!</p><h3>Contact</h3><p>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 (<a href="https://perun.network/">https://perun.network/</a>) and our <a href="https://github.com/perun-network/go-perun/">GitHub repo</a> or contact us directly by writing us an email at <a href="/service/mailto:info@perun.network">info@polycry.pt</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72539298fd7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/perun-channels-available-on-polkadot-72539298fd7">Perun Channels available on Polkadot</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Nifty Erdstall Demo and future use cases of the Erdstall SDK]]></title>
            <link>https://medium.com/perunnetwork/announcing-the-nerd-demo-and-erdstalls-future-use-cases-afa83c3a346?source=rss----797b9bc1662f---4</link>
            <guid isPermaLink="false">https://medium.com/p/afa83c3a346</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[nft-marketplace]]></category>
            <category><![CDATA[plasma]]></category>
            <category><![CDATA[decentralization]]></category>
            <dc:creator><![CDATA[Perun Network]]></dc:creator>
            <pubDate>Tue, 02 Nov 2021 15:15:50 GMT</pubDate>
            <atom:updated>2021-10-29T10:16:57.807Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_W6pWVWv7znkNvHE" /></figure><p><strong>We showcase Erdstall applications and introduce our Nifty Erdstall Demo for you to test. By leveraging a TEE-based Plasma system (Erdstall), we bring highly scalable and customizable functionality to the second layer. With arbitrary programmability and execution within a secure enclave (Intel SGX) we can guarantee untampered execution of arbitrary code. We furthermore give a brief tutorial on how to use our Demo and give examples for Erdstall use cases.</strong></p><p>Authors: Marcel Kaiser, Sebastian Stammler</p><h3>What is Erdstall?</h3><p>Erdstall is a general purpose blockchain scaling technology based on secure hardware. The idea follows a recent research direction that explores the idea of building a Plasma-like system using a Trusted Execution Environment (TEE). Erdstall, which was one of the winning finalists of the ETHGlobal 2020 Hackathon, is an implementation of this technology and is currently being developed by PolyCrypt. It is neither a sidechain nor a separate interoperable blockchain.</p><p>As discussed in <a href="https://medium.com/perunnetwork/overcoming-the-scalability-problem-of-blockchains-b18512a899d1">earlier blog posts</a>, blockchains ― and Ethereum in particular ― do not yet scale very well and suffer from the resulting increase of transaction fees and confirmation delays. Multiple solutions to this issue have been proposed. The most promising directions are so-called 2nd Layer solutions, which lift the transaction load off-chain. In these systems, users only need to send expensive on-chain transactions to join and leave the system and in case of disputes. All other actions, like transferring coins, tokens or even evaluating smart contracts, are processed without touching the blockchain at no or significantly reduced cost. A central building block of these systems is a smart contract, which holds the funds that are processed off-chain. This contract defines all rules on how users can withdraw funds when leaving the system and guarantees that users can exit the system in case of disputes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tdqgQyxMOjBdtgqz" /><figcaption>Figure 1: A screenshot of the Nifty Erdstall (NERD) demo: an NFT you own shows a history of owners as it was minted on Erdstall (gas-free), sold on OpenSea, brought back to Erdstall and resold. You can do all of this in our Demo.</figcaption></figure><p>The Erdstall network is run by a so-called operator. The operator is a server containing a Trusted Execution Environment (TEE), like Intel SGX, which is included in most modern CPUs today. Inside the TEE, the operator runs the Erdstall kernel, i.e., the state progression code. By leveraging the remote attestation feature of TEEs, users of the network can verify that the correct Erdstall kernel is running inside the operator’s TEE. The main tasks of the operator are the</p><ul><li>Forwarding of new Ethereum blocks into the enclave so that it learns about deposits, new token registrations and, possibly, any user challenges and the</li><li>Forwarding of transactions and exit requests by Erdstall network users into the enclave.</li></ul><p>The operator thus becomes an untrusted message broker between the Ethereum network, Erdstall users and the kernel running inside the secure enclave. TEEs have the following interesting features that allow us to simplify the Plasma protocol.</p><p>By employing the <strong>secure execution of code</strong> (the device is developed against outside influence), the implied <strong>private state</strong> (All computation and state in the TEE is kept hidden from the operator unless explicitly specified) and the <strong>attestation features</strong> (users can verify that they are sending their coins to an un-manipulated Plasma system which is running inside a TEE), we can increase the performance of the Plasma system significantly. The operator becomes a simple, untrusted message broker while the TEE processes all transactions in the system. Note that using the TEE, we now have the guarantee that the Plasma state will always be updated correctly. This means we do not need an on-chain state summary, which significantly reduces the costs of the system.</p><p>However, the operator is still untrusted. This means he can still control which inputs get to the TEE and which state updates are forwarded to the users. To account for potential attacks of this kind, we still need to punish the operators should they start withholding information from the users. For this purpose, we require an on-chain challenge-response dispute process in case of data withholding.</p><h3>Erdstall Applications</h3><p>There is a wide range of possible usage scenarios for Erdstall as it offers a highly functional environment with arbitrary code executability. In the following section, we compiled a set of examples where we think Erdstall can provide major advantages compared to other systems.</p><h3>In-Game NFTs</h3><p>One of the most promising use cases of NFTs and blockchain will be gaming. With Erdstall, it will be possible to connect gaming events with blockchain events and in-game items with NFTs. To make an example: the player you just defeated in a duel will drop parts of their inventory for you to loot. The rare item you just found might not suit your class but is definitely valuable to someone else. With the synchronization of your game progress and the Erdstall system, you can either trade the item NFT via Erdstall (gas-free) or, if you are a power user, you can move it to the public blockchain and trade it on public marketplaces. The buyer can then move the item to their inventory and use it. This becomes even more interesting once items carry their own unique history. Who owned the weapon before me? How much damage was dealt with it and how it was upgraded over time. Stats like these can be bound to an NFT which gets updated over time and serves a clear actual purpose — to make the gaming experience richer. Another major benefit is losing the dependency on the game studio. Multiplayer games often will shut down after being in service for years. Thus, items the players owned and worked hard for would disappear and leave the players with nothing. With a connection to a blockchain these items will not be lost and can be continued to be traded as legacy items (which can not be obtained anymore and thus rise in price) or if private servers are being established continue to be used normally. This results in a major longevity increase of games (and let them transcend through time). Depending on the game and the mechanics connected to Erdstall, this vision can vary according to the needs and wishes of the communities.</p><h3>Energy and Certificate Trading</h3><p>In the wake of the energy transition, the flow of energy and electricity will take more complex paths than just from utility to consumer. Energy marketplaces’ functionality spans from final consumption of units, dealing with certificates (for example in the form of NFTs) and connecting real-world events with adaptations to the marketplace. All of these events need to be performed with finality, security and on a high frequency. Therefore, the construct of energy markets is highly complex and can benefit from Erdstall’s properties. The need for local energy trading and its connection to regional and superregional markets is growing with the need for optimal allocation of money and energy on a local level. This is due to the growing need for renewable energy, the availability of local energy storage (electric vehicles) and the consequences for markets and regulators. Topics like demand-side management (the process of forgoing electricity consumption depending on the current local energy prices) and increasing energy prices will attract regular households to participate in energy markets. A complex set of interactions can emerge when tackling the energy sector since grid operation and regulation play a major role. To make sure that energy consumption and grids can be well-managed in a price-efficient and trustless manner, a highly scalable and programmable energy marketplace management system is required. Erdstall-based infrastructure can provide that from the local to the global scale.</p><h3>NFT Marketplace</h3><p>A more basic use case is an NFT marketplace for art and basic NFTs. This subsection will be used to explain to the reader how they can test the Erdstall framework in a live demo on the Goerli testnet. This demo makes it possible to trade, mint, burn and onboard (as well as offboard) NFTs to Erdstall. In the current version, you can get a glimpse of how Erdstall can operate closely aligned with applications like NFT trading on OpenSea. Due to this demo being on the Goerli testnet, you can perform your very own tests with the Erdstall framework.</p><p>In our demo, you can onboard via the Goerli network. Please note that for doing so, you will need to own some Görli testnet Ether (for potential on- and offboarding of NFTs and the wallet signature; you can get some from a faucet like <a href="https://goerli-faucet.slock.it/">this</a> or <a href="https://faucet.goerli.mudit.blog/">this</a>) and a MetaMask wallet. After you onboard, you obtain 1000 PRN tokens which are the currency of this particular marketplace demo. With these, you can take part in the marketplace. You can buy NFTs on sale or mint them yourself for free. You also have the option to mint confidential NFTs (<a href="https://medium.com/perunnetwork/introducing-confidential-nfts-cnfts-e62429567c6b?source=collection_home---4------0-----------------------">see this article for further explanation</a>). Their attached confidential data, like a secret image, will only be accessible to the owner, even when on sale. You are free to move your NFT back to the Goerli network and utilize it on OpenSea or other places.</p><h4><strong>🍵 </strong><a href="https://nifty.erdstall.dev/"><strong>Go and check it out now!</strong></a><strong> 🍵</strong></h4><h3>Want to use Erdstall for your infrastructure?</h3><p>We developed an <a href="https://github.com/perun-network/erdstall-ts-sdk">SDK of Erdstall</a> to enable tech-savvy projects to customize Erdstall according to their vision. The Erdstall SDK is a TypeScript SDK to easily use any Erdstall network in your frontend or backend application. It is easily deployable and arbitrarily configurable. If we got you hyped for Erdstall, reach out to us <a href="/service/mailto:hi@erdstall.dev">via mail</a>!</p><h3>Contact</h3><p>If you are interested in learning more about Erdstall and how it can be used to scale your blockchain application or to build your marketplace, visit our website (<a href="https://erdstall.dev/">https://erdstall.dev/</a>) and our GitHub repo or contact us directly by writing us an email at <a href="/service/mailto:hi@erdstall.dev">hi@erdstall.dev</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afa83c3a346" width="1" height="1" alt=""><hr><p><a href="https://medium.com/perunnetwork/announcing-the-nerd-demo-and-erdstalls-future-use-cases-afa83c3a346">The Nifty Erdstall Demo and future use cases of the Erdstall SDK</a> was originally published in <a href="https://medium.com/perunnetwork">PolyCrypt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>