# How much FIL is locked by consensus pledge
The consensus pledge, for a SP commiting new sectors with QAP, $p_i$, takes the form,
$$\mathcal{P}=x C\frac{p_i}{{\rm max}(P_{\rm baseline},P)},$$
where $C$ is the *effective* circulating supply of Filecoin, and $P$ is the total network QAP, and $P_{\rm baseline}$ is the baseline power (note that baseline power is meant to be compared with raw network power and not QAP, so it has a peculiar usage here).
Here we are interested in the quantity, $x$, which currently is set as $x=0.3$, which is meant to target $30\%$ of the circulating supply of Filecoin to be locked up in consensus pledge at all times.
We examine here the question of, given a target $x$ how much percentage of circulating suppy actually ends up being locked in consensus pledge.
## Definitions and assumptions
We denote the onboarding rate at time $t$, as the change in total network QAP,
$$O(t)=\frac{d P(t)}{dt}.$$
We define the *total* circulating supply at time $t$ as $S(t)$, to mean the total supply of filecoin, including locked FIL. The effective circulating supply is then
$$C(t)=[1-y_p(t)-y_o(t)]S(t),$$
where $y_p(t)$ is the percentage of total circulating supplied that is locked by pledge collateral, and $y_0(t)$ is Filecoin locked by any other means.
We assume there is a *single* locking period $T$, for which for which a sector is sealed, corresponding to a given collateral. After the period of time, $T$, the SP is offered the choice of extending the sector, while leaving the pledge untouched, closing the sector and walking away with the collateral, or else, retrieve the previous collateral, and reseal a new sector, paying a new collateral calculated at the new current rate.
For the following calculation we will assume that there exists incentive to do the last option, being the most profitable. For this to be true, three conditions are assumed:
* It is expected to be profitable to commit a sector for period $T$.
* It is expected that the collateral for a given sector will decrease over time (this is true given that total network power will be increasing, at worse exponentially (ensured by the baseline mechanism))
* It is expected that the base fee is low enough that the cost of terminating the sector and re-sealing a new one is not higher than the savings provided by the decreasing cost of the collateral.
We will therefore assume (**in this simplified model**) that all SPs that onboarded at time $t$, will terminate their sector and re-seal at time $t+T$, and that the gas fees related are negligible.
We will also assume for simplicity of the equations, that $P>P_{\rm baseline}$.
## Computing percentage of FIL locked by consensus pledge
We define $\mathcal{P}_{\rm new}(t)$ as the amount of pledge that is locked, corresponding to new sectors that are joining at time $t$. This growth rate of this new onboarding pledge is then given by
$$\frac{d \mathcal{P}_{\rm new}}{dt}=x\frac{C(t)}{P(t)}O(t).$$
SPs who joined at time $t-T$, will be terminating their sectors, retrieving their pledge, and re-sealing their sectors, we denote this change of pledge as
$$\frac{d\mathcal{P}_T}{dt}=\left[\frac{C(t)}{P(t)}-\frac{C(t-T)}{P(t-T)}\right]O(t-T),$$
where it is assumed that
$$\frac{C(t-\tau)}{P(t-\tau)}>\frac{C(t)}{P(t)},$$
for every $\tau>0,$ such that this is an overall negative change in the total pledge.
This can be repeated, for SPs who onboarded at times, $t-2T,t-3T,\dots,t-\lfloor\frac{t}{T}\rfloor T.$, such that
$$\frac{d\mathcal{P}_{nT}}{dt}=\left[\frac{C(t)}{P(t)}-\frac{C(t-T)}{P(t-T)}\right]O(t-nT),$$
such that the overall change in the pledge is given by
$$\frac{d \mathcal{P}}{d t}=x\frac{C(t)}{P(t)}O(t)+x\sum_{n=1}^{\lfloor \frac{t}{T}\rfloor}\left[\frac{C(t)}{P(t)}-\frac{C(t-T)}{P(t-T)}\right]O(t-nT). $$
The quantity we are interested in, is $y_p(t)$, the percentage of total supply that is locked by consensus pledge. We can re-express the quantities above, in terms of this variable, where
$$\mathcal{P}(t)=y_p(t)S(t),$$
and
$$C(t)=[1-y_p(t)-y_o(t)]S(t).$$
We then arrive at the differential equation for $y_p$,
$$ y_p^\prime(t) S(t)+y_p(t) S^\prime(t)=x\frac{[1-y_p(t)-y_o(t)]S(t)}{P(t)}O(t)$$
$$+x\left[\frac{[1-y_p(t)-y_o(t)]S(t)}{P(t)}-\frac{[1-y_p(t-T)-y_o(t-T)]S(t-T)}{P(t-T)}\right]\sum_{n=1}^{\lfloor \frac{t}{T}\rfloor}O(t-nT). \,\,\,\,\,(*)$$
Before any further evaluation, we can already infer that the total percentage of supply locked by this collateral depends on many factors, and is not just directly determined by $x$. The locked percentage depends on the onboarding rate, as well as the on the locking period. **Therefore any change in the locking period will have an effect in the amount of locked FIL. This could be in principle compensated by changing the amount of collateral (by changing $x$ for instance), to enure that $y_p(t)$ is fixed as we change $T$**
## A simplified solution with further assumptions
We simplify the equation by making the following simplifying assumption about network Power growth,
* We assume simple exponential network growth, $P(t)=P_0\,e^{gt}$, and $O(t)=gP_0\,e^{gt}$.
* we set $N=\lfloor t/T\rfloor$ for simplicity of notation.
We then have
$$ y_p^\prime(t) S(t)+y_p(t) S^\prime(t)=x[1-y_p(t)-y_o(t)]S(t)g$$
$$+xg\left[[1-y_p(t)-y_o(t)]S(t)-\frac{[1-y_p(t-T)-y_o(t-T)]S(t-T)}{e^{-gT}}\right]\left(\frac{1-e^{-(N+1)gT}}{1-e^{-gT}}-1\right).$$
The term in the second line is the only place where the dependence on $T$ comes in, we can call this,
$$\mathcal{T}(x,T)=xg\left[[1-y_p(t)-y_o(t)]S(t)-\frac{[1-y_p(t-T)-y_o(t-T)]S(t-T)}{e^{-gT}}\right]\left(\frac{1-e^{-(N+1)gT}}{1-e^{-gT}}-1\right).$$
If the magnitude of this term is larger, this increases $y_p(t)$, as the other terms in the equation need to balance this increase. We therefore want to study what happens to this term as we change $T$, to give us some understanding of what happens to the percentage of locked FIL.
It is easy to see, that as we reduce $T$, this term vanishes,
$$\lim_{T\to0}\tau(x,T)=0.$$
It can also be show that in the opposite limit, of large $T$ (with $T=t$) being the maximum,
$$\lim_{T\to t}\mathcal{T}(x,T)=-xg[1-y_p(0)-y_o(0)]S(0)$$
It can in fact be shown generally that this is a monotonically decreasing function,
$$\frac{\partial \mathcal{T}(x,T)}{\partial T}<0.$$
This means that **The larger the locking period, the larger the actual percentage of FIL supply is locked by collateral**
In general, if we wanted to make a change in the locking period, $T$, this can be balanced by a changed in the number $x$, *i.e.*, collateral can be increased, to ensure the percentage of locked FIL is unaffected.