Giter Site home page Giter Site logo

Time based staking rewards about sips HOT 4 CLOSED

synthetixio avatar synthetixio commented on July 22, 2024 11
Time based staking rewards

from sips.

Comments (4)

 avatar commented on July 22, 2024 3

Hello,

Following the brief discussion on discord, I layout here my argument as to why this method is not properly allocating the rewards to different participants. I first define in the below section the different components of the new method in order to pinpoint the main underlying weakness.

Proposed Method System of Equations:

Debt Delta:
The proposed method relies on the DD (Debt Delta), which is nothing more then the total debt level (denoted D) in the previous period divided by the total debt of the current period. Note that for the first period (i.e. when i = 1) DD is set to 1.

Cumulative Debt Delta:
The Cumulative Debt Delta (CDD) is iteratively calculated by multiplying the DD in the current period, by the CDD in the previous period. Note that for the first period (i.e. when i = 1 ) CDD is set to 1 as well:

Now the CDD itself can be simplified further into the debt components as follows:

Average Debt:
With the above definitions, we can show how the calculation proposed in this method, is able to calculate the sum of all weights for all the periods:
First we define as being the debt of player 1 in time zero.

So from the equation above, we can clearly see that if we have a constant debt for player X (i.e. player X does not gain or lose debt across the periods), the equation will work to compute the sum of all the weights for the periods spanning from 0 to T.

Method Weakness:

My concern is that the debt itself for player X changes with time, because as other players gain/lose in the market, the debt of X will change dynamically. The above equation fails to capture this exact movement.
Example:
In the attached excel, I show how this miscalculation will take place in a simple example.

  • Period 1: Alice and Bob mint 50$ each, Carol 100$. Bob invests in a Synth, Alice and Carol stays in sUSD.
  • Period 2: Bob makes 6$ and burns all his debt. the debt of Alice and Carol increases respectively by 2$ and 4$ (proportionally).

In the example, we can see that the CDD method for Alice, gives a sum of weights for all the periods of 89%, while the correct sum of weights (calculated by simply summing on all the weights) is 92%.

Time_based_staking_rewards.xlsx

from sips.

 avatar commented on July 22, 2024

Hi Kain,
I know you will be busy with other more important issues with the platform in the coming months, but just wanted to let you know that whenever you are ready to discuss this topic. I kept just this github account active for this last purpose.

from sips.

gloc90 avatar gloc90 commented on July 22, 2024

Hello ACE0999,

your analysis is well done and very interesting. However, in my understanding the little inaccuracy of the CDD is not an issue in real life and even has a positive implication.

If in your example Bob loses 6$ instead of gaining 6$ the CDD method gives Alice a 94% average share of the debt instead of the "true average" of 92%.

This means that it can go both ways. Bob has to win with his synths in order to "game the system". But that means he needs to have an active position on the market which in turn means he has to speculate.
As we all know, most speculators lose in the long run. If bob would be one of the few people who can make consistent returns, he would not be a LP in the first place but instead just trade on it.

There are 2 positive side effects of the CDD calculation method.
First, LPs who take an active position on the market with their synths will likely lose value in aggregate, thus increasing the gains of passive minters.

Second, because of the first effect, LPs are incentivized to hold sUSD in their wallets instead of other synths, making the whole system more stable.

As long as the system can not technically be exploited, like frontrunning and snapshotting, we can safely assume that LPs are there for the passive returns instead of speculating. (They already have to speculate somewhat because they hold and lock the volatile SNX)

from sips.

 avatar commented on July 22, 2024

Hi @gloc90 ,
Thank you for taking the time to review this, I'm glad you understood the math I was trying and failing to explain, I tried several times on Discord but did not manage.
I have left since few weeks back, so I'm not really up-to-date but last I remember front-running and snapshotting were systemic attack vectors , while this is more of a problem related to the proportional allocation of rewards amongst minters. I am not sure of the exploit though, if it exists or not, I didn't really think that far ahead on this, but I won't be surprised if it turns out to be a way to tilt rewards to one's advantage, as the numbers I used were simplistic, and the deviation could potentially be tilted to a much larger extent than the 2%.
Thanks a lot for confirming my thoughts on this, I am not sure it is worth the effort though to think more on this, unless one day, we find someone is exploiting this loophole somehow.

from sips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.