Shu Dong
    • 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
    # Hexlink: The Smart Account Layer for Web3 ## Our vision Hexlink aims to be the unified pluggable smart account layer for Web3, which enables seamless Web2 user experience for Web3 applications. We hope Hexlink account can be easily plugged into various Web3 applications so users can use Hexlink account just like using social accounts(google/twitter/facebook/github e.t.c.) in Web2 applications. The goal of Hexlink is to onboard next billion users to Web3 by improving the end-to-end user experience and simplify the developer experience. ### Existing Efforts: Wallet vs Auth There are already a lot of on-going efforts to improve the user experience via AA. We categorize existing AA solutions as __Wallet__ and __Auth__. Wallet is the most common way for users to interact with dApps. It holds the credentails(e.g. private key) for users to interact with dApps. Users normally login the wallet first and then connect with varies dApps with the wallet. The architecture is as following. <img src="https://hackmd.io/_uploads/B1sMHpfD3.png" height="300"></br> For dApps integrating with wallet, the user experience is very different from traditional Web2 applications. Users have to set up a wallet first before using dApps so the onboarding process is heavily relis on the design of the wallet. Unfortunately, most of the wallets are not good enough to onboard massive Web2 users in. Auth solutions are designed to solve this problem. It provides Web2 level user experience by supporting email/social login and normally creates an embeded wallet for each user when signing up. By getting rid of the dependency of wallet, it reduces the user friction dramatically. <img src="https://hackmd.io/_uploads/rk8Q9NQPh.png" height="300"></br> Auth service normally relies on centralized services to for private key storage and signing. This increases the risk of provider lockout: If the auth service is down or the dApp is blocked by the auth service, users will not be able to login it anymore. The interoperability is also pretty bad since users cannot login dApp B with the account registered in dApp A. ### Comparison | | Wallet | Auth | | ---- | ----| ----| | dApp Interaction | Connect Wallet | Embeded wallet with email/social login | | Target Audiences | To Consumer | To Business | | Unified account across multiple dApps | Yes | No | ## The Unified Smart Account Layer Hexlink aims to unify Wallet and Auth by proposing a unified pluggable smart account layer. Hexlink Account provides better user experience for dApps by supporting email/phone/social login while maintains a unifed account layer across dApps. It is easy to be embeded into different dApps including Wallets. <img src="https://hackmd.io/_uploads/B1sI9VXD3.png" height="300"></br> In article [Demystifying Wallets: A Revolutionary dApp User Flow](https://medium.com/@hexlinkofficial/demystifying-wallets-a-revolutionary-dapp-user-flow-b72c3656f9dd), we break down the wallet into two parts: Account and Assets Managment. Wallet is just a dApp to manage assets owned by the account. After abstracing the account layer out, we see no difference between wallets and other dApps. There are several advantages of Hexlink Account we'd like to emphasize. ### Easy Onboarding Hexlink Accounts are derived from existing identities, such as email, phone number or ENS. In other words, Hexlink gives every email/phone number/ENS user a ready-to-use smart contract account. The mapping from existing identity to wallet address is on-chain so users can use their email addresses and phone numbers as on-chain username to receive cryptos. ### Modularized Hexlink Account is fully modularized. In default the account is setup with very basic functionalities but users can customize their account by enable different plugins such as auth module and social recovery module. ### Auth Agnostic Hexlink Account support varies auth options such as dAuth, ParticleNetwork and Web3Auth. We abstract different auth solutions as "Auth Provider" which user can config in its account with "Auth Module". Users can switch to different auth provider, or even enable multiple auth providers for multi-factor authentication, by configuring its auth modules. The auth module may contain the metadata explaining how the authentication workflow works. We proposed EIP-6662 to standardize the authentication metadata. ## Architecture The overall achitecture is as following. To send a transaction, user will have to authenticate through the auth provider with the user operation to process. The auth provider information may be parsed from the auth module. After authenticated, auth provider will signing the user operation, which will be sent to bundler network. Users can also customize their accounts by enabling varies modules. During the transaction processing, the Hexlink Account contract may call other contracts(e.g. ERC20 token contracts) to finish the execution. <img src="https://hackmd.io/_uploads/rkoqc7QPh.png" width="300"></br> ### Auth Provider Auth Provider is the service or library to authenticate users and sign user operations. It may defines how the private key is preseved and exposes proper signing APIs for users to call. It could be as simple as an non-custodial wallet, or as complicated as an MPC service which does both email/social login and transaction signing. Hexlink abstract EOA based Wallet/Auth solutions as Auth Providers, including non-custodial wallets such as Metamask/TrustWallet, custodial wallets such as Fireblocks/MagicLink and MPC solutions such as Web3Auth and ParticleNetwork. ### The Default Auth Provider for Hexlink Account ![](https://hackmd.io/_uploads/H1XP847wn.png) Hexlink uses __DAuth__ as the default Auth Provider for accounts derived from email, phone number or social accounts. DAuth follows the TEE + ZKP tech stack and supports varies authentication methods including email/sms otp and oauth. We believe DAuth balances well between performance, cost and security. With DAuth, business entities can also self-host private nodes to serve its users to prevent the risk of provider lockout. You can learn more about DAuth [here](https://dauth.gitbook.io/dauth-docs/dauth-network/introduction). For account derived from ENS, the ownership of the account is defined by ENS contract. Users have to use the wallet(e.g. Metamask) holding the owner key to signing the user operation. ### Challenges of EIP-4337 Per EIP-4337, the account cannot access external storage not associated with the contract during validation. However, for our use cases, we have to break the rule since we need to read the dAuth validator registry contrac, which contains all valid validators registered at the network, to check if the request is signed by a valid validator. ![](https://hackmd.io/_uploads/Hkj25EXP2.png) We are solving the problem in two different ways: 1. We are working closely with bundler services to investigate the option to whitelist dAuth validator contract. 2. We are exploring the option to let users pick up one or two dedicated nodes to serve them, and write these validators into the account contract as authentication metadata(EIP-6662). If the validator is not available, users can use social recovery to pick up a different validator set. We face the same issue for ENS derived accounts and are following the same principle here to solve the problem. The EIP-4337 author Yoav proposed a [solution](https://hackmd.io/A7B6VpG7RaCnphITwsym6Q) which we are going to implement. ## Growth strategy Check out our go to market strategy [here](https://www.notion.so/hexlink/PMF-and-Partnerships-737ef28bb02d40d494d93dd9302da80a).

    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