# Vested Interest/Lock for the Long term
Here we make a preliminary exploration of several possible mechanisms for adding staking-like features to Filecoin.
We focus in particular on the following mechanisms:
1) Any token holder is allowed to lock their tokens for a given period of time, in exchange for some reward at the end of the period.
2) SP's are allowed to lock in additional collateral in exchange for a higher QAP.
3) SP's are allowed to lock their collateral for a longer period of time in exchange for a higher QAP.
There are two main cryptoeconomic concerns we want to address for each option:
1) We need to properly assess the value added to the network by locking this additional amount of token, in order to price the reward.
2) This reward should be constrained by not being "too good", in the sense that it should be economically preferable to provide storage if possible, than to lock tokens.
The Value added to the network depends on what is done with the additional locked tokens:
1) The locked tokens could simply be locked and unusable for the defined time period.
2) The locked tokens could be used as a lending pool, particularly to provide loans for SP collaterals.
## Network value criteria
We want to introduce a new token locking mechanism if it would be "good for the network". We define "good" here by looking at two quantities: the **effective circulating supply** and the **onboarding rate**.
### Definitions
We define $P(t)$ to be the total network QAP at time $t$. The onboarding rate is given by $O(t)=\frac{dP(t)}{dt}$. We define $R(t)$ as the total network *raw* power.
The effective circulating supply, $C(t)$, is defined as the amount of FIL that has been minted, which has not been burned, or is not locked at time $t$. We define $B(t)$ to be a "burn rate" function, which characterize the percentage of circulating supply that is typically burned at a given time. We define $N(t)$ as the rate of token minting at time $t$. The circulating supply then satisfies the following differential equation,
$$\frac{d C(t)}{dt}=N(R(t))-B(t)C(t)-\frac{d\mathcal{P}[C,P,R](t)}{dt},$$
where we have defined $\mathcal{P}[C,P,R](t)$ as the amount of tokens that are locked at a given time as pledged collateral, which depends on the history of C, P, and R. For more details on the definition and behavior of this pledge collateral term, consult [this note](https://hackmd.io/@R02mDHrYQ3C4PFmNaxF5bw/rkIz9WCb5)
Our main criteria we will evaluate are then the effective circulating supply, $C(t)$ and the Onboarding rate $O(t)$, and we try to understand how each staking mechanism would affect them.
## Everyone stakes
### Token is locked away
The first option is that we introduce an option for every token holder to lock an amount of token for a period of time $T$ (for simplicity now we consider just a single locking period for everyone).
We first explore what happens if this stake is simple locked away and made unusable for the time period. We define $X(t)$ as the locking rate under this mechanism. The equation describing the circulating supply is then modified as
$$\frac{d C(t)}{dt}=N(R^-(t))-B(t)C(t)-\frac{d\mathcal{P}[C,P^-,R^-](t)}{dt}-X(t)+X(t-T),$$
That is, the new change in the circulating supply is given by the differnce between the new tokens that are being locked at time $t$ and those that were locked at time $t-T$ and are now released.
We can further decompose
$$X(t)=X_{\rm new}(t)+rX(t-T)$$,
where $r$ is a renewal rate, describing what fraction of locked tokens are locked again after the locking period ends, and $X_{\rm new}(t)$ are newly locked tokens that had not previously been locked.
The added value to the network here is given by the fact that the effective circulating supply is reduced, specially if $X(t)$ is increasing with time. Otherwise $X(t)$ may reach an equilibrium where it is approximately constant, so a nearly constant amount of the effective circulating supply is reduced.
This approach has a secondary effect of discentivizing storage onboarding rate (reflected above by the quantities, $R^-, P^-$, denoting that these are the network raw and QA power, adjusted by this negative incentive). Specially if the reward earned from this new staking mechanism is to be awarded from the same pool of new minted tokens, $N$. This means that some of the new rewards will be given to these staked tokens, diminishing the pool of rewards available for storage providing (otherwise we need to figure another source to reward the staked token from).
There also exists the danger this staking reward is so good that it becomes economically preferable to simply lock tokens, rather than to provide storage.
**TLDR: Lower circulating supply, not great for storage power growth**
### Locked Token goes to work
Another approach is that the token that is staked, is goes instead towards a lending pool, which is used to make loans to other SP's to pay for collateral. The block reward from that new SP can then be used to pay back the lending pool, wit interests.
The Equation for circulating supply becomes
$$\frac{d C(t)}{dt}=N(R^+(t))-B(t)C(t)-\frac{d\mathcal{P}[C,P^+,R^+](t)}{dt},$$
where the net effect is an increase in storage onboarding (denoted by $R^+$ and $P^+$). There is no additional $X$ term in this case, as this extra locked token is instead is accounted by the increase in locking of collateral.
The return on investment for this kind of stake can also be determined by the size of the lending pool, the number of loans made for miners and their payback reliability.
**TLDR: Stimulates storage power growth, lower circulating supply (more initial pledge locked up)**
## SP's are allow to pay additional initial pledge.
### Token is locked away
In this case, only SP's are offered this staking opportunity, where they are able to pay a higer price or initial pledge, in exchange for a higher QAP. We look at the case where the extra amount paid is locked and unused.
The equation for circulating supply looks like
$$\frac{d C(t)}{dt}=N(R^+(t))-B(t)C(t)-\frac{d\mathcal{P}[C,P^+,R^+](t)}{dt}-X^-(t)+X^-(t-T),$$
Here $R^+$ and $P^+$ represent that this is an extra stimulus for storage power growth, as new options are offered that may attract new storage providers. There is a risk however that this reduces too much the profit of storage providers who do not pay extra for initial pledge. It may become an initial pledge bidding war. $X^-$ represents that while an additional amount is locked by this mechanism, it is less than what would be locked if offered to the general public.
**TLDR: Bidding war for initial pledge, perhaps good for storage power growth, lowers circulating supply but not as much.**
### Token goes to work
In this case SP's pay extra initial pledge, and that additional amount is used as a lending pool for loans for other SP's. Circulating supply is given by
$$\frac{d C(t)}{dt}=N(R^{++}(t))-B(t)C(t)-\frac{d\mathcal{P}[C,P^{++},R^{++}](t)}{dt},$$
where there $R^{++}$ and $P^{++}$ mean that there is double the stimulus here for storage power growth: there is the option to pay more fore collateral in exchange for extra power, which may attract more SP's as well as loans available for more SP's to join. There is again an initial pledge bidding war, but it is somewhat ofset by the fact that the lending pool also invites more low-collateral paying SP's. For Every SP that pays double their collateral, they attract another SP that will pay standard collateral.
**TLDR: Reduced bidding war problem for initial pledge. Large stimulus for network growth.**
## Option to increase locking period.
We briefly consider here what is the value added to the network of having optional longer locking periods.
Initial pledge is kept locked for some period $T_P$. We have explored more details [here](https://hackmd.io/@R02mDHrYQ3C4PFmNaxF5bw/rkIz9WCb5)
on the role locking period plays on the amount of token locked by initial pledge.
There are two scenarios to evaluate. First we assume Initial pledge is going down with time. In this case when the period $T_P$ passes, there is a "collateral release opportunnity". That means that when the SP is free to release their collateral, they will do it, and re-seal with a lower collateral, resulting in an increase in circulating supply. Having longer locking period while initial pledge is decreaseing, results in lower effective circulating supply, as more old higher priced collateral is kept locked.
The other scenario is that initial pledge is increasing (which can happen in a previous of slow network growth). Longer locking periods do not have an effect on the circulatinng supply here. The only added benefit is in terms of network stability, in that SP's have agreed to store the data for longer periods of time.