Some questions about Polyjuice

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