MazyGio
    • 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
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Hyperdrive (Original) Hyperdrive is the next research leap from the Element Finance team on variable and fixed rate primitives. *No preset expiration dates, no fragmented liquidity, and no LP rollovers, aka everlasting liquidity.* ## A New Way To Trade Rates The Hyperdrive AMM introduces a market sentiment indicator (MSI) for DeFi interest rates. Almost all DeFi interest rates are constantly changing ([sometimes by the block](https://github.com/element-fi/robrox/pull/6)). In order to gauge market sentiment, a balanced system of longs and shorts must exist between fixed and variable rates, in order to capture the wisdom of the crowd. Hyperdrive provides this. The fixed rate represented in Hyperdrive is the market sentiment indicator. Hyperdrive lets users short or long the sentiment indicator. If a user thinks the sentiment indicator is too high, they'll go long because they like the fixed rate. If they think it is too low, they go short because they like the variable rate. Which side are you on? | ![](https://i.imgur.com/Bz1Ug6R.png) | | :--------------------------------------------: | | **Economists, they've made total fools out of us** | ## Overview In the sections below, we describe what Hyperdrive brings to the DeFi space: 1. Terms on Demand 2. Consolidated and Everlasting liquidity 3. Longs and Shorts to Determine Market Sentiment 4. Trading Strategies - LPs Benefit From Volatility Harvesting Interest Rates - Traders Benefit From Volatility Harvesting Interest Rates - Fixed Rate Borrow - Multiplied Variable Rate Exposure - Spread Borrow 5. Technical Teaser 6. Simulation ### 1. Terms On Demand Hyperdrive removes the concept of preset start and end dates. Rates are traded for a fixed period of time, known as the [term](https://en.wikipedia.org/wiki/Bond_(finance)#The_term_of_the_bond). When a user chooses to trade on variable or fixed rates, the user starts their term, e.g. 6 months, on demand. The fixed rate in these terms is the market sentiment indicator reflecting the market's expected average variable rates over the term length on an underlying yield source, like stEth. Previously, a user would be forced to pick a variable or fixed rate market with a term set to a preset maturity date. This trends towards suboptimal LP fees and user experience. For example, users likely do not have a lot of demand to trade on terms that have only 1 week remaining, because gains are lower. LPs tend to be incentivized to be in new terms, since fees are higher. ### 2. Consolidated and Everlasting Liquidity Previously, 6 month terms were deployed in a staggered manner. These staggered deployments lead to fragmented liquidity and required LPs to actively manage their position, such as rolling over their capital between different terms. In Hyperdrive, terms are created on demand using the liquidity from a single pool. As a result, liquidity provision is no longer tied to a specific term. When a user provides liquidity, they do so for all future terms created from the pool. Their liquidity has no expiration. It is everlasting. The LP continues to collect fees on each trade as well as variable interest on unallocated capital, for as long as they wish. ### 3. Longs and Shorts to Determine Market Sentiment The Hyperdrive AMM gives users the ability to open both long and short positions on the market sentiment indicator, aka fixed rate. - When a user believes the market sentiment for variable rates is **too high**, they'd want to **long** the fixed rate, as they believe it is **higher** than their expectation of the variable rate for the term. This drives the fixed rate down. - When a user believes the market sentiment for variable rates is **too low**, they'd want to to **short** the fixed rate, as they believe it is **lower** than their expectation of the variable rate for the term. This drives the fixed rate up. Since Hyperdrive facilitates both longs and shorts, it fully captures market sentiment, letting the fixed rate reflect the market's beliefs. Hyperdrive's approach doesn't require the use of funding rates or liquidation engines to remain solvent through volatile market conditions. Instead, all of the accounting and mathematics required to keep the system safe are baked into the AMM itself. This creates a symmetrical market where users can drive the rates up and down as market sentiment changes, just like the hyperdrive game above illustrates. ### 4. Trading Strategies #### A. LPs Benefit From Volatility Harvesting Interest Rates > Every user trade is met with an equal and opposite LP trade > - Sir Isaac Newton For every trade that happens on the AMM, the LP takes on the other side. This means the LP will generally hold a position that is opposite to the market sentiment indicator. Whether the market is right or wrong, all trades pay fees to the LP holders. Rates volatility attracts more trading, more fees, and more speculative activity from traders. No matter the volatility, at the end of a term, the average variable rate for that term is a single number. Any trading that moves the fixed rate away from this number represents an inaccurate market prediction, which the LP takes the other side of, thereby profiting. #### B. Traders Benefit From Volatility Harvesting Interest Rates Hyperdrive's long/short mechanism allows for arbitrageurs to reap the benefit of volatile changes in interest rates. | LOG(DSR_RATE) | | :-----------: | | ![](https://i.imgur.com/rCmFheb.png) | | `chifra state --call "0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7 \| dsr()(uint)" --file blocks.txt --no_header \| awk '$5 ~ /^[1-9]/ { printf "%.0f,%f\n", $1, ((($5 / 10^27 )^(60*60*24*365)-1) * 100)}' > dsr_rates.txt`| |`jp < /code/trueblocks-sdk/python/dsr_rates_log.txt -input csv -xy '[*][1,3]'`| As can be seen in this graph generated by [trueblocks](https://trueblocks.io/), MakerDAO's [DSR](https://blog.makerdao.com/dai-savings-rate/) follows a stepwise function. As the Stability Fee is changed, this allows for traders to quickly arbitrage the market sentiment to converge on the new rate. #### C. Fixed Rate Borrow On lending protocols, borrowers pay a variable rate to lenders, representing a significant source of uncertainty in DeFi trading strategies. The trader suffers from having to pay more interest cost when rates rise. To manage this risk, they can open a short position on Hyperdrive, which inherently gives them exposure to the variable rate for a fixed cost. Users historically have a significantly higher threshold on the borrow rate they are willing to pay if they can secure a fixed vs. variable position. This is seen on the AAVE fixed rate market. This creates a larger spread between fixed and variable rates, introducing arbitrage opportunities. #### D. Multiplied Variable Rate Exposure Hyperdrive allows users to get multiplied variable exposure by letting them borrow additional capital from the AMM at the current fixed rate and use it to open a short position. By opening a short position, the user is buying the variable yield from the market's deployed assets. Users can buy interest on a higher amount of capital than they provide. There are no liquidations, they just provide a maximum loss to ensure protocol safety. Unlike other markets, a Hyperdrive short does not face the possibility of unlimited loss. Because this position earns multiplied variable interest, it provides a stabilizing force encouraging the fixed rate to converge upon changes in the variable rate. #### E. Spread Borrow Hyperdrive users can get multiplied fixed rate exposure and profit from the spread between an asset's borrow rate and the current market sentiment or fixed rate. Long positions on Hyperdrive have a guaranteed fixed rate, which makes them powerful collateral assets, as they allow high loan-to-value borrowing. If a lending platform like MakerDAO charges a 1% rate to borrow DAI against this collateral and market sentiment on Hyperdrive reflects a 3% rate, users can profit from this spread by opening a long position on Hyperdrive, collateralizing this position, borrowing DAI against it, and repeating this process recursively until the rates converge. ## Technical Teaser | ![](https://i.imgur.com/aphOgTj.png) | | :----------------------------------: | | *Shut up and Hyperdrive* | Hyperdrive is a natural extension of the concepts introduced in the first iteration of the [Element Protocol](https://paper.element.fi/) which implemented a customised version of the constant power sum curve invariant from the foundational [YieldSpace](https://yield.is/YieldSpace.pdf) paper. Optimised for fixed rate trading, this curve's main benefit is curvature that adjusts with the passage of time. Changing curvature of trading curves can be dangerous for protocol safety, as evidenced by the [Curve hack](https://medium.com/@peter_4205/curve-vulnerability-report-a1d7630140ec). Similar attacks are possible in a multi-curvature multi-term universe. The Hyperdrive solution does away with multiple curves, instead reflecting the passage of time in each position, an approach we're deeming "flat + curve". Each position is the sum of matured and unmatured portions. ## Simulation [At each step](https://twitter.com/PaitonDylan/status/1585647541118304259/), building Hyperdrive has been assisted by thorough simulations. The notebook below is one such sample simulation. Explore parameterisation and profitability in a hypothetical market environment. Initial numbers look positive and we encourage you to explore on your own, just hit [Open in Colab](https://colab.research.google.com/github/element-fi/elf-simulations/blob/main/examples/notebooks/hyperdrive.ipynb) and run it yourself. Our research is constantly updating, so stay tuned! <sub>*The research described below is subject to further review, clarification, and revision. The end design of any software is subject to modification.*</sub>

    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