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

      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
    # Setting / Adjusting for DAO Controlled parameters [TOC] ## public updateLiquidationThresholdPeriod (blocks) Description: Sets the minimum period (in blocks) after which SSV accounts can be liquidated. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>blocks </td> <td>uint64 </td> <td>Duration in blocks to have sufficient balance </td> </tr> </table> ### High level problem statement * To allign incentives it would be ideal to perform a check and allow operator to draw only up to the `balanceOf(account)` of particular account, ideally up to `(balance - networkFee)`. In current design this is not possible, as this would be very costly(in gas terms) to perform. * Problem arises when it becomes economically unprofitable to trigger liquidations * SSVDao can be the final guarantor of account solvency that would run `liquidate()` function even if it is unprofitable. ### Edge cases #### Zero operator fees (or close to it) - if `operatorFees` are set at very low levels or there are zero operator fees, the `blocks` parameter is not relevant for the liquidations. Thus there need to be a condition -> a minimal amount of SSV set in the absolute terms. ```Python _liquidatable(account): if ballanceOf(account) <= minAmount: break ... ``` **To get min amount:**  $\lim_{burnRate \to 0} LiquidationThresholdPeriod = 0 + minEthProfit$ thus the `minAmount` can be calculated disregarding the burnRate. **NOTE:** If the equasions are roughly correct, $burnRate*numBlocks$ is insuficient for fee calculation. ### Framework for changing liquidation fee $$ liquidationPrice = \frac{maxGasPrice*maxGas + minEthProfit}{minSsvPrice} + errorMargin $$ $liquidationPrice >= LiquidationThresholdPeriod * burnRate$ $LiquidationThresholdPeriod <= \frac{liquidationPrice}{burnRate}$ $minEthProfit = minSsvPrice*ssvMinProfit$ $\frac{minEthProfit}{minSsvPrice} = ssvMinProfit$ Questions to guide this parameter change **Variables** h * $LiquidationThresholdPeriod ~= 7days$ For this variable 7 days or 30 may be a good default. There is a natural seasonality to gas cost time series. 1 day, one week, one month etc... One day seems like too short of a time, we have experienced sustained spikes in gas costs taking this long. There is a negative corrolation between $LiquidationThresholdPeriod$ and $maxGasPrice$ the larger the former, the smaller the latter and vice versa. To be more precise in setting this, we can explore $\delta$ (rate of change) of $maxGasPrice$ variable. * $maxGasPrice$ What is the minimum fee in a high fee environment that a liquidator can expect to pay to comfortably liquidate the account? or What is the max fee in the cheapest 10% of the block in a given period? thus * what is the $maxBlockfeeInLowest10thPercentile(timePeriod)$ that we can expect in $LiquidationThresholdPeriod$? * We can sample last 6 months of blocks to get a reasonable value * It is important find out the highest rate of change per month(if we want to change monthly) of this variable as well, this informs us how often + aggressively should this parameter be adjusted * $maxGas$ What is the max gas amount of account liquidation? This should be quite straightforward to find out. - $minSsvPrice$ What is the minimal SSV/ETH price in relative terms that we can expect? - Calculate price in ETH makes more sense, since gas price is paid in ETH as well - Are there any future token unlocks that can dump the price? - How to - rule of thumb -> 50% of last ATL = rock_bottom - $0.001645 ETH -> 0.00329*.5$ - $0.146875 -> 0.001645/0.0112$ -> It will not fall to more than 14% of current price - more sofisticated -> calculate rate of change - calculate fastest rate of change for prefered time period 7 / 30 days, for the past $n$ days and add some margin to it (~20%) - $errorMargin$ An absolute value in ETH may be better than percentage, in case we have missed some variable in the calculation or something truly unexpected happens. - $minEthProfit$ What min profit can we reasonably expect liquidators to be comfortable with? In what it should be denominated? Should it be relative to the amount liquidated? -> probably not, since if tx submitted via flashbots is successful, it should succeed since it will have satisfied race conditions. - It seems most reasonable to use absolute amount in eth, avoids complexity and seems not much worse than USD. thus lets say: - $0.1ETH$ ? - $ssvMinProfit = 0.1/0.147 = 0.68 ETH$ - if we relax the requirement and assume that SSV will not fall under this summer's ATL quicker than we can adjust it then: - $ssvMinProfit = 0.1/0.147*2 = 0.34 ETH$ ## public updateNetworkFee (networkFee) Description: Updates network fee. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>networkFee </td> <td>uint256 (casted to uint64) </td> <td>The fee charged by the network per validator (denominated as $SSV tokens per block). </td> </tr> </table> ### High level - Not curcial variable for system stability - Would set it at some minimal rate (not zero) - Rationale - The main reasons not to set it to zero is for users and services get used to paying the network fee. Set expectations, make sure systems built on top can handle fee payments under private operator setting. (~0.1% of deposit) - Keep the system highly competitive with other staking solutions ## public withdrawNetworkEarnings (amount) Description: Withdraws accumulated network fees in SSV token. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>amount </td> <td>uint256 (casted to uint64) </td> <td>Amount to be withdrawn </td> </tr> </table> ### High level - Nothing to set - DAO can withdraw fees every month or on other periodic basis ## public updateOperatorFeeIncreaseLimit (percentage) Description: Sets the max amount by which operators can increase fees in each fee update cycle. This does not limit max operator fee, only the rate (%) by which it can be increased within each fee update cycle. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>percentage </td> <td>uint64 </td> <td>Maximum increase percentage </td> </tr> </table> ### High level - Important variable for system stability - If Operator payments **are adjusted** based on SSV token price - What external events can influence operators profit margin? - Probably only external costs, such as datacenters, electricty etc. or change in market dynamics - If correct, can be set to relatively low number, e.g.(20%) - If Operator payments are **NOT adjusted** based on SSV token price ## public updateDeclareOperatorFeePeriod (seconds) Description: Sets the time window (in second) between the declaration and activation of a new operator fee. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>seconds </td> <td>uint64 </td> <td>Period in seconds until you can execute fee after setting it </td> </tr> </table> ### High level - Give enough time for stakers to change operators - Probably not necessary to have human actionable time window as there is not much cost even if they are days late, since there is limit to the increase - A week, 7 days sounds reasonable default, no strong reasons - It is expected that there will be bots monitoring this, so even 1 hour or 1 day could be sufficient ## public updateExecuteOperatorFeePeriod (seconds) Description: Sets the time window (in second) in which an operator can activate a new fee. It starts after the fee declaration window ends. <table> <tr> <td><strong>Parameter</strong> </td> <td><strong>Type</strong> </td> <td><strong>Description</strong> </td> </tr> <tr> <td>seconds </td> <td>uint64 </td> <td>Period in seconds that you can execute a execute fee until it expires </td> </tr> </table> ### High level - Give enough time for operators to execute fee change - One day sounds like a reasonable default, no strong reasons - It is expected that there will be bots monitoring this, so even 1 hour could be sufficient

    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