# srUSD & wsrUSD Calculations

## srUSD Calculations

### Floating Rate

srUSD operates on a cumulative compounding rate, which steadily increases it's price in rUSD. The price can never go below 1, but it increases at different rates as the interest rate on srUSD is updated by governance. Starting at an initial time, the cumulative compounded value of 1 srUSD is:

$$
(1 + r\_{1})^{n\_{1}} (1 + r\_{2})^{n\_{2}}  . . . (1 + r\_{k})^{n\_{k}}
$$

Where the $$n\_{i}$$s, are the time intervals between changes in the rate.

### APY Calculation&#x20;

srUSD APY is calculated using the 'currentRate' in the Savings module and compounding it for 365 days.

Using an example if the current APY is 13%

\= POW (1 + **13%**, 1 / 365) - 1

Output of this formula = 334898895

<div align="left"><figure><img src="https://3705872066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuV2CWL0AZicnZxx3SgUP%2Fuploads%2FJWFujQC9QWFmjd985GDC%2Fimage.png?alt=media&#x26;token=7797383b-f49c-4c97-b72c-7632c3b1b87b" alt=""><figcaption></figcaption></figure></div>

## wsrUSD Calculations

### APY Calculation&#x20;

wsrUSD APY is calculated using the 'currentRate' in the contract address and compounding it for 31536000. This is the number of seconds in a year.

Using an example if the current APY is 13%

\= POW (1 + **13%**, 1 / 31536000) - 1

Out of this formula = 3875495702132530000

<div align="left"><figure><img src="https://3705872066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuV2CWL0AZicnZxx3SgUP%2Fuploads%2FXU2Ypced6a2OJ0tJTY97%2Fimage.png?alt=media&#x26;token=c1e5a4e5-3343-4804-a240-00b9e3517372" alt=""><figcaption></figcaption></figure></div>
