owned this note
owned this note
Published
Linked with GitHub
# Collateral recovery opportunity vs network growth
## Introduction
We generally expect that sector collateral decays over time. This creates generally an incentive to seal the shortes sectors possible, as long as the costs associated with terminating and resealing a sector are low enough.
On the short term, however, the cost of collateral may behave in more unexpected ways, particularly if there is a sudden decrease in the network onboarding rate. Here we explore the precise relationship between network power and collateral recovery opportunity.
## 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.
The cost of collateral at a given time, $\mathcal{L}(t)$, is given by the sum of consensus pledge and storage pledge:
$$\mathcal{L}(t)=x\frac{C(t)}{{\rm max}(P_{\rm baseline}(t),P(t))}+{\rm BR}_{20d}(P(t),R(t)),$$
where $x=0.3$, $P_{\rm baseline}(t)$ is the baseline power, and the second term is the storage pledge, given by a prediction of the block reward for the next 20 days, based on current information about the raw power and QAP.
We further define $S(t)$ as the cost associated with resealing a sector at time $t$.
## Tokens locked as collateral
For our model, we make the following assumptions about storage provider behavior:
1) We assume providing storage is profitable, so all SP's want to continue storing and making profit.
2) All SP's are rational and will continue providing storage in the most profitable way.
We assume all sectors are sealed with a lifetime, $T$. After the end of a sector's life, the SP may choose to either extend the sector, for another period of time, $T$, or to terminate the sector, release the collateral, and reseal the sector for another period $T$. This will be chosen if the value obtained from releasing the old collateral and resealing at a lower cost is enough to overcome the additional resealing costs.
In other words, terminating and resealing will happen if
$$V(\mathcal{L}(t)-\mathcal{L}(t-T))\ge S(t)$$,
where $V(x)$ is the value gained by retrieving and making usable $x$ amount of locked funds.
We further define the **collateral recovery opportunity** function
$$L[C](t)\equiv\left\{\begin{array}{cc}\mathcal{L}(t)-\mathcal{L}(t-T),& {\rm if} \,\,\,\,V(\mathcal{L}(t)-\mathcal{L}(t-T))\ge S(t)\\ 0,&{\rm else.}\end{array}\right. $$
We explicitly note that $L[C](t)$ depends on the history of $C$, as this will be good to know later.
We can now write an equation following the logic from [here](https://hackmd.io/@R02mDHrYQ3C4PFmNaxF5bw/r117DMU9Y), assuming every period $T$, an SP whoose sector is about to expire either extends, or terminates and reseal their, whichever is most profitable. The amount of token locked as pledge collateral, $\mathcal{P}(t)$ is then given by the equation,
$$\frac{d\mathcal{P}(t)}{dt}=\mathcal{L}(t)O(t)+L[C](t)\sum_{n=1}^{\lfloor t/T\rfloor}O(t-nT).$$
This can now be plugged back into the differential equation of the circulating supply:
$$\frac{dC(t)}{dt}=N(t)-B(t)C(t)-\mathcal{L}(t)O(t)-L[C](t)\sum_{n=1}^{\lfloor t/T\rfloor}O(t-nT).$$
## Solving the differential equations
The problem can then be solved the following way,
1) Discretize time, turn into a difference equation,
$$C_{t+1}=f(C_t)$$
1) Provide some input for the equation: this would involve some assumption about network growth, $P(t),R(t)$, as well as an initial condition for the circulating supply $C(0)$, and some assumptions about $B(t)$ and $S(t)$.
3) Start at $t=0$, and calculate $C_t$ time-step by time-step using the difference equation.
4) For every timestep now we can calculate the collateral recovery opportunity $L[C](t)$.
To do: it is now possible to test some assumptions, for instance having network growth $P(t)$ be exponential until time $t^*$, and then become linearly growing, and see the impact on $L$.