Aki
    • 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
    # Mycel Litepaper v0.1 ## What is Mycel? Mycel is a decentralized platform that enables the transfer, management, and trading of various accounts across different blockchain platforms. It allows users to create a **"Transferable Account"** that combines their own account with a threshold signature scheme (TSS) signed by validators on Mycel. Mycel is built with Cosmos SDK and Tendermint. Mycel enables you to: - Exchange assets across different blockchain platforms - Transfer assets on any chain from smart contracts or rollups on any other chain - Buy and sell accounts tied to specific activities ## Architecture Mycel's decentralized architecture ensures that no single party has control over the transferable account or the assets within it, maintaining the security and integrity of the users' assets. ### Transferable Account A Transferable Account (TA) on Mycel is a specialized account structure designed to facilitate secure, cross-chain asset management and transfer. It operates using a 2-of-2 multi-signature mechanism, ensuring that both the user and the validators collectively control the account. This design enhances security and decentralization, as no single party can unilaterally control the account or its assets. ![ta](https://hackmd.io/_uploads/HyC4A3pVR.png) **Alice**: A user. **TSS Account**: An account operated by validators. **Transferable Account**: An account on Mycel managed by a 2-of-2 multi-signature, consisting of Alice and the TSS account. #### Create Account Creating a transferable account involves securely linking a user's Bitcoin account to a Mycel account through a series of coordinated actions that ensure the integrity and security of the account creation process. The steps are as follows: ```mermaid sequenceDiagram autonumber box Alice participant AM as Mycel Account end box Mycel participant V as Validators participant TSS1 as TSS Account 1 participant M as Multisig Contract end box Bitcoin participant TA as Transferable Account end AM->>V: execute tx with signature V->>V: verify Alice's signature V->>M: execute tx to create multisig M->>M: create multisig signer M->>AM: assign signer of multisig ``` 1. Alice initiates a transaction from her Mycel account and signs it. 2. Validators verify Alice's signature to confirm her identity. 3. Validators execute a transaction to update the multisig contract. 4. The multisig contract assigns Alice's Mycel account as a signer. #### Transfer Account Transferring a Transferable Account from one user (Alice) to another (Bob) involves the following steps: ```mermaid sequenceDiagram autonumber box Alice participant AM as Mycel Address end box Bob participant BM as Mycel Address end box Mycel participant V as Validators participant TSS as TSS Account participant M as Multisig Contract end box Bitcoin participant TA as Transferable Account end AM->>M: execute tx to update multisig with Alice's signature AM->>V: execute tx to offer to update multisig V->>TSS: collect signature to execute tx TSS->>M: execute tx to update multisig with TSS's signature M->>M: update signer M->>BM: assign signer of multisig ``` 1. Alice initiates a transaction to update the multisig contract with her signature, indicating her intent to transfer the TA. 2. Validators receive the transaction and collect signatures from the TSS account to authorize the transfer. 3. TSS account signs the transaction and the multisig contract is updated to replace Alice with Bob as the new signer. 4. The multisig contract is updated, making Bob the new authorized signer for the TA. #### Request Signature Requesting a signature for a transaction (e.g., sending BTC from a Bitcoin account) involves the following steps: ```mermaid sequenceDiagram autonumber box Alice participant AB as Bitcoin Account participant AM as Mycel Account end box Mycel participant V as Validators participant TSS1 as TSS Address participant M as Multisig Contract end box Bitcoin participant TA as Transferable Account end AM->>M: execute tx to sign Bitcoin tx to send BTC AM->>V: execute tx to offer sign Bitcoin tx V->>TSS1: collect signature to execute tx TSS1->>M: execute tx to sign Bitcoin tx to send BTC M->>TA: execute tx on Bitcoin to send BTC TA->>AB: Send BTC on Bitcoin ``` 1. Alice initiates a transaction from her Mycel account to sign a Bitcoin transaction to send BTC. 2. Validators receive the transaction and collect signatures from the TSS Address. 3. TSS Address sign the transaction, authorizing the multisig contract to execute the Bitcoin transaction. 4. The transaction is executed on the Bitcoin , and BTC is sent to Alice's Bitcoin account. ### Key Generation Mycel is a decentralized platform that aims to provide secure and private transactions while maintaining the integrity and verifiability of the system. One of the key components in achieving these goals is the use of threshold signatures, specifically the [Flexible Round-Optimized Schnorr Threshold (FROST) signature scheme](https://eprint.iacr.org/2020/852). One of the primary reasons Mycel has chosen to employ FROST is its unique property of maintaining a fixed public key, even when the set of signers changes. In Mycel, users' assets are held in transferable account, each associated with a unique public key. The security and ownership of these FAs are distributed among a group of validators using FROST. #### Generate Key **Round1** Every validator $V_i$ samples $t$ random values $a_{(i,j)}$ and use these values coefficients define a degree $t-1$ polynomial $f_i(x)$ $$ a_{(i,j)} \leftarrow \mathbb{Z_q} \forall 0 \leq t< n $$ $$ f_i(x)=a_{(i,0)} + a_{(i,1)}x+...+a_{(i, t-1)}x^{t-1} =\sum^{t-1}_{j=0} a_{(i,j)}x^j $$ Each $V_i$ computes a commitment polynomial $F_i(x)$ $$ \phi_{(i,j)}=a_{(i,j)}G\\ F_i(x)=\sum^{t-1}_{j=0}\phi_{(i,j)}x^i\\ =f_i(x)G $$ Each $V_i$ computes a proof of knowledge to the corresponding $a_{i,0}$ by calculating $\sigma_i$ $k_i$ is a random nonce $\beta$ is a context string unique to this DKG execution, which prevents replay attacks $$ k_i \leftarrow \mathbb{Z_q}\\ R_i = k_iG \\ c_i = H(i,\beta,\phi_{(i,0)}, R_i)\\ s_i = k_i + a_{(i,0)} c_i \\ \sigma_i = (R_i, s_i) $$ Each $V_i$ broadcast $F_i(x) , \sigma_i$ to all other validators though `VoteExtension` Upon receiving them, $V_i$ verifies $F_j(x) , \sigma_l (1\leq j \leq n, j \neq i)$ by checking $$ s_jG = R_j+c_j \phi_{(j,0)} $$ **Round2** Each $V_i$ securely sends to each other validator $V_j$ a secret share $(j,f_i(j))$ which encrypted with validator public key. And verifies their shares by calculating: $$ F_i(j)=f_i(j)G $$ Each $V_i$ calculates signing share $s_i$ by $$ s_i=f_1(i)+f_2(i)+...+f_n(i)\\ =\sum^n_{j=1}f_j(i) $$ Each $V_i$ calculate their publish verification polynomial $F(x)$ and this will be stored with user id (Mycel ID) $$ F(x) =F_1(x)+F_2(x)+...+F_n(x)\\ = \sum^n_{i=1}F_i(x) $$ #### Signing **Preprocess** Create $\pi (1\leq j \leq \pi)$ nonce pair $(d_{ij}, e_{ij})\leftarrow \mathbb{Z}^*_q \times \mathbb{Z}^*_q$ and commitment share $(D_{ij}, E_{ij})$ $$ (D_{ij},E_{ij}) = (d_{ij}G, e_{ij}G) $$ **Sign** Validator (SA) receives message $m$ from user and verify owner. then SA select $t$ validators ($V_i$) and send them unused nonce pair $B$ and $m$ Each $V_i$ compute their response $z_i$ by $$ \rho_i=H(i,m,B)\\ R=\prod D_j (E_j)^{\rho_j}\\ c=H(R,Y,m) $$ $$ z_i=d_i+(e_i\rho_i+\lambda_is_i c)\\ z=\sum{z_i} $$ SA publish signature $\sigma=(R,z)$and each $V_i$ delete used nonce pair ## What to Build ### Exchange assets across different blockchain platforms Transferable Account serves as a gateway for interacting with native assets on any chain like Ethereum-based account-based chains (e.g., ERC-20 tokens) and Bitcoin-based UTXO-based chains (e.g., BTC) ![swap](https://hackmd.io/_uploads/B1bBbpp4R.png) 1. Deposit Assets and Submit Intent: - Alice submits her intent, specifying the desired asset swap. - eg: exchanging 1 BTC on the Bitcoin network for ETH on the Ethereum network. 2. Intent Resolution and Asset Transfer: - The submitted intent is processed by a Solver, an entity responsible for matching and executing the swap 3. Transfer Validation - Application validates the asset transfer to ensure its integrity and correctness. 4. Update Ownership: - Upon successful validation, the ownership of the FA is transferred from the Swapper to the Solver. ### Transfer assets on any chain from smart contracts or rollups on any other chain Transferable Accounts can be accessed and utilized from any chain using callback functions. This allows for seamless asset transfers and interactions between smart contracts or rollups on different chains. The steps involved in transferring ownership of a transferable account containing BTC from an Ethereum smart contract are as follows: ```mermaid sequenceDiagram autonumber box Ethereum participant SC as Smart Contract participant AM as Mycel Contract end box Mycel participant V as Validators participant TSS as TSS Accounts participant M as Multisig Contract end box Bitcoin participant TA as Transferable Account end SC->>AM: Initiate transfer of TA ownership AM->>V: Notify validators of the transfer request V->>TSS: Collect signatures for ownership transfer V->>M: Execute transaction to update multisig contract M->>M: Update owner of Transferable Account V->>SC: Notify Ethereum smart contract of successful transfer ``` 1. Initiate Transfer from Ethereum Smart Contract: A smart contract on Ethereum initiates the process by calling a function to transfer the ownership of a transferable account containing BTC. 2. Execute Callback Function on Mycel: Mycel's infrastructure triggers a callback function to process the ownership transfer of the TA. 3. Validator Confirmation: Validators on Mycel verify the transaction details and signatures to confirm the transfer request. 4. Update Ownership: Upon confirmation, the ownership of the Transferable Account is updated to the new owner specified by the Ethereum smart contract. 5. Notify Smart Contract: The Ethereum smart contract is notified of the successful ownership transfer. ### Buy and sell accounts tied to specific activities Design an account activity market place where buyers and sellers can interact directly to buy, sell, or trade transferable accounts. This will enable parties to discover new trading opportunities and negotiate prices in a decentralized manner. ## References - FROST: Flexible Round-Optimized Schnorr Threshold Signatures https://eprint.iacr.org/2020/852 - Modifying FROST Signers and Threshold https://gist.github.com/nickfarrow/64c2e65191cde6a1a47bbd4572bf8cf8 - Intro to ABCI v2 (aka ABCI++) https://informal.systems/blog/intro-to-abci-v2

    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