NervosDAO derivation token for staking - dCKB version 2

Summary

In the topic Break the liquidity limitation of NervosDAO, I describe a solution to utilize the NervosDAO CKB. The basic idea is to create a derivation token DCKB from NervosDAO and keep tracking the NervosDAO interest in the real-time, so the DCKB user can stake DCKB to Layer2 or Defi projects and still get the NervosDAO reward.

But the solution is not practical due to the difficulty of tracking the NervosDAO interest. To keep tracking the interest, we need to recalculate the number of derived tokens each time we trade them, and it is more complex to calculate destroyed DCKB and get the corresponded amount of CKB back. It is also impractical for DCKB to get support from crypto wallets.

Now I propose a restricted but simpler solution that gains some advantages and lost some abilities compared to the old one.
In the new solution, instead of using extended sUDT format, we using standard sUDT, so any protocol or tool support sUDT will be easily utilizing our new dCKB token. Compare with the old protocol, we give up the ability to interchange the token derived from different NervodDAO cells.

Terms:

  • sUDT - simple user-defined token RFC: Simple UDT Draft Spec.
  • Meta cell - a cell that holds some derivation metadata.
  • dCKB - the new token we proposed, derived from NervosDAO, dCKB itself is an sUDT.
  • Custodian cell - a cell that holds CKB withdrawaled from NervosDAO.

We describe CKB txs as inputs + [deps] => outputs.

Mint token

Deposit to NervosDAO:

cells => DAO + Meta cell

In the initial, we deposit CKB into NervosDAO and create a meta cell in the same transaction. The Meta cell’s data is a uint64 number I represent how many dCKB we issued. The initiation value of I is 0.

Mint dCKB:

Meta cell + [DAO] => Meta cell + dCKB

To mint dCKB we use Meta cell as input and generate dCKB as an sUDT cell, the admin lock of sUDT is Meta cell’s lock.
The type script of Meta cell ensures that the amount of token we issued must be less than the amount of CKB in the NervosDAO cell. For example, a NervosDAO cell contains X CKB plus Y interest, and we already issued I dCKB(I is Meta cell’s data, which is 0 if we never issued dCKB), then we can issue N dCKB which satisfied N + I <= X + Y, the Meta cell’s data is updated to I' = N + I.

Mint dCKB can be performed multi times, and we can mint new dCKB if we gain enough CKB from the NervosDAO interest.

Notice a dCKB is just an sUDT, so if a wallet already supports sUDT, the wallet also supports dCKB. But since the owner lock of dCKB is Meta cell’s lock, which is unique each time we create a NervosDAO cell, Alice deposited dCKB’A can’t mix with Bob deposited dCKB’B. This is the ability that we give up to simplify the protocol. Thus, the only usage of dCKB is to staking into layer2 or Defi projects.

Transfer

Since our dCKB is just sUDT, we follow the same rule of sUDT to transfer token, except we can’t mix up dCKB tokens from different NervosDAO cells we mentioned above.

A Defi or layer2 project can treat dCKB as it has the same value as CKB to incentivize people staking with NervosDAO assets, and dCKB users can freely relocate staking to different projects to pursue more rewards.

Burn token

Withdraw NervosDAO cell:

dCKB + DAO + Meta cell => dCKB + Custodian cell + CKB

This operation converts the NervosDAO cell into Custodian cell, and sends the Meta cell back to the depositor. Custodian cell is a temporal cell that contains the CKB from the NervosDAO cell.

Burn dCKB:

Custodian cell + dCKB => Custodian cell + CKB

The holder of dCKB can burn dCKB and get CKB from corresponded Custodian cell.

Destroy custodian cell:

Custodian cell => cell

After burnt all the dCKB tokens, the Custodian cell is converted into normal cells and sent to the original NervosDAO depositor.

Conclusion

By leverage the sUDT protocol, we provide a method to easily integrate dCKB into Layer2/Defi projects & tools that already support the sUDT. We also simplify the protocol by removing the interchangeability of the old DCKB and focus on the stake feature.

Advantages:

  • compatible with sUDT
  • Users can reallocate staking between different projects.
  • Users can continually derive dCKB tokens from the interest of NervosDAO.
  • Easy to integrate, a Defi or layer2 project should have minimal effort to support dCKB.

Disadvantages:

  • We lose the ability to interchange tokens derived from different NervosDAO cells.
4 Likes

Here I have provided the Chinese translation :


But I have some questions about that.I still remembered that our intention of dCKB is for breaking the dead liquidity of CKB in dCKB V1.In V2. Imagine that if my dCKB and other’s dckb are not fungible,then who would be willing to accept the dCKB as an asset to stake on their protocol if they can’t redeem it?

And here I also find some interesting cases that we may be able to have a look :

Case 1 : If we want to make dCKB fungible between different depositors

  1. Sharedstake: make sure the staked ETH on ETH2.0 contract could be used on ETH1.0 as an ERC20 asset. Some ETH2.0 liquidity solution like Lido also let me learn a lesson.
  • ETH2.0 also meet a difficulty that user can’t take their ETH back at a short time due to their terrible progress of ETH2.0.
  • Sharestake’s solution allows ppl to stake any amount ETH to their protocol and packed it into 32 ETH to interact with ETH 2.0 staking protocol. And users could get the vETH as long as they deposit their ETH here. And even the Sharedstake providing the liquidity pool of VETH/ETH with LM reward to bootstrap ppl add their pair into the pool so that vETH could be redeemable.
    -Some protocol like Badger which integrates the yVault also makes user make profits more easily,but this may be the other story.
  • What I learn from such cases :
    1. The possibility to make ppl deposit ckb on a specific address and then to mint dCKB with receipt.And the script would be deposit CKB to NervosDao and allow user to mint dCKB according to the amount of CKB they deposit.(the security of asset should be considered of course)
    2. The CKB/dCKB liquidity pool on AMM like Gliaswap also could help if there are some reward exist there.

Case 2 : If we want to keep the dCKB not able to interchange ,how about NFT ?

Inspired by Aavagotchi,which is a NFT&DeFi project that allow ppl stake their aToken(deposited token from Aave lending protocol )here and mint the unique NFT,and it also could redeem as Atoken and got their asset back.

Is it possible to combine it with something like Pixel project on CKB?
And users still could redeem their CKB back when they burn their NFT minted by NervosDao cell .

There must be some ideas that are not very mature. Thanks for your reading and consideration.

@jjy recommend the case of Sushi and XSUSHI.
XSUSHi is a token as a deposit recipient for Sushi.
And right now it could be deposited on Aave .

@WilliamsBlock @GooDog Hi guys, I believe it is easy to derive interchangeable tokens from dckb-v2 if we really want to do it. But from the point of view of development & usability, it is a good starting point to only use dckb as a staking token for Defi & layer2.

1 Like

Yeap,but my concern is that if is not token that other could redeem into CKB,who will be willing to let it be an asset for staking or layer 2 on DeFi?
E.g. Today I could redeem corresponding DeFi government token from the Atoken on Aava if I receive it no matter who mint such kind of staking token. But it seems that Bob can’t redeem Alice’s dCKB into CKB due to being lack of Alice’s lock.
Not sure that I have misunderstood it or not lol.Hope it would not be an issue.

Of course, a holder can redeem dckb into CKB, and this operation needs to convert the NervosDAO cell to a normal cell, so the interest is stopped. I can’t see any reason to forbid this.

1 Like

That seems that my point :

What I truly care about is this.
Does that mean that others can’t redeem the dCKB I mint into CKB even though I can send it over to anyone else?
If so,this asset must be lack of liquidity like NFT. In that case,DeFi protocol would never benefit from users’ staking/depositing dCKB here because mydCKB can’t be spent by others or interchange with otherdCKB.
Not sure I have misunderstood or not.
But I truly hope the dCKB idea work soon and adopt by users.

Man,I remember that you are a master of lock script.If it is redeemable for specific third party when the Meta cell got translated.And then there must be some relationships with Nervos Dao cell through some awesome tricks of the lock script.
Hope I got a bingo from your respond.