1

I have read the documentation on the topic but still don't get how I can calculate the current DAI Savings Rate myself.

The current dsr value is stored in the pot contract. At time of this writing it amounts to 1000000000000000000000000000. I think I have to divide this value by the RAY, which is a 1 followed by 27 zeroes (1000000000000000000000000000). So the dsr and RAY are equal at the moment.

Next, I have to take the result of this operation (which is 1) and power it to the number of seconds per year (31536000). Obviously this equals to 1 again. So does this mean the current rate is set to 1 percent? It should really amount to zero at the moment.

Another problem I have with this calculation is that once the dsr changes to a weird value, then taking the power of seconds per year might take a really long time to calculate.

Where is my mistake here?

0

So the calculation is actually correct. The result 1 is the amount by which the funds would be multiplied. So in order to get the percentage I would have to calculate the following:

100 * ((dsr / ray)^secondsPerYear) - 100, which equals to 0 at the moment of this writing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.