DragonMf
    • 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
    • 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 Versions and GitHub Sync Note Insights 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ### UNDERWEI; a P2P Cross-chain Bridge ![1-intro 1](https://hackmd.io/_uploads/BksW72uwC.png) I am a new bridge, I come in peace, and am accessible for all. An open-source peer-2-peer bridge is where my label falls. **[Try me!](https://under-wei.vercel.app/)** --- My bridge is a public good, where autonomy is key to transact. Through new mechanisms we prevent major security threats. - I have no on-chain oracle, or any oracle at all outside of our front-end price recommendation. - I don't use or incentivise a large liquidity pool. - I utilise EigenLayer AVS to protect our verification. - I don't mint, burn or lock any tokens. #### How do I do this? ![Untitled (10)](https://hackmd.io/_uploads/Sylyf2_wC.png) Our contracts work through a Dutch auction mechanism which incentivices nearterm P2P bridge arbitrage. Here you can pay a premium to have your bridge request taken quicker, or earn a premium by providing the tokens that are requested on various chains. Users post their desired amount of tokens to be bridged, alongside a rate they would ideally want, the minimum rate they are willing to accept for their tokens, and the timeframe over which the discount adjust itself linearly. ### Ex. 1 Alice has 5 ETH on Ethereum and wants to receive 15.000 USDC on Polygon. Alice chooses her offer to be open for 7days at a minimum rate of 14.850 USDC recieved on Polygon. --- *"Once someone posted their request (ex 1.), others have the ability to arbitrage this request on the destination chain, thus allow the users tokens to be bridged.""* --- ### Ex 1.1 Bob notices almost immediately via the front-end (or directly through the contract) that there is an open standing request for 15.000 USDC on Polygon for 5 ETH on Ethereum. As Bob could use some ETH at a fair price, and needs it now, he swaps the tokens without a profit. **"What a CHAD!"** ### Ex 1.2 After 3,5 days Bob notices that there's an open standing request of 14.925 USDC on Polygon for 5 ETH on Ethereum. Bob decides to take the request by depositing USDC on the requested chain and receives the ETH on Ethereum. Bob earned 75 USD in ETH on Ethereum, and Alice has her USDC on Polygon. --- *"Once the request has been deposited, **underwei** sends an event to the AVS operators (performers), whom will verify and prove the requirements of the transfers (token identicity, value, auction validation). Once the performer creates the proof, this gets send to the AVS attestors who wil verify this proof based on the task logic."* **§NEED TO FLESH OUT MORE§** *"After the verification, **underwei** utilises LayerZero to communicate the finalising/closing of the verified auction on both contracts, and distributing the funds to Alice and Bob, and the operators can claim their fees in the same contract."* **§NEED TO FLESH OUT MORE§** --- ### Tech Stack #### AVS Task Summary: 1. The performer is elected through a round robin mechanism, this is the blocknumber modulor the number of operators 2. The performer will listen to the network, and everytime an event is emitted the performer runs the task logic. This latter consists of verifying the ability of creation of the transaction. (variable; txAccepted) - Verify that Auction will be accepted before its expiration - Verify the P2P agreed exchange price - Verify that the tokens to be identical 4. The performer sends his result to the attestors network. All the validators will simulate the tx in their turn. And verify if they have the same output. 6. If more than 66% of the network agree, then the task is valid and executed on chain. --- #### Frameworks and Languages **Contracts:** Solidity **Front-End:** next.js **Restaking:** Eigenlayer, Othentic, AVS WebAPI(Javascript), TaskPerformer (Javascript) **Cross-Chain Communication:** LayerZero (Solidity) --- ### Deployments #### Links Website: - [demo](https://under-wei.vercel.app/) Github: - [Front-End](https://github.com/Benoitded/UnderWei) - [Contracts](https://github.com/Tranquil-Flow/shared-security-hackathon-contracts) AVS: - §NEED TO ADD Link§ #### Contract Addresses *HOLESKY* **AuctionReward:** [0xafaFB84a52898Efe2CC7412FCb8d999681C61bbc](https://holesky.etherscan.io/address/0xafafb84a52898efe2cc7412fcb8d999681c61bbc#code) **Dummy WETH:** [0x4cB2a1552a51557aB049A57f58a152fB832B159f](https://holesky.etherscan.io/address/0x4cb2a1552a51557ab049a57f58a152fb832b159f#code) **Dummy USDC:** [0x1FB7d6C5eb45468fB914737A20506F1aFB80bBd9](https://holesky.etherscan.io/address/0x1FB7d6C5eb45468fB914737A20506F1aFB80bBd9#code) **BULLET:** [0x357eA97718b13A37555a253d828cE1fda0dD212B](https://holesky.etherscan.io/address/0x357eA97718b13A37555a253d828cE1fda0dD212B#code) **METROCAR:** [0xF617152555038b91EBF1B7C44c1c2D85270d9033](https://holesky.etherscan.io/address/0xF617152555038b91EBF1B7C44c1c2D85270d9033#code) *AMOY* **AuctionReward:** [0xafaFB84a52898Efe2CC7412FCb8d999681C61bbc](https://amoy.polygonscan.com/address/0xafafb84a52898efe2cc7412fcb8d999681c61bbc#code) **Dummy WETH:** [0x4cB2a1552a51557aB049A57f58a152fB832B159f](https://amoy.polygonscan.com/address/0x4cB2a1552a51557aB049A57f58a152fB832B159f#code) **Dummy USDC:** [0x1FB7d6C5eb45468fB914737A20506F1aFB80bBd9](https://amoy.polygonscan.com/address/0x1FB7d6C5eb45468fB914737A20506F1aFB80bBd9#code) **BULLET:** [0x357eA97718b13A37555a253d828cE1fda0dD212B](https://amoy.polygonscan.com/address/0x357eA97718b13A37555a253d828cE1fda0dD212B#code) **METROCAR:** [0xF617152555038b91EBF1B7C44c1c2D85270d9033](https://amoy.polygonscan.com/address/0xF617152555038b91EBF1B7C44c1c2D85270d9033#code)

    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