Perun Channels AMA | 问题征集 / Questions Open


An AMA with the Perun team is coming up on March 31, focused on payment channels on CKB.

Perun is a generalized state channel framework developed by PolyCrypt, which received a Nervos grant to bring Perun channels to CKB. The framework enables scalable off-chain transactions as a foundation for payment networks, cross-chain interoperability, and application channels.

Questions can be dropped on the Reddit thread below.

:date: March 31 | 11:00 AM GMT :globe_showing_asia_australia: 7:00 PM (Beijing/Singapore) | :european_union: 1:00 PM CEST | :united_states: 7:00 AM EDT / 4:00 AM PDT

:link: https://www.reddit.com/r/NervosNetwork/comments/1s28tb7/the_perun_project/
:globe_with_meridians: perun.network
:page_facing_up: https://medium.com/perunnetwork/perun-channels-coming-to-nervos-ckb-1d72081ee887
:laptop: GitHub - perun-network/perun-ckb-contract: On-chain scripts for the CKB blockchain to handle Perun channels. · GitHub

Perun 团队的 AMA 定于 3 月 31 日举行,主题为 CKB 上的支付通道(payment channels)。

Perun 是由 PolyCrypt 开发的通用状态通道框架(state channel framework),已获得 Nervos 基金会资助,正在将 Perun 通道移植到 CKB。该框架为支付网络、跨链互操作以及应用通道(application channels)提供可扩展的链下交易基础。

欢迎在 Reddit 原帖提前留下问题。

:date: 3月31日 | 北京/新加坡时间 晚上 7:00

:link: https://www.reddit.com/r/NervosNetwork/comments/1s28tb7/the_perun_project/

1 Like

Perun 团队(Ilja、Huy、Hendrik)回答了社区17个问题,核心信息如下:

项目进展: 2023年完成初始 Nervos grant,此后持续开发,2025年新增了虚拟通道(virtual channels)和 CKB-Ethereum 跨链资产互换。跨链 dApp PerunX 正在测试网运行,主网合约部署预计数周内完成。

与 Fiber 的区别: Fiber 走 Lightning Network 路线,通过多跳路由(multi-hop routing)传递支付,每个中间节点需要锁定资金。Perun 是通用状态通道协议(state channel protocol),双方直接开通道,无需中间人,且不限于支付,可以承载任意状态逻辑(游戏、拍卖、Agent 交互等)。

跨链机制: Perun 不使用 HTLC 或适配器签名,而是让 CKB 合约直接验证 Ethereum 原生编码(ABI + keccak256),双方在两条链上各开通道,链下交易,最终在各自链上结算。

CKB Cell 模型的优势: 每个通道独立存在于一个 Cell 中,天然隔离,降低安全风险。CKB 的灵活性还允许 RGB++ 资产(如 RUSD)直接锁入 Perun 通道,无需额外桥接。

未来方向: DeFi 组件集成、Discord/Telegram 打赏机器人、Agent 交互工具(与 x402/MPP 互操作),以及构建跨多链的 Layer2 通道网络,CKB 作为跨链"翻译层"。目前 Perun 已支持 9 条链。以下是AMA全文:

Read the AMA recap of the Perun State channel built for CKB

Read why Perun State channels are different to the Fiber Networks payment channels.

Both are off-chain protocols with slight differences. Perun allows Eth swaps within each channel.

Read below for more information:

“Hi everyone, this is Ilja, Huy and Hendrik from the Perun team. We are happy to join the conversation and answer your questions. There is one question that we have for you: Is there anything that you would like to see from us (e.g. a special feature, more engagement with community, etc.)?”

Question 1
“The Perun grant on CKB was completed in July 2023. Since then, we see no mainnet deployment, no recorded transactions, and no commit activity in the CKB repositories for over a year. With Tempo’s MPP now bringing payment channels back into the spotlight — is PolyCrypt planning a new grant proposal to bring Perun on CKB to actual mainnet deployment and real user adoption? And what specifically has changed since 2023 that makes this the right moment?”

Perun answer

