Some questions about Polyjuice

Hi all,
Very excited to read the Polyjuice EVM (or general account) compatible layer on Nervos CKB.
Actually,it proves the extensible capability of the cell model and CKB-VM.
But here are some questions I still not sure about after studying.

  1. First, how is the tx fee for transactions based on Polyjuice? Let me take some scenarios for example:
  • How much tx fee should I pay when I move a dApp on ETH (for instance, Uniswap)

  • How much cycles will it cost when users execute the tx on the Polyjuice-Uniswap (like swap or add lp there)

2.Second, how to package the tx on Polyjuice and send it CKB layer to verify? Who executes such stuff for users? Is there any node on the Polyjuice layer?

  • Somehow an intuition emerges in my mind suddenly that there will be numerous ETH KILLERS on CKB,and Polyjuice would be the first if it could be integrated with some layer2 scalability solution.

Some resource :

3 Likes

Hey,

Thanks for your interest in polyjuice.

how to package the tx on Polyjuice and send it CKB layer to verify? Who executes such stuff for users? Is there any node on the Polyjuice layer?

Let me address your second question first here: due to CKB’s design considerations, polyjuice will work together with CKB’s rollup layer godwoken. The very first version of godwoken/polyjuice deployment, will be an optimistic rollup layer with PoA mechanism. But don’t let this upset you, we totally understand PoA has its quirks and is not a real decentralized solution. Godwoken, when its full power is unleashed, will be able to support multiple different configurations and setups. In fact you can think of each godwoken deployment as a separate layer 2 blockchain. In our very first Godwoken deployment, a series of operators will pack polyjuice transactions into godwoken-powered CKB transactions(another way of viewing this, is layer 2 blocks on CKB). But in later version we do plan to introduce PoS based godwoken deployments, which will be more decentralized. Keep in mind godwoken itself, is designed as a permissionless rollup system. PoA, PoS or other consensus model is only required for certain use cases.

In short, a series of godwoken operators will collect polyjuice transactions, assemble them into godwoken-powered CKB transactions(or layer 2 blocks), then submit them to CKB for commitment. We are essentially building a rollup based layer 2(well some people call rollup layer 1 or layer 1.5, depending on personal views, but you get the idea) Ethereum solution here.

With this question answered, we can now answer your initial questions:

First, how is the tx fee for transactions based on Polyjuice?

In polyjuice, there will be concept of pETH, or polyjuice ETH. Previously we talked about there will be many godwoken/polyjuice deployment. Each deployment here, is free to pick the tokens used as pETH in the deployment. For example, some might directly use CKB as pETH, others might use an SUDT as pETH. We would expect most deployments use a type of SUDT as pETH.

The transaction fees are actually paid via pETH. Here we are preserving as much Ethereum concepts as possible: a polyjuice transaction specifics gas limit and gas price(in units of pETH), a godwoken operator mentioned above can then run the polyjuice transaction, collect fees based on consumed gas and gas price, much like Ethereum does. The operator takes those pETH as incentives, then provides CKB fees when it submits a godwoken powered CKB transaction(aka. layer 2 blocks) to CKB. As you can see here, we want to preserve Ethereum concepts in polyjuice as much as possible, while building incentives for operators, since they can collect pETH as fees, much like existing Ethereum miners.

How much cycles will it cost when users execute the tx on the Polyjuice-Uniswap (like swap or add lp there)

We are actively optimizing this so I cannot give a precise number here. Rough estimates is that it won’t be larger than a secp256k1 signature verification. That being said, since we are using a rollup solution, cycle won’t be major concern here.

We definitely are aware that documents for polyjuice are lacking now, and we are indeed working to resolve this situation. Please stay tuned for more information.

3 Likes

Super thanks! I learn numerous lessons from your replying.

Seems that I smell the potential power of Godwoken to adopt more consensus algorithms though I have few ideas of it. Will dig into it.

btw Here is some post I found (Not sure is there any new piece about that )

Could I understand that as a normal tx signature verification on ETH (with secp256k1 and keccak256) ?

No problem, look forward to your update badly.

Over time, I believe that more and more ppl will agree that POS only could be successfully run as Layer2 due to the emergence of Polyjuice & Godwoken.

Could I understand that as a normal tx signature verification on ETH (with secp256k1 and keccak256) ?

This is the part where polyjuice differs slightly from Ethereum. Since godwoken uses different tx structure from Ethereum, the signature signing part might be a bit different. But we are working to minimize the difference as much as possible, also we will document the difference carefully, so you will know where to look at when integrating with polyjuice.

1 Like

Perfect thanks, will it integrate with some implementations like PW lock?
Last time I found it is a beautiful solution compared with the solution from other permissionless blockchains. :zipper_mouth_face:
Of course, I will keep following!

Yes we definitely want to integrate it with solutions like pw-wallet

2 Likes

Honor to share the same thought with you!

1 Like