HackMD
  • API
    API  HackMD API beta testing
    HackMD API is now in beta, join us for a test drive.
    Getting started Got it
      • Create new note
      • Create a note from template
    • API  HackMD API beta testing
      API  HackMD API beta testing
      HackMD API is now in beta, join us for a test drive.
      Getting started Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like1 BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ># Protocol Due Diligence: Synthetix (SNX) [ToC] ## SNX Overview - [Site](https:synthetix.io/) - [Gov](https://gov.synthetix.io/#/) - [Docs](https://docs.synthetix.io/) - [Audits and due dilligence disclosures](https://docs.vesper.finance/vesper-grow-pools/vesper-grow/audits) Please start by reading: https://blog.synthetix.io/what-you-need-to-know-before-staking-snx-for-the-first-time/ ## Rug-ability **Multi-sig:** Yes - SNX multisign is https://gnosis-safe.io/app/#/safes/0xEb3107117FEAd7de89Cd14D463D340A2E6917769. It's using a 4/8 ratio. The MS is the owner of the Synthetix system. **Upgradable Contracts:** No - BUT there is an `AddressResolver` which points to different contracts and that's what we use inside the strategy. `AddressResolver` does not have a timelock. As for monitoring, we can listen for events `AddressResolver.AddressImported`, or even listen for `SystemStatus.SystemSuspended` with reason 1 - that's a system upgrade that precedes any changes. **Decentralization:** - No idea how decentralized the MS is. ## Audit Reports Audits are listed here: https://docs.synthetix.io/contracts/audits/ ## Strategy Details ### Summary The `SnxSusdMinter` strategy is in charge of minting sUSD and depositing it into the sUSD vault, earning: - SNX rewards - SNX fees - sUSD vault APY ### Strategy current APR The APR will change based on SNX usage. It's composed of #### Exchange Fees Exchange fees are generated whenever a user exchanges one synthetic asset (Synth) for another through Synthetix.Exchange. Fees are typically between 10-100 bps (0.1%-1%), though usually 30 bps, and when generated are sent to the fee pool, where it is available to be claimed proportionally by SNX stakers each week. #### Staking Rewards SNX staking rewards are generated through the inflationary monetary policy implemented in March 2018. At the same time as they claim their exchange fees stakers can claim their staking rewards, which are escrowed for a year. The SNX staking rewards enabled by the inflationary supply are set to decrease gradually until September 2023, where it will become a 2.5% annual terminal inflation rate. #### sUSD vault APY The sUSD vault will be composed of different strategies, but the main one will be single side into yearn v1 crvSAAVE. That strategy is returning an APY of 43.47%. ![](https://i.imgur.com/PRkvV0B.png) ### Vault/Strategy Pitfalls Here are a couple of things which are out of the ordinary and might be of a surprise when reading the code. #### SNX is not staked to use as collateral If you have SNX in your wallet and you mint sUSD, your token is not replaced with another token, it's just non transferable. ##### Example - Bob owns 1k SNX - Bob issues max sUSD - SNX price drops - Bob can't send his SNX to someone else #### sUSD debt changes based on total system debt When you stake SNX and mint sUSD, you create a 'debt,' which is how much sUSD you need to burn to unlock your SNX again. Your debt represents a proportion of all the debt in the system. Whenever someone makes a gain through Synths, they make it against all the debt in the system. Therefore, if the system debt increases, your debt will proportionately increase as well. Here's a snapshot: ![](https://i.imgur.com/lHSft32.png) ##### Example 1 There is $50k of sUSD in circulation, which represents the total value of all Synths. You then stake your SNX and mint $50k of sBTC (10 sBTC worth $5000 sUSD each) so there's now $100k in total worth of Synths. So, now we have 50k sUSD and 10 sBTC. Now the price of sBTC doubles. There is now 150k in the network in sUSD. So you want to leave. At the time you joined your proportion of the debt was 50%. So you are responsible for 50% now, which is $75k USD. But BTC is $10k, so you will need 7.5 sBTC to exit. This would leave you with 2.5 sBTC free. WAIT! Where did that 'free money' come from? The answer is that the total debt of the other SNX stakers, the ones who supplied the sUSD, went up by 50% from $50k sUSD to $75k sUSD. So now they will need to burn that much to unlock their SNX. Source: https://synthetix.community/docs/staking#why-does-my-total-debt-fluctuate-over-time ##### Example 2 Read: https://medium.com/acdx/synth-bc0e3f7178d7 ![](https://i.imgur.com/GJIXGUX.png) #### Collateralization Ratio The Collateralization Ratio aka C-Ratio needs to be above the protocol issuance ratio to issue sUSD and claim rewards. At the time of writing the value is 500%. ##### Liquidation ratio This is the ratio at which your SNX can be liquidated. At the time of writing, this is 200%. If your C-Ratio goes below, there is currently a 72 hours delay period before user can be liquidated. #### SNX Staking Rewards cannot be transferred for one year SNX staking rewards have an escrow period of one year before they can be vested. This has two implications in the strategy: 1) We track vesting time of each lot and unlock sequentially 2) We might use vesting SNX as collateral but can't be transfered in a migration #### 24hs lock when issuing sUSD When the strategy issues more sUSD it needs to wait 24hs before paying it back. Before calling `harvest()` and or `tend()` we need to make sure the other strategy in the vault has enough capital in case there are withdrawals. ## Path-to-Prod #### Does Strategy delegate assets? Yes. It delegates minted sUSD to the sUSD vault. #### Target Prod Vault Would be an endorsed version of what's pushed into ape tax. #### BaseStrategy Version 0.3.5 #### Target Prod Vault Version 0.3.5 ### Testing Plan We already have a 0.3.1 SNX vault doing generic lender with Cream. At the moment, with 1,329.45 SNX (30k usd aprox). That vault will be closed and we will ask users to withdraw. The new 0.3.5 SNX vault will use a GenLender + this new minter strategy. The minted sUSD will be deposited into the sUSD vault in ape-tax. The sUSD vault just deposits in aave using generic lender. Once we make sure everything is working correctly, we want to upgrade the sUSD vault to start using the single side deposit into the curve's saave pool. To do that we will need a new sUSD vault and point the snx minter strategy to the new sUSD vault. #### Ape.tax ##### Will Ape.tax be used? Yes ##### Will Ape.tax vault be same version # as prod vault? Yes ##### What conditions are needed to graduate? (e.g. number of harvest cycles, min funds, etc) - Be profitable - Go through a low collateral ratio scenario #### Prod Deployment Plan ##### Suggested position in withdrawQueue? GenLender first, snx minter second. GenLender 10%. minter 90% ##### Does strategy have any deposit/withdraw fees? No ##### Suggested debtRatio? Once we are ready to prod, we should do: 80% Gen Lender, 20% snx minter ##### Suggested max debtRatio to scale to? The final state should be: - 10% GenLender - 90% SNX minter #### Checklist - [ ] Deploy a 0.3.5 SNX vault in ape.tax - [ ] Deploy Gen Lender with AAVE - [ ] Deploy the SNX minter strategy - [ ] Test to make sure all functionality is working correctly - [ ] Deploy a new sUSD vault - [ ] Add Gen Lender with AAVE - [ ] Add single side deposit with saave - [ ] Endorse to prod

    Import from clipboard

    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 lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    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 via Google

    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

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    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

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    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. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        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
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully