# Locked supply dependence on target lock parameter We can write a model of the Filecoin supply in single expression: \begin{align*} s(t)=\varphi(t)-\underset{\text{consensus pledge collateral}}{\underbrace{\gamma\int_{\rho}^{t}s(t-\tau)\partial_{t}\,\text{ln}\,p(t-\tau)dG^{\left\langle d\right\rangle}(\tau)}}\,. \end{align*} Here $\varphi(t)$ is non-consensus-pledge contributions, primarily including minting, vesting and gas. The symbol $\gamma$ represents InitialPledgeTargetLock multiplier, $p(t-\tau)$ is network power, $dG^{\left\langle d\right\rangle}(\tau)$ is a distribution of power durations, where ${\left\langle d\right\rangle}$ parameterises in terms of average duration, and $\tau$ is dummy index to count backwards in time, and $\rho$ is the region of integration. This analytic model *is* a simplified schematic of Filecoin supply, but it is useful for illustrative purposes as it more transparently highlights the essential dynamics compared to more complex numerical simulations. Solving this equation (code below) shows that supply that's locked depends on the target lock parameter, but also the average power duration: ![](https://i.imgur.com/lBMwOmz.png) It also depends on how fast QAP is growing, shown here for different growth rates: ![](https://i.imgur.com/Ah0r5SJ.png) ``` Mathematica code to reproduce images (*For QAP lifetime distribution in this model, let's use Rayleigh. \ This choice that has the correct support and concentration, but \ otherwise is just a very simple choice for the pruposes of this \ illustrative model*) g[\[Sigma]_, t_] := 1 - CDF[RayleighDistribution[\[Sigma]], t];(*QAP lifetime survival function=1-CDF, with means of 1, 2, and \ 3 years.*) Plot[{g[0.8, t], g[1.6, t], g[2.4, t]}, {t, 0, 8}, AxesLabel -> {"years", "p(survival)"}] maxTime = 5;(*Look at equilibrium supply this many years ahead*) \ maxDepth = 20;(*Max recursion depth to get fixed point*) \[Phi][ t_] := 0.9 (*Assume 10% burned. Not a ciritical parameter for \ illustration*) (*Get equilibrium supply vs target and mean duration by finding the \ fixed point solution to inhomongneous Freholm equation*) availSupplyVsTargetAndLength = With[{growthrate = 1, \[Sigma]list = {0.8, 1.6, 2.4}}, Table[Table[{\[Gamma], \[Sigma]i, Clear[ifunc]; func[t_, 0] := 0; ifunc[0][t_] := 0; func[t_?NumericQ, n_Integer] := \[Phi][t] - \[Gamma]*growthrate* NIntegrate[ g[\[Sigma]list[[\[Sigma]i]], \[Tau]]* ifunc[n - 1][t - \[Tau]], {\[Tau], 0, t}, MinRecursion -> 2, AccuracyGoal -> 3]; ifunc[j_Integer /; j >= 1] := ifunc[j] = Module[{vals}, vals = Table[{x, func[x, j]}, {x, 0, maxTime, .25}]; Interpolation[vals]]; ifunc[maxDepth][maxTime]}, {\[Gamma], 0.05, 0.95, 0.1}], {\[Sigma]i, 1, Length@\[Sigma]list}]]; (*Plot locked vs target, for different average durations*) ListLinePlot[ Table[{#[[1]], 1 - #[[3]]} & /@ availSupplyVsTargetAndLength[[i]], {i, 1, 3}], AxesLabel -> {"Target lock", "%emitted supply locked"}, PlotLegends -> {"1y", "2y", "3y"}] availSupplyVsTargetAndGrowthrate = With[{growthrate = 1, \[Sigma] = 1.6, growthratelist = {0, 0.25, 0.5, 0.75, 1, 1.25, 1.5}}, Table[ Table[{\[Gamma], growthratelist[[growthratei]], Clear[ifunc]; func[t_, 0] := 0; ifunc[0][t_] := 0; func[t_?NumericQ, n_Integer] := \[Phi][t] - \[Gamma]* growthratelist[[growthratei]]* NIntegrate[ g[\[Sigma], \[Tau]]*ifunc[n - 1][t - \[Tau]], {\[Tau], 0, t}, MinRecursion -> 2, AccuracyGoal -> 3]; ifunc[j_Integer /; j >= 1] := ifunc[j] = Module[{vals}, vals = Table[{x, func[x, j]}, {x, 0, maxTime, .25}]; Interpolation[vals]]; ifunc[maxDepth][maxTime]}, {\[Gamma], 0.05, 0.95, 0.1}], {growthratei, 1, Length@growthratelist}]]; (*Plot locked vs target, for different QAP growth rates*) ListLinePlot[ Table[{#[[1]], 1 - #[[3]]} & /@ availSupplyVsTargetAndGrowthrate[[i]], {i, 1, 7}], AxesLabel -> {"Target lock", "%emitted supply locked"}, PlotLegends -> {"0/y", "0.25/y", "0.5/y", "0.75/y", "1/y", "1.25/y", "1.5/y"}] ```