“The original grant scope was completed in 2023, enabling CKB developers to deploy Perun smart contracts and the off-chain payment infrastructures themselves. In our demo repository (GitHub - perun-network/perun-examples: This repository contains code examples for go-perun. · GitHub), developers can see how to use the components critical to Perun payment channels.
The CKB-related repositories are actively being developed. Since 2023, the CKB contracts have been through multiple updates, including the addition of virtual channels in CKB, and the support of cross-chain assets on Ethereum.
For users, we are currently testing our PerunX dApp on Testnet, which enables the CKB and Ethereum community to swap ETH, CKB, xUSD and SUDT assets cross-chain. The Mainnet launch will happen as soon as we have completed testing.”

Question 2
“What are the reasons for the long delay in completing the product?”

Perun answer

“The initial Nervos grant (approved, built and finished in 2023) was an implementation of the Perun protocol to the CKB blockchain, using CKB smart contracts. The grant was aimed at CKB developers, allowing them to build custom payment solutions using the Layer2 Perun protocol. In 2025, payment channels were extended by virtual channels, allowing a more efficient usage of channel funds if more than two users want to perform off-chain payments between each other.
We have recognized the interoperability potential of state channels and have implemented cross-chain asset swaps between CKB and Ethereum. We are currently testing our cross-chain dApp PerunX on Testnets, allowing users on CKB and Ethereum to swap ETH, CKB, xUSD and SUDT assets. As soon as the testing phase is completed, we are going to deploy Mainnet contracts on CKB and Ethereum, making PerunX more usable for the community.
On top of this, we have already started working on DeFi solutions for CKB - there will be more news on that coming out soon!”

Question 3
“What are the key differences between perun and fiber payment channels? What are Perun’s Advantages?”

Perun answer

“Both enable secure Layer2 payment channels. Fiber follows the Lightning protocol, using HTLCs, onion routing and BOLT-style specs for payment channels on CKB. Perun is a peer-reviewed state channel protocol with proven security on any Layer1 blockchain with smart contract capabilities. It also allows cross-chain payment channels, which we are currently testing for asset swaps between CKB and Ethereum. In addition to pure payment Perun also offers State Channel capabilities,
meaning you can run any application that can be mapped to state machine logic (like a chess game) inside a State Channel.”

Question 4
“What tools exist or will exist to interact and implement with Perun channels?”

Perun answer

“The open source tooling consists of the following codebase:

  • go-perun (Go): The core channel framework contains the blockchain-agnostic protocol logic, channel state machine and networking layer. This protocol is the foundation that is used for all Layer1 blockchains with smart contract capabilities.
  • perun-ckb-contract (Rust): The on-chain smart contracts implement the aforementioned Perun protocol in go-perun. GitHub
  • perun-ckb-backend (Go): The off-chain backend connects to the perun-ckb-contract on CKB and interfaces with the go-perun framework. This handles channel opening, state updates, as well as channel closure and state dispute.
    If you are interested in building on Perun, our demo repository (GitHub - perun-network/perun-examples: This repository contains code examples for go-perun. · GitHub) provides the blueprint on how to use these components for payment channels within CKB and also for cross-chain channels to Ethereum.
    You can also check out cross-chain swaps with PerunX here: Perun X

Question 5
“Are Perun channels appropriate for Agentic usage? how well do Perun channels support high-frequency microtransactions (e.g. API billing loops), and what tooling exists today?”

Perun answer

“High-frequency microtransactions within payment channels is an ideal use case for Perun.
Once a Perun channel is open, state updates are signed messages exchanged between the channel participants. This means that there are no on-chain transactions, no gas fees and no block confirmations that would slow down transaction throughput. The throughput is limited only by network latency between the two parties. This allows high performance, e.g. for API billing loops and streaming payments.
As for agentic usage, we believe that Perun is ideal for agent-to-agent interaction. Perun’s generalized state channels allow arbitrary state logic to be executed. This means that AI agents can use state channels to authenticate, negotiate and finalize states with only one on-chain settlement at the end of the agent-to-agent process. We are currently integrating agentic interaction into our channel framework.”

Question 6
“Can Perun channels on CKB directly interact with on-chain scripts (e.g. RGB++ style assets or custom lock scripts), or are they isolated execution environments?”

Perun answer

“Yes, Perun channels are designed to be able to interact with on-chain scripts.
On the asset-side, because RGB++ tokens are represented as Cells with a type script, we can lock them inside a Perun channel Cell just like other CKB native assets. When the channel closes, the settlement transaction outputs the correct token Cells to each party atomically. In practice this means you could run a Perun channel denominated in a stablecoin like RUSD without any additional bridging or wrapping logic on top.
On the custom lockscript side, the CKB lock script model is generic. This means a Perun channel party doesn’t have to be a single keypair. You could have a multisig, a time-locked condition, or even another on-chain script as a direct channel participant. This design space simply doesn’t exist in our Ethereum implementation, where participants are always identified by an EOA or a contract address. We haven’t fully explored this in production yet, but it’s a natural direction as we extend the CKB backend beyond basic two-party payment channels.”

Question 7
“Where do you think payment channels and state channels are ending?”

Perun Answer

“This is a very intriguing question, and its answer largely depends on who you ask :wink:
We believe that Layer2 frameworks like Perun offer lightweight infrastructure to connect peers for micropayments, agent-to-agent interactions and other processes that require high-frequency state updates. In recent years, it has become clear that maintaining Layer2 blockchains is unsustainable for most companies that want to use their own customized payment applications. Perun offers a very maintenance-light option to build your own payment applications with peer-reviewed security.
Another important trend is that the world is multi-chain. There is no single blockchain that is best suited for all potential applications. Therefore, we are confident in our emphasis on interoperability and connecting fundamentally different chains. A trend that we would like to see are standards in Layer2 state representation. Unified channel encoding and cryptography would make cross-chain channel adoption easier, as we could simplify interoperability with many settlement layers. Right now, many projects spend significant resources on reinventing their own encoding, cryptographic protocols and settlement logic.”

Question 8
“The Perun Channels on CKB were announced quite a while ago. Were there challenges to building this on CKB and have any recent developments made this easier? How close to being live is it?”

Perun answer
“The biggest challenge was rethinking how UTXO-based smart contracts and their state mutations work. Account-based chains allow state mutation within the contract, whereas on CKB every state update consumes the old Cell and creates a new Cell, representing the resulting contract state. If multiple users mutate smart contract state within the same blocktime, the state changes have to be ordered to produce a consistent state.
Although this is not a big problem for some applications, more complex applications like our asset swaps and DeFi-related dApps will eventually need a batching mechanism, in which multiple state mutations are finalized on-chain inside a single transaction. We are working on such a mechanism :slight_smile:
As for the Mainnet launch, we are a few weeks away from deploying our payment channel contracts.”

Question 9
“How is liquidity handled in Perun channels?”

Perun answer

Liquidity in Perun channels works like this:
Both parties deposit funds into a Perun smart contract when they open a channel. The channel capacity is then fixed at the sum of both deposits. For example, if Alice deposits 100 CKB and Bob deposits 200 CKB, the channel funds can be transferred between both peers flexibly, while the sum of 300 CKB always stays constant. As soon as both channel participants agree, the channel can be closed with a final ledger and a withdrawal transaction is initiated to distribute funds according to the finalized channel state.

Question 10
“How does Perun leverage Nervos’ Cell model (Extended UTXO) differently than account-based implementations, and what advantages does that unlock for channel state design?”

Perun answer
In our account-based implementation there is a single smart contract handling all channels. On CKB, every channel lives in its own cell, which means there is a natural separation between all channels. This reduces the risk for potential security exploits that allow the withdrawal of locked funds from other channels. It also reduces complexity and potential for vulnerabilities in the backend, as it is much easier to watch for and interpret on-chain events.

Question 11

“You mention cross-chain liquidity (e.g. Lightning/Ethereum). What is the actual mechanism—HTLCs, adapters, or something novel—and where are the current bottlenecks?
How do Perun virtual channels compare to Fiber’s routing model in terms of capital efficiency and pathfinding complexity on CKB?”

Perun answer

