brenzi
    • 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
    • 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 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
    # Cross-Ecosystem TEER context: https://hackmd.io/@acatangiu/SkxHNEnYcJl ## Management Summary This document shall specify how the TEER token moves across parachains and consensus systems. ## Requirements 1. TEER is the native token of both integritee-kusama (IK) and integritee-polkadot (IP) and shall be of equal value and common total supply cap 2. TEER shall be bridged to Ethereum as ERC20 3. optimize for UX 1. one interaction per gap (one signature) 2. pay fees in TEER and only TEER (swapping behind the scenes is acceptable) 5. Unified governance of IK and IP 6. It must be possible to sunset IK if such decision should be taken by gov eventually. A clear migration path must be sketched 7. (optional) [TEERdays](https://app.incognitee.io/teerdays-lp/) are non-transferrable tokens. It would be desirable to be able to bridge them but keep ownership with same account ## Assumptions 1. we do not want to operate dedicated bridge lanes / do not want to wait for this to be possible 2. We assume that our CEXes (kraken, gate) will migrate to AssetHub for deposits and withdrawals. It is assumed beneficial for Integritee Network if that will be PAH rather than KAH ## Optimal Solution **TEER-k and TEER-p are fungible accross the P<>K bridge such that we can teleport TEER between IK<>KAH<>PAH<>IP.** Advantages: * no derivatives, only one token supply which can be easily audited as TotalIssuance of (IK + IP + PAH + KAH) Disadvantages: * non-trivial to unify governance (electorate volatility) as TEER can move freely during referendum period. This seems not to be possible today. ## Option 1: Adrian's Recommendation (AFAIU) along https://hackmd.io/2HdBtgpsT-WlXZPnGC8WEw?both=#Leverage-the-canonical-PltgtK-AH-Bridge-lane-possible-today TEER-p becomes the reference token and must be minted to full TEER supply. TEER-k becomes a (one-way redeemable) voucher for TEER-p which has to be available on IK (as bridged asset) to be swapped 1:1. TEER-k shall be burned in the process ### Concept Diagram ![image](https://hackmd.io/_uploads/BywAOLi91e.png) Advantages: * possible today * clear path from IK to IP longterm (if this should be deemed desirable). Holders can only move one way * clear path for governance to move to IP Disadvantages: * no meaningful coexistence of IK & IP long term. Transition phase will still take a while becasue we can't force holders to move. Also, CEX migration to PAH isn't entirely in our hands * complex derivation of total supply: sum(TEER-p)+sum(TEER-k) > TEER cap. This might confuse markets #### Q&A * How would an XCM look like to enact a referendum decision from IP to IK? How can we send XCM(transact) from IP to IK without a dedicated bridge lane? * how can a TEER holder move TEER and pay fees only in TEER if interaction with AH is unavoidable? * are there instructions how to spin up a local zombienet including the P<>K bridge and possibly P < snowbridge > Ethereum? ## Option 2: Custom pallets to burn&mint across bridge If we can XCM-transact arbitrary calls from IK to IP (and preserve origin with XCMv5), we can implement a de-facto teleport ourselves: We have other stuff users may want to move (e.g. TEERdays which are non-transferrable tokens) One-way design example, assuming IK will be obsolete and people only move one-way. (it's possible to do this bidirectionally) pallet_k_to_p (only on IK) * burn_and_move_account_to_p(account) * burns TEER-k * burns TEERdays * ignores assets (e.g. KSM) pallet_p_to_k (only on IP) * mint_and_move_account_from_k(...) * mint TEER-p * mint TEERdays advantages: * solves TEERday bridging at the same time * ### XCMv5 Instruction via AH along: https://forum.polkadot.network/t/dotsama-parachains-options-for-using-polkadot-kusama-bridge/10873/2#p-25376-option-1-use-assethubs-bridge-lane-1 notes: * it should be possible to send TEER-k and don't explicitly exchange them to pay fees. if there are pools available for TEER-k on KAH & PAH the exchange should happen automatically ``` // executes on IK with ROOT local origin (must be root to prove that funds have been burned on sender side) // as Alice calls burn_and_move_account_to_p() XCM( // withdraw native asset for fees and pay for transport WithdrawAsset(TEER-k), PayFees(TEER-k), // initiate a transfer to KAH including custom logic InitiateTransfer( // send to KAH dest: KusamaAssetHub, // teleport TEER-k as foreign asset on KAH, remote_fee: Teleport(TEER-k), // move no other assets beyond fee payment assets: (), // executes on KAH remote_xcm: XCM( // for fees ExchangeAsset(TEER-k, KSM), // initiate transfer to PAH including custom logic InitiateTransfer( // send to PAH dest: PolkadotAssetHub, // send KSM to pay remote fees (on PAH) remote_fee: ReserveDeposit(KSM), // include the other assets assets: (), // executes on PAH remote_xcm: XCM( // exchange KSM for some DOT for fees ExchangeAsset(KSM, DOT), // initiate transfer to IP including custom logic InitiateTransfer( // send DOT to pay remote fees (on IP) remote_fee: ReserveDeposit(DOT), // include any other assets assets: (), // executes on IP remote_xcm: XCM( // transact on IP as IK/root Transact(mint_and_move_account_from_k(alice, balance)), // refund any fees not spent RefundSurplus, // deposit all remaining assets to Alice IP Deposit(All, Sovereign(IK)) ) ) ) ) ) ) ) ``` ## Option 3: brute force In the case where we decide that IK should be deprecated in favor of IP, we can simply snapshot IK and apply it to IP (like we did from solochain to IK years back) Why worry about lazy bridging if we can bridge all at once? (we still have sudo on IP) # Test Setup ``` wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2412/polkadot wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2412/polkadot-execute-worker wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2412/polkadot-prepare-worker wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2412/polkadot-parachain wget https://github.com/paritytech/zombienet/releases/download/v1.3.128/zombienet-linux-x64 -O zombienet chmod +x polkadot* yarn global add @polkadot/api-cli git clone https://github.com/paritytech/parity-bridges-common.git cd parity-bridges-common cargo +nightly build -p substrate-relay --release cp ./target/release/substrate-relay ~/local_bridge_testing/bin/ in runtimes repo: git checkout v1.5.1 git apply ./integration-tests/bridges/sudo-relay.patch cargo +nightly build --release -p chain-spec-generator --no-default-features --features fast-runtime,polkadot,kusama,bridge-hub-kusama,bridge-hub-polkadot,asset-hub-kusama,asset-hub-polkadot in runtimes/integration-tests/bridges ./run-test.sh 0001-polkadot-kusama-asset-transfer ``` ## Alternative: dry-run XCM https://hackmd.io/@n9QBuDYOQXG-nWCBrwx8YQ/rkRNb5m71e

    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