Johann Barbie
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # CKB Rollup incentives In the context of [this proposal](https://talk.nervos.org/t/ckb-sidechain-framework/4722) an implicit relayer role has been identified. This document will highlight all transaction types that are required by validators and users to enable the bridge, and offer subsidies and rewards into incentivise the continuous operation. ## Relayer incentives Data needs to be relayed between the different chain. The cost of observing one network, and relaying transaction with data to another network has cost, and needs to be reimbursed/rewarded. ### Transaction/Event In Milestone #1 and #2 of the proposal transactions and events need to be relayed by validators to enable the system. The actions happen in the assumption of a trusted validator set (PoA), and are not present in the final design, hence no incentives will be offered here. ### Anchor Incentives The anchor relay represents the continuous heartbeat of the child chain on CKB. Block data of the child chain is continuously sent to CKB, hashed, and the root is stored in an ever-growing store of child chain history. This is the most cost-intensive operation for the validators. The bridge cell on the CKB that receives the anchors is also managing the stakes of the validators. Two different setups can be distinguished: - **staking with CKBytes:** if staking is done with the native token, then the [Nervos DAO] is an option to receive rewards from secondary issuance. The secondary issuance collected by all validator stakes could be given out with each anchor to the submitting party. - **staking with UDT:** if a custom token is used for staking then new issuance of the token at each anchor can be used to incentivise the validators to continue operating the chain. ### Block Header Incentives Block headers of the CKB network are continuously relayed to the child chain, and the PoW is verified. This operation is much less expensive than the anchor submission, as the cost is incurred on the child chain, but can still lead to delayed minting of locked tokens for users. Rational validators would furthemore not grieve a depositing user, as they would miss out on liquidity, and hence business in the network they are offering. Nevertheless incentives can be constructed. **Block Header Relay Proof:** when a block header is relayed and its Proof of Work is verified successfully, an event is emitted on the child chain with the address of the relayer. This anchor of the block with the included event is then submitted to the bridge cell on CKB, and stored in history. based on the events relayers can construct inclusion proofs and claim rewards from the bridge cell. The rewards should be smaller than anchor rewards, but can be financed from the same sources. ### Lock Proof Incentives Once a lock transaction is mined on CKB, and the block header including that transaction is relayed to the child chain, the user can submit an inclusion proof for the lock transaction and trigger the mint of tokens on the child chain. The operation is in the interest of the user, and can be done by the user or any other party observing the event. It is not clear if an incentivization is need here, but it could be implemented in 2 different ways: **Free proof submission:** the child chain could be configured in the way that the proof submission function does not charge gas, and hence the user would incur no cost for the operation. **Lock Relay Proof:** when a lock is relayed and verified successfully, an event is emitted on the child chain with the address of the relayer. This anchor of the block with the included event is then submitted to the bridge cell on CKB, and stored in history. based on the events relayers can construct inclusion proofs and claim rewards from the bridge cell. The rewards should be smaller than anchor rewards, but can be financed from the same sources. ### Burn Proof Incentives Once the burn proof function is called on the CKB bridge, if the caller is not the beneficiary of the burn, a reward could be paid out. The rewards should be smaller than anchor rewards, but can be financed from the same sources. ## Validator Incentives The validator has two sources of rewards when operating a child chain: - **block rewards** These are rewards issued when a party submits an anchor to the CKB chain. check [Anchor Incentives](#anchor-incentives) for details. Setting the reward size can be done in various ways: - **cost sizing:** Submission of anchors has a cycle and transaction cost. In addition hashes of anchors need to be stored and incur storage cost. Rewards should cover at least the first two costs for the validators. - **speculative sizing:** If a UDT is used for staking in the chain, so the anchor rewards can also be issued in that UDT. The validators speculate on the future value of the token. Any issuance schedule, like a bonding curve, can be used. - **secondary issuance:** If stakes of validators are stored in Nervos DAO, then on each submission of an anchor the collection issuance can be distributed to the submitting validator. Later performance tests will show if the secondary issuance will be able to cover the cost or not. - **gas fees** Each transaction charges the sender an amount of native tokens of the child chain in proportion to the gas spent by the transaction. This function is also relevant to prevent spamming and create prioritization. - **minimum gas fees:** the validators can decide by each block what the minimum fee is that they permit for transactions to enter the mempool. The break-even gas fee can be calculated as: `min gas fee = cost of anchor / sum of gas spent in anchor` As we know from major blockchains the block rewards exceed the gas fees often. On a layer-2 solution the gas fees sum to an even smaller amount, as the capacity in the network is bigger, and dedicated to only one or few applications. ## Nervos DAO integration The Nervos DAO provides a return on CKBytes deposited, which protects the depositor from inflation by secondary issuance. To interact with the DAO, 3 types of transactions are used: - Deposit Transaction - this transaction locks your CKBytes under a special Nervos DAO type script. Funds locked under thing script are called `Nervos DAO deposit cells`. - Initial Withdrawal Transaction - this transaction transforms a `Nervos DAO deposit cell` into a `Nervos DAO withdrawing cell`. The cell is essentially the same, except it stores the block height of the creation of the deposit cell. - Final Withdrawal Transaction - this transaction unlocks the deposit together with the accrued rewards from the withdrawal cell. There are special rules about deposit epochs that last for 180 epochs, or ~30days. Because the Nervos DAO does not allow to withdraw only the rewards from staked CKBytes, it can ot trivially be integrated into the Bridge Cell. Rather an intermediary accounting token will be issued to the validators for all rewards earned. The stake of the validators will be periodically withdrawn and redeposited into the DAO, withdrawn rewards will then be distributed based on the accounting token.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully