Kyle Charbonnet
    • 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
      • Zwischenablage
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Reines HTML
Menü Note settings Note Insights Versions and GitHub Sync Sharing URL Create Hilfe
Create Create new note Create a note from template
Menü
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Zwischenablage
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Reines 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 Zwischenablage
       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
    # FLAX Front-End Design This doc focuses on the design of the front end for FLAX. It focuses on any component that users will have to interact with directly. The back-end/contract logic can be found here - https://hackmd.io/m7Hx1375Rwad6_9xRAoLEg?view So far, we plan to create 3 major components for the front-end: 1. Chrome/Brave Extension with Ethereum Provider API - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md 3. Mobile app (similar to the extension) 4. DApp specific web pages - Ex. a FLAX-Uniswap page where users can quickly anonymously swap tokens via Uniswap These peices will allow users to sign and send FLAX transactions from their computer or phone. It also allows DApp developers to build their DApp such that FLAX wallet holders can still interact. ## Extension + Ethereum Provider API ### Goals The extension and Ethereum provider API aim to achieve the following goals: * Allow users to view in browser all of their owned assets stored in the FLAX Vault * Secure storage of FLAX addresses and keys * Allow DApp developers to easily integrate their front-end with the FLAX extension via the Ethereum Provider API * Sign tx data * Custom functions that allow easy creation of spend and refund objects? (easy creation of any objects needed for FLAX transactions, basically an SDK?) * Will also include zk proof generation ### Note Scanning For detailed explanations of the cryptography, see the back-end design doc: https://hackmd.io/m7Hx1375Rwad6_9xRAoLEg?edit A FLAX address consists of three uint256 values: ```javavascript= struct FLAXAddress { uint256 H1; // Compressed Babyjub point h1 uint256 H2; // Compressed Babyjub point h2 uint256 H3; // Compressed Babyjub point h3 } ``` * `pk` - FLAXAddress as shown above * `vk` - Viewing / nullifier key * `sk` - Spending / validating key $$ (vk \cdot H_1 = H_2) \mbox{ and } (sk \cdot H_1 = H_3)$$ The public key (pk) will be visible on-chain to the public. However, every time a user adds funds to the Vault (via makeDeposit or through a refund), they will use a randomized public key. A randomized public key can be chosen by randomly choosing a randomizer `r` and computing $(r \cdot H_1, r \cdot H_2, r \cdot H_3)$. Every time a new note is added to the Vault, an event will be emitted that contains the FLAX address of that note. This will allow the extension (which holds the viewing key `vk`) to scan all events for which notes belong to the user signed in. The extension will need to: * Securely store `vk` and `sk` * Randomly generate a new rerandomized address for every FLAX deposit/refund * Follow events from the FLAX contracts to see which new notes are for the user that is signed in * If a new note has public key: K1, K2, and K3, the wallet will need to check: $$(vk \cdot K_1 == K_2)$$ * If so, then this new note detected does belong to the user signed in. ### Secure Storage ... ### Ethereum / FLAX Provider API #### Concrete next steps 1. Go through Web3.js and Ethers.js APIs and categorize by what we can or cannot keep / directly emulate. 2. For those that we cannot stay compatible with, design new APIs that offer dapps the same functionality. Tentative list: any address-based read and write access to chain require new APIs. 3. Add new APIs to submit transactions to a Flax sequencer. ## Mobile App The mobile app's main purpose is to allow users to interact with FLAX via their phone. This opens anonymous DeFi to mobile users. The mobile app functionality can be based off of the chrome extension. ## DApp Specific Web Pages Since there are some limitations to using FLAX for all of a user's DeFi transactions (ex. handling return data), it might make sense to have FLAX supported web pages for the most popular DeFi applications. These web pages will be custom designed to make user interaction with these services as simple as possible, and as close to the service's own web page (in terms of functionality) as well. Popular services that could benefit from their own custom web page: * Uniswap - would allow for easier handling of liquidity position NFTs * ... ## Appendix ### Other Wallet Extensions Here are other projects working on building EVM wallet extensions. These may be helpful to reference when building ours out. * BLS-Wallet - https://github.com/web3well/bls-wallet/tree/main/extension * Somewhat similar to what we are trying to do since this wallet secures BLS keys (corresponds to FLAX keys) and they rollup transactions by sending them to an aggregator * Block Wallet - https://github.com/block-wallet/block-extension-dev-docs/tree/main/provider * MetaMask - https://github.com/MetaMask * Rainbow Wallet (React native app) - https://github.com/rainbow-me/rainbow

    Importieren aus der Zwischenablage

    Markdown oder Website hier einfügen

    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.

    Diese Notiz ist gesperrt

    Entschuldigung, nur der Besitzer darf die Notiz bearbeiten.

    Limit erreicht

    Entschuldigung, die maximale Länge der Notiz ist erreicht.
    Bitte reduzieren Sie den Inhalt oder nutzen zwei Notizen, danke.

    Aus GitHub Gist importieren

    Aus Snippet importieren

    oder

    Zu Snippet exportieren

    Sind sie sicher?

    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.

    Bitte laden Sie die Seite neu

    Ihre Client Version ist nicht mit dem Server kompatibel
    Neu laden zum Updaten.
    Neue Version verfügbar.
    Versionshinweise
    Neu laden für neue Funktionen
    Ihr Nutzerstatus hat sich geändert.
    Neu laden für neuen Nutzerstatus.

    Sign in

    Forgot password

    oder

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

    Einloggen über Facebook Einloggen über Twitter Einloggen über GitHub Einloggen über Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Hilfe

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

    Dokumente

    Help & Tutorial

    How to use Book mode

    Beispiel Präsentation

    API Docs

    Edit in VSCode

    Install browser extension

    Kontakte

    Feedback

    Discord

    Kontakt

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Beispiel Reference
    # Überschrift Überschrift 基本排版
    - Stichpunkte
    • Stichpunkte
    1. Nummeriert
    1. Nummeriert
    - [ ] To Do Liste
    • To Do Liste
    > Zitat
    Zitat
    **Fett** Fett
    *Kursiv* Kursiv
    ~~Durchgestrichen~~ Durchgestrichen
    19^th^ 19th
    H~2~O H2O
    ++Unterstrichen++ Unterstrichen
    ==Markiert== Markiert
    [link text](https:// "title") Link
    ![image alt](https:// "title") Foto
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Extern
    $L^aT_eX$ LaTeX
    :::info
    Hinweisfeld
    :::

    Hinweisfeld

    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