# Rate of return and yield during a release schedule
According to the quantity theory of money, when new tokens are issued, the price of the token should decrease accordingly. We assume an inflation rate $J$ and also expect the market cap to grow with a rate $G$[^1]. Then the price at the end of the first year is equal to
$$
P(J, G) = P_0\left(\frac{1+G}{1+J}\right)
$$
where $P_0$ is the initial price.
We measure measure rate of return and yield by comparing the dollar values of a validator's holdings at the beginning and end of the first year. We take all validators as a single group
$$
Q_{0,v} = Q_0KS
$$
where $Q_0$ is the initial total supply (which is partially released), $K$ is the ratio of the initial sale and $S$ is the stake percentage.
At the end of the first year, the validators will have received all of the seigniorage which is minted at a rate $I$:
$$
Q_{v} = Q_0KS + Q_0I
$$
Note: Seigniorage rate $I$ != Inflation rate $J$
### Rate of return function
With the definitions above, we can define a generalized function that can be used to calculate returns for various price trajectories. We calculate how much the dollar value of validator holdings increase
$$
R(J, G) = \frac{P(J,G)Q_{v}}{P_0Q_{0,v}} - 1
= \frac{P(J,G)}{P_0}\left(\frac{I}{KS}+1\right)-1
$$
### Real Rate of Return
To calculate the annual **real rate of return**, we substitute $I/K$ and $G$ as the inflation and growth rates respectively
$$
R_\text{real} = R(I/K, G) = \frac{(1+G)(I+KS)}{S(I+K)}-1
$$
We factor in the initial sale percentage in the inflation rate to because the release schedule exacerbates the devaluation caused by seigniorage.
### Nominal Rate of Return
To calculate the annual nominal rate of return, we keep growth, but ignore the devaluing of the token due to seigniorage
$$
R_\text{nom} = R(0, G) = \frac{GKS+GI+I}{KS}
$$
### Real Yield
Assumes no price growth, i.e. $G=0$.
$$
Y_\text{real} = R(I/K, 0) = \frac{I(1-S)}{S(I+K)}
$$
### Nominal Yield
Assumes price growth is equal to seigniorage with the release ratio factored in, i.e. $G=I/K$.
$$
Y_\text{nom} = R(G, G) = \frac{I}{KS}
$$
### Examples
For $I=3\%$, $S=80\%$ and $K=10\%$
| Metric | Value |
|-|-|
| Real yield | 5.77% |
| Nominal yield | 37.5% |
## Implementation
```python
from sympy import *
P0 = Symbol('P_0', positive=True)
S = Symbol('S', positive=True)
K = Symbol('K', positive=True)
Q0 = Symbol('Q_0', positive=True)
I = Symbol('I', positive=True)
J = Symbol('J', positive=True)
G = Symbol('G', positive=True)
P = lambda J,G: P0*(1+G)/(1+J)
Qv_0 = Q0*K*S
Qv = Q0*K*S + Q0*I
real_ror = lambda J, G: simplify(P(J, G)/P0*Qv/Qv_0-1)
vals = (
(I, 0.03),
(K, 0.1),
(S, 0.8),
)
print('Real rate of return')
pprint(real_ror(I/K, G))
print()
print('Nominal rate of return')
pprint(real_ror(0, G))
print()
print('Real yield')
pprint(real_ror(I/K, 0))
pprint(real_ror(I/K, 0).subs(vals))
print()
print('Nominal yield')
pprint(real_ror(G, G))
pprint(real_ror(G, G).subs(vals))
```
[^1]: $J$ and $G$ are defined as annual rates.