“Short version:
Perun does not use HTLCs, Adaptor signatures or any complex cryptography. They do not need to, because CKB is capable of simply using cryptography that is native on Ethereum. Both parties fund channels by sending their funds to the smart contracts on both chains and then perform transactions off-chain, until a final, consistent state is settled on both chains.”

“Long version:
Perun cross-chain channels use shared state encoding. Every Perun payment channel smart contract encodes channel data by using the Ethereum-native ABI format and keccak256 message hashing. The Rust-based smart contracts on CKB (and other blockchains) can therefore verify signed state updates that are native to Ethereum encoding and cryptography. These two characteristics are the backbone of the cross-chain capabilities of Perun.
This also means that parties open one cross-chain channel, trade Ethereum and CKB assets off-chain, and settle the same state on each chain’s contracts, paying out the chain-native assets to their users. This requires no HTLCs and no adaptor signatures, but standard Ethereum cryptography (secp256k1 ECDSA signatures and keccak256 hashing).
One current bottleneck is CKB’s UTXO-based state mutation: since each channel is a live Cell that must be consumed and recreated on every on-chain interaction, only one on-chain state transition per channel can happen per block. This means operations like funding, disputing, and closing require deliberate off-chain sequencing to avoid transaction conflicts. For off-chain channel updates this is not an issue (those are just signed messages between peers). For on-chain operations that mutate the channel cell, a transaction batching algorithm is required to summarize multiple state changes into one final channel cell state, which is then broadcast during each blocktime.
Virtual Channel implementations on Perun and Fiber are fundamentally different.
On Fiber, Virtual Channels are implemented via channel hops, similar to Lightning Network. For instance, if Alice has no channel open with Carol, but an open channel with Bob, she will propagate the payment via Bob, who seeks to propagate the payment with other participants until it reaches Carol. Each hop locks liquidity with an HTLC, again, like in the Lightning Network. Alice’s, Bob’s funds are tied up for the duration of the payment, as well as funds from those who are in the “path” of the payment route to Carol. Routing requires pathfinding through the network graph. Capital efficiency decreases with more hops because each locked up fund requires an additional fee from Alice.
On Perun, Alice and Carol open a virtual channel through Bob. Bob facilitates the opening but does not need to lock funds for every individual transaction between Alice and Carol. Bob’s commitment to lock funds is fixed at channel opening and ends with the closure of the virtual channel. Each transaction inside the virtual channel is feeless. Therefore, Perun’s virtual channels are more capital-efficient for many transactions between the same two parties.”

Question 12
“Can you simply explain to idiots like me what Perun is, and how it differs to Fiber’s?”

Perun answer

“The fact that you are here asking questions about these complex topics means you are not an idiot :slight_smile:
Think of payment channels like a bar tab:
Fiber is like a chain of bar tabs. You want to pay someone across the room? Your tab pays the bartender, the bartender’s tab pays the waiter, the waiter’s tab pays the person. Every middleman holds some cash while the payment travels through. It is the same idea as Bitcoin’s Lightning Network, adapted for CKB. The more “middlemen” are involved, the larger the fee that has to be paid by the original payer.
Perun on the other hand is like opening a shared tab directly with someone. You do not need intermediaries because the CKB smart contract keeps score of signed payments and enforces the correct tab eventually.
The other big difference is also that Fiber is for payments and only for CKB users. Perun can handle any kind of agreement between parties. Payments are the simplest use case, but it is also possible to share data for payments or play chess with a wager. The state changes run off-chain, and the blockchain only gets involved if someone tries to cheat.”

Question 13
“what other projects are you working?”

Perun answer

“- PerunX: our cross-chain dApp enabling asset swaps between Ethereum and CKB. It is currently in the testing phase. The Mainnet deployment will come within a few weeks. We are also working on integrating DeFi components into this, enabling users to earn yield with their CKB and Ethereum assets every time assets are swapped on the platform

  • Tipping bots: We are currently testing CKB tipping applications for Discord and Telegram using our Perun payment channels.
  • Agentic tooling: Interoperability with x402 and MPP
    Apart from Perun applications, we also work on bridging liquidity between the Lightning Network and other UTXO and account based blockchains, enabling atomic swaps between Bitcoin (via Lightning) and native assets.
    The common thread across all of this is that we securely facilitate payments across heterogeneous chain architectures (account & UTXO- based).”

