Marko
    • 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
    • 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
    • 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 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
  • 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
    # Avow / wicked.finance / Green Candle ## Problem ### Tl;Dr quick explanation We allow users to earn the **best DeFi yields** they can, **with No currency risk**. Put simply, getting ~20% rewards from your favourite yearn pool, but not USDs but in EUR(or any other currency user needs to pay his daily expenses in like IR, DNK etc) # Avow / wicked.finance / Green Candle ## Problem ### Tl;Dr quick explanation We make it easy for users to protect against currency risk. Almost all of the stable coins, and yield products in DeFi are denominated in USD. This is a problem for people living outside of US whose expenses are in other currencies (Eur, IR, RR). We leverage UMA LSP contracts to achieve this. #### Example 1. Longoria is living in Europe and has expenses in euros. She is an Eth bull and doesn't want to sell her Eth. She needs money to cover her daily expenses, so she takes out a loan against her Eth. The problem is, all main borrowing protocols allow her to take a loan only in USD stable coins. With the help of our protocol, she can take a debt in LUSD but have exposure to Euro. She will simply draw 10 000 LUSD against her collateral and uses 20% to protect against dollar appreciation. She goes to wicked.financial to buy a currency protection against dollar appreciation. She will open a new USD/EUR position and sells her short tokens to Shorty. 2. Shorty buys short tokens from Longoria. Now he has either insured for Euro depreciation against US dollar, or perhaps he just thinks that dollar (compared to euro) will go up. As with Longoria, he only needs one fifth (20%) of value to insure his Euro holdings or stands to make five times his collateral if he is speculator. ### Home page text **The protocol for currency hedging** Wicked protocol allows you to hedge your currency risk or speculate on its price. [Learn more](https://wicked.financial/about) > takes user to about page/section with thorough explanation of how it works [Go to dashboard](https://wicked.financial/dashboard) > takes user to dashboard page/section which would show positions that a user can take. ### Longer explanation Our platform can be used by people who want to partake in high DeFi yields but do not want to be denominated in US dollars. This is true for most people living outside US, who pay their daily expenses in euro, rupee or any other currency. ### how it works Our platform works with any standard ERC20 token, that is provided by a MarketMaker as a collateral. User needs to choose his local currency, desired intrest bearing token, expiry and amount. For examle, Alice will pick her local currency, in this case euro, yearn vault [crvUSDP](https://yearn.finance/vaults/0xC4dAf3b5e2A9e93861c3FBDd25f1e943B8D87417). She will choose to insure position of size 10 000 Euro for the next three months. There are two main smart contracts we leverage for this functionality. LSP contract from UMA protocol and AMM form balancer. ### Under the hood #### Roles **marketMaker** There needs to be marketMaker(could be us) who is the first to create the position. He is "market neutral", if the LS pair payout ratio dictated by the oracle (USD/EUR) at expiry isn't much different to the ratio at creation, it could be highly volatile during the contract lifetime. In fact this is prefered by the MarketMaker as his profits depend entirily on the AMM fees. e.g. if USD/EUR is 1.2 at creation, the price can go to 0.9 or 1.5, but as long as it approaches 1.2 at expiry, the marketMaker will be happy to take the position. If the price at the expiry of the LSP contract is significantly different from the creation price, he could be in loss. To summarize, his *profit = AMMfees - impermanentLoss)* **insuree** The position of insuree(Alice) is as follows. She is long the collateral of the LSP contract and usually pays premium for this. This is effectively done by providing collateral and minting long+short tokens and then selling her shortTokens to the amm discount usually at a discounted price. **insurer** The position of insurer(Bob) is as follows. He is short the collateral of the LSP contract and usually receives premium for this. This is effectively done by providing collateral and minting long+short tokens and then selling his longTokens to the amm discount usually at a discounted price. **Things to observe** At the time of minting LSP tokens the minter(sponsor) has the the same exposure as if he was just holding the collateral. It is when he is holding *only* either long or short token that he is taking up a position. Therefore the only way how he can become long is to either buy long tokens or mint both and sell short tokens and vice versa. In a perfect world, we would have have someone willing to go short for everyone going long and vice versa. In reality this is not the case. Therefore we need to incentivize the other side every time there is a more people who want to go long than those willing to go short and vice versa. This is done by with the help of AMM. Since Alice(long) needs to hold only longTokens, the mechanism needs to make this possible and easy for her. She would send in the collateral, mint LSpair and sold shortTokens to the AMM for which she would receive longTokens. The premium she is paying for this is determined by the amount of shortTokens she receives for her longTokens from the AMM. She will usually receive less then is the "true price"(determined by the oracle). Our main added value is, that we are removing the complexity and providing Alice with the option to execute this trade easily and doing the calculation to determine how many percent of her collateral she is paying for this protection. #### Contract life cycle Actions (marked by numbers) - Initialisation - marketMaker 1. marketMaker(could be us) needs to create the LSP contract with given parameters 2. marketMaker initializes AMM for LS token pair. - lifetime (users) - makret participants 1. makretParticipants can open long or short position, by minting token pair and selling one token of the pair to the AMM. 2. makretParticipants can close their position by buying the token they do not hold from the AMM and redeeming the pair for the collateral. - liquidity providers 1. can provide liquidity to the AMM in exchange for trading fees - expiry 1. users get payout in collateral from the LSP contract in the ratio specified by the payout function. 2. marketMaker & liquidity providers withdraw all the LS tokens from the AMMs and claims the collateral from the LSP contract. #### Strengths of the mechanism - Once market is established, anyone can become either long or short, without the need to look for the other party - The mechanism selfregulates by changing price in the AMM based on the market demand of long and short tokens. #### Weaknesses of the mechanism - every market needs to be established by a marketMaker. He needs to pay for the gass of deploying the LSP contract. He is willing to take the impermanent loss in exchange for AMM fees. - initial liquidity - the more liquidity marketMaker is willing to provide, the cheaper it is for market participants to open their long/short positions. The more collateral he is providing, the less relative profit he will receive and the higher risk he is taking. He needs to strike the right balance, since if he provides too little liquidity, there will be very few participants since it becomes very expensive for them to open their positions. #### User flow + UI description ##### Opening positions 0. There are two buttons on the homepage "insure" or "provide insurance"(site could change color scheme based on which mode is selected). 1. Alice will come to the homepage, there are two buttons, "insure" and "provide insurance" she will click "insure". 1. She wiil pick her local currency she wants to insure against from the currencies available 2. Then new page will come up that will show her the investment options arranged as tiles - Every Investment option element will show collateral token + net APR in **bold** + gross APR minus protection in grey. She picks yearn vault [crvUSDP](https://yearn.finance/vaults/0xC4dAf3b5e2A9e93861c3FBDd25f1e943B8D87417) with APR of **12%**(15%-3%) of since it currently gives her the best profit. 3. She will put in how much crvUSDP tokens she wants to insure. Popup will inform her, that due the the slippage her APR would be 10%. If she accepts, the transaction will get generated and sent to her for confirmation. After that she will receive long tokens to her address. 1. Bob will come to the homepage, there are two buttons, "insure" and "provide insurance" he will click "provide insurance". 2. He will see a panel / list of positions he can take. Every position(element) will include APR for protection, APR for collateral, Combined APR, currency pair, u derlying of collateral(USD only for now) and expiry. #### Closing positions (before expiry) #### Closing positions (after expiry) #### Example 1. Alice - wants to get big defi yields which are on USD denominated Yearn vault, but she is living in Europe, hence doesn't want to be exposed to dollar fluctuations. She is willing to pay for this and get a little bit worse earning rate than she would get. She will get 13% APR instead of 15% should would otherwise get. 2. Bob - is a professional market maker. He can provide Alice this serving of hedging against dollar fluctuations for 2% yield. If he wants to be market neutral he can hedge this position on centralized exchange. ### Longer explanation Our platform can be used by people who want to partake in high DeFi yields but do not want to be denominated in US dollars. This is true for most people living outside US, who pay their daily expenses in euro, rupee or any other currency. ### how it works Our platform works with any standard ERC20 token, that is provided by a MarketMaker as a collateral. User needs to choose his local currency, desired intrest bearing token, expiry and amount. For examle, Alice will pick her local currency, in this case euro, yearn vault [crvUSDP](https://yearn.finance/vaults/0xC4dAf3b5e2A9e93861c3FBDd25f1e943B8D87417). She will choose to insure position of size 10 000 Euro for the next three months. There are two main smart contracts we leverage for this functionality. LSP contract from UMA protocol and AMM form balancer. ### Under the hood #### Roles **marketMaker** There needs to be marketMaker(could be us) who is the first to create the position. He is "market neutral", if the LS pair payout ratio dictated by the oracle (USD/EUR) at expiry isn't much different to the ratio at creation, it could be highly volatile during the contract lifetime. In fact this is prefered by the MarketMaker as his profits depend entirily on the AMM fees. e.g. if USD/EUR is 1.2 at creation, the price can go to 0.9 or 1.5, but as long as it approaches 1.2 at expiry, the marketMaker will be happy to take the position. If the price at the expiry of the LSP contract is significantly different from the creation price, he could be in loss. To summarize, his *profit = AMMfees - impermanentLoss)* **insuree** The position of insuree(Alice) is as follows. She is long the collateral of the LSP contract and usually pays premium for this. This is effectively done by providing collateral and minting long+short tokens and then selling her shortTokens to the amm discount usually at a discounted price. **insurer** The position of insurer(Bob) is as follows. He is short the collateral of the LSP contract and usually receives premium for this. This is effectively done by providing collateral and minting long+short tokens and then selling his longTokens to the amm discount usually at a discounted price. **Things to observe** At the time of minting LSP tokens the minter(sponsor) has the the same exposure as if he was just holding the collateral. It is when he is holding *only* either long or short token that he is taking up a position. Therefore the only way how he can become long is to either buy long tokens or mint both and sell short tokens and vice versa. In a perfect world, we would have have someone willing to go short for everyone going long and vice versa. In reality this is not the case. Therefore we need to incentivize the other side every time there is a more people who want to go long than those willing to go short and vice versa. This is done by with the help of AMM. Since Alice(long) needs to hold only longTokens, the mechanism needs to make this possible and easy for her. She would send in the collateral, mint LSpair and sold shortTokens to the AMM for which she would receive longTokens. The premium she is paying for this is determined by the amount of shortTokens she receives for her longTokens from the AMM. She will usually receive less then is the "true price"(determined by the oracle). Our main added value is, that we are removing the complexity and providing Alice with the option to execute this trade easily and doing the calculation to determine how many percent of her collateral she is paying for this protection. #### Contract life cycle Actions (marked by numbers) - Initialisation - marketMaker 1. marketMaker(could be us) needs to create the LSP contract with given parameters 2. marketMaker initializes AMM for LS token pair. - lifetime (users) - makret participants 1. makretParticipants can open long or short position, by minting token pair and selling one token of the pair to the AMM. 2. makretParticipants can close their position by buying the token they do not hold from the AMM and redeeming the pair for the collateral. - liquidity providers 1. can provide liquidity to the AMM in exchange for trading fees - expiry 1. users get payout in collateral from the LSP contract in the ratio specified by the payout function. 2. marketMaker & liquidity providers withdraw all the LS tokens from the AMMs and claims the collateral from the LSP contract. #### Strengths of the mechanism - Once market is established, anyone can become either long or short, without the need to look for the other party - The mechanism selfregulates by changing price in the AMM based on the market demand of long and short tokens. #### Weaknesses of the mechanism - every market needs to be established by a marketMaker. He needs to pay for the gass of deploying the LSP contract. He is willing to take the impermanent loss in exchange for AMM fees. - initial liquidity - the more liquidity marketMaker is willing to provide, the cheaper it is for market participants to open their long/short positions. The more collateral he is providing, the less relative profit he will receive and the higher risk he is taking. He needs to strike the right balance, since if he provides too little liquidity, there will be very few participants since it becomes very expensive for them to open their positions. #### User flow + UI description ##### Opening positions 0. There are two buttons on the homepage "insure" or "provide insurance"(site could change color scheme based on which mode is selected). 1. Alice will come to the homepage, there are two buttons, "insure" and "provide insurance" she will click "insure". 1. She wiil pick her local currency she wants to insure against from the currencies available 2. Then new page will come up that will show her the investment options arranged as tiles - Every Investment option element will show collateral token + net APR in **bold** + gross APR minus protection in grey. She picks yearn vault [crvUSDP](https://yearn.finance/vaults/0xC4dAf3b5e2A9e93861c3FBDd25f1e943B8D87417) with APR of **12%**(15%-3%) of since it currently gives her the best profit. 3. She will put in how much crvUSDP tokens she wants to insure. Popup will inform her, that due the the slippage her APR would be 10%. If she accepts, the transaction will get generated and sent to her for confirmation. After that she will receive long tokens to her address. 1. Bob will come to the homepage, there are two buttons, "insure" and "provide insurance" he will click "provide insurance". 2. He will see a panel / list of positions he can take. Every position(element) will include APR for protection, APR for collateral, Combined APR, currency pair, u derlying of collateral(USD only for now) and expiry. #### Closing positions (before expiry) #### Closing positions (after expiry)

    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