Question 14
“How many blockchains within the system are you building channels for?”

Perun answer

“Nine :slight_smile:
You can see the full support and compatibility list here: GitHub - perun-network/go-perun: 🌔 Perun's Blockchain-Agnostic State Channels Framework in Go. · GitHub

Question 15
“In your previous AMA, you discussed some of the benefits of the cell model architecture in relation to Perun channels. The following is a quote from the AMA: “the cell model in theory allows to implement a more efficient channel opening, where a channel is opened and funded within a single multi-sig transaction. While this is not supported currently by our CKB implementation, we believe that it offers interesting room for optimization in the future.” Since that time the landscape has changed and AI agents have completely transformed perceptions of the utility of channels. Bearing this in mind, can you break down how you see the cell model in particular along with perun channels facilitating the growth of agentic economies? Thanks for doing these AMAs by the way!!”

Perun answer

“Great question, and thanks for the kind words!
Single-transaction channel opening is still on our roadmap. On CKB, transactions atomically consume input Cells and produce output Cells. Both parties can contribute their funds as inputs and receive a single funded channel Cell as output, all in one transaction. The coordination happens off-chain before broadcasting the funding transaction to the CKB blockchain.
We haven’t prioritized this yet, but it becomes a lot more compelling in the context of agents, since agents could open and close channels frequently. For such cases, this optimization would pay off quickly.
The other big thing is isolation. On CKB, every channel is its own independent Cell. An agent can run hundreds of concurrent channels without any of them interfering with each other.
And because Perun keeps almost all the activity off-chain, the blockchain only gets involved if something goes wrong. An agent could be settling thousands of microtransactions with other agents and barely touching the chain at all. This kind of scalability is what agentic economies need, and we believe that CKB’s Cell model is particularly well suited for it.”

Question 16
“Where do you see the future of payment channels in the industry?”

Perun Answer

“We see a few trends converging:
Autonomous agents and devices will need instant, feeless transactions. MPP (Machine Payments Protocol) is a recent development in that direction. State channels are a good choice for these applications because peers transact directly with each other. There is no intermediary Layer2 chain with its own validators or bridge infrastructure to maintain.
Another ongoing trend on our radar is multi-chain interoperability. We envision a global standard for Layer2 state representation. Unified channel encoding and cryptographic verification would simplify adoption and interoperability of cross-chain state channels across different settlement layers.”

Question 17

“In a world where state channels run supreme, how do Perun channels become an inspiration for development?”

Perun answer

“Perun is a blockchain-agnostic protocol with formal security proofs published at academic conferences. You do not need complicated Layer2 chain infrastructure with trusted validators or bridge operators to ensure that an honest party never loses funds even if all other parties collude.
We firmly believe that as Layer2 channels mature, any implementation that handles real-world value will need to adopt the same formal security guarantees that Perun provides. And once they do, they will inevitably converge on a protocol design very similar to Perun’s.
And even with this strong security property, Perun supports arbitrary states off-chain that can be expressed as state machines. A Perun channel potentially can host games, auctions, decentralized identity verification and agentic interaction. We hope that these unique characteristics inspire developers to use Perun as general-purpose off-chain execution environments.”

Question 17

“Imagine that there is a giant faucet of funds available for research and development connected to CKB. What in particular would you propose doing that is novel, experimental and advances both the work of polycrypt and CKB?”

Perun answer

Extend Perun to simple (payment) and advanced agentic use cases such as running apps between agents in a channel.
Create a layer 2 channel network that spans across a variety of ecosystems and CKB acts as a “translator” to make chains interoperable. Make this usable for day-to-day interactions such as a payment for grocery shopping.
New formats (such as the recent Claw&Order Hackathon) that allow more engagement with the community so that we have a platform where people can innovate together with the infrastructure that we built.

Full post on LinkedIn Perun State channels AMA Recap

3 Likes