owned this note
owned this note
Published
Linked with GitHub
# Termination Fee Analysis
**Authors**: {Shyam, Vik, Tom} @ CryptoEconLab
## Summary
- This analysis comes at a time where the network is seeing an increased number of sectors being terminated. In the months between July-2022 to March-2023, the network has recorded higher values for the daily fraction of raw byte power terminating than the past year and a half.
- The present termination fee structure was designed in the context of 6 month sectors. The principle that it follows is to cap the termination fee to half the lifetime earnings of a 180 day sector. Since then, the network has onboarded many sectors with durations upto even 1 year and 1.5 years, meaning that such sectors also pay only 90 days worth of block rewards as a penalty. Thus, the current structured is rendered outdated.
- This revision is also high priority given the implementation of the sector duration multiplier, and longer-term sector commitments, although changes are needed regardless.
- The analysis proposes: (1) increasing the `weighting_factor` in the termination fees calculation from `1/2` to `1`, and, (2) scaling the `TERMINATION_LIFETIME_CAP` linearly with sector duration commitment.
- This proposal maintains the penalty relative to duration by ensuring that the `TERMINATION_LIFETIME_CAP` is now approximately half the expected lifetime earnings of a sector for all sector durations.
## Context
### Existing Termination Fee Structure
Definitions:
- $TF$: The termination fee.
- $BR(t_1,t_2)$: The block rewards aggregated over the time between $t_1$ and $t_2$.
- $t$: The current epoch.
- $t_0$: The activation epoch.
- $t_u$: The upgrade epoch(or the epoch in which the sector's commited capacity was upgraded).
- $w$: The weighting factor on current block rewards, currently set to a value of $0.5$.
- $TLC$: `TERMINATION_LIFETIME_CAP` , i.e the maximum number of daily block rewards penalized from the sector’s start epoch forward, currently set to a value of $140$ ([code](https://github.com/filecoin-project/builtin-actors/blob/b7ad2c55363c363f61275ca45ef255e28f305254/actors/miner/src/monies.rs)).
Currently, the termination fee is implemented as follows:
\begin{align}
TF := & SP(t) + B(t) \\
SP(t) := & \max \{ BR(t_u,t_u+ 2880 \times 20), BR(t_0, t_0 +2880 \times 20) \}\\
B(t) := & w \times \max \{ BR(t_u,t_u+ 2880), BR(t_0, t_0 +2880) \} \times \min \{\frac{t - t_0}{2880}, TLC \},
\end{align}
The current value for $w$ was set to `1/2` after the community arrived at consensus on what an acceptable value would be.
<!-- The present value was to act as a concession for risk averse storage providers. Note, this meant that sectors with duration between 6 months and 1.5 years would have the *same* termination fee structure. -->
The $TLC$ was set to `140 days` keeping in mind that the maximum sector duration at the time was 6 months. Therefore, with the combined values of the 2 parameters, according to the current fee structure, the maximum penalty that an SP would be charged for terminations would be $(20 + 140)/2 = 90$ days worth of block rewards. This is equivalent to the block rewards that an SP with a 6-month sector would earn for half the lifetime of their sector.
[FIP-0056](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0056.md#termination-fee-cap) proposed a change to the termination fee cap in which it would scale with the duration multiplier (not duration, although with slope 1 these were similar).
### Current State of Terminations in the network
In terms of the current state of terminations in the network, historical and projected termination are shown in Figure 1. The termination are shown both in raw form (TiB/day), and as a fraction of network raw byte power. Details on the forecast method are given in the appendix.
![](https://i.imgur.com/hzIXB5v.png)
![](https://i.imgur.com/96g13vF.png)
*Fig 1. A) Boxplots drawn to capture the distribution of data relating to the daily fraction of rbp terminated. The bands are drawn on the 25th and 75th percentile values. Projections are obtained for the same confidence interval. In the months between July-2022 to March-2023, the network has recorded higher values for the daily fraction of raw byte power terminating than the past year and a half. Current projections indicate a strong potential for it to go even higher in the coming year. B) A similar trend is noticed on the daily raw byte power terminating. Projections for the coming few months show a potential for increase in the daily terminations of the network.*
All analysis indicate that the terminations recorded by the network has increased in the recent 3-4 months when compared to the past 2 years. There is a potential for this to continue in the near future. The current fee structure is outdated and is designed keeping in mind a maximum sector size of 6 months. We believe that it needs to be updated to reflect the current state of the Filecoin network and also to account for longer sector durations.
## Rational Termination Incentives - With the current policy
There might be sereval reasons for the recent increase in terminations. In this section we wish to specifically look into 2 motivating factors -
1. **Decreasing Block Rewards** because of which an SP might find it more profitable to terminate their sectors and sell their hardware equipment.
2. **Decreasing Initial Pledges** because of which an SP might take advantage of the pledge difference by terminating and resealing their sectors soon after.
We additionally look into the incentives for an SP to terminate and consolidate their effective power across a smaller number of sectors in a network with Sector Duration Multipliers (SDM). SDM is a quality adjusted power multiplier, that scales rewards and pledge based on duration, proposed in [FIP-0056](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0056.md).
In the subsequent text we seek to formalize a metric that can be used to measure the incentives for an SP to terminate their sector by looking at their returns from choosing to terminate their sector v.s keeping it active for its committed duration. All this is done in the context of the current termination fee policy.
### Incentives to Terminate: Decreasing Block Rewards
An SP may terminate their sector and resell it in order to earns a rebate equivalent to the “salvage value” of the previously committed hardware. The inherent motivation to do so can come from decreasing block rewards. The alternative is for the SP to not terminate their sector.
The incentive to terminate is defined as the ratio of the ROI if the SP decides to terminate their sector ($ROI_{Terminate}$) to the ROI if the SP decides to not terminate their sector ($ROI_{NoTerminate}$), and a ROI ratio greater than one implies a rational incentive to terminate.
We compute this ROI ratio for the case when an SP terminates their sector that was sealed **1.5 years** prior to the decision date and sells all their equipment, to that when an SP maintains their sector for their committed lifetime. We further assume that the salvage value of the SP's hardware equipment is 0.5 times that of its salvage value 1.5 years prior.
![](https://i.imgur.com/ZDYgMIB.png)
*Fig 2. Incentives for individual SPs to terminate sectors sealed 1.5 years prior to selected decision dates for hardware salvage value, at current termination fee parameters.*
We can clearly observe from the above image a strong incentive to reseal for most decision dates given the current policy.
### Incentives to Terminate: Decreasing Initial Pledge
An SP may terminate their sector to release the initial pledge which was locked in the network as a collateral when the sector was initially sealed. Then, the SP can choose to reonboard their sector to the network by paying as a deposit, the value of the initial pledge at the time of reseal. The difference in the values of the initial pledge can be exploited when the pledge decreases over time, as this difference is pocketed as a profit by the SP. The alternative is for the SP to not terminate their sector.
The definition of incentives to terminate remains the same - the ratio of $ROI_{Terminate}/ROI_{NoTerminate}$, and a value greater than one implies a rational incentive to terminate to take advanatge of the pledge difference.
In our analysis, we compute this ROI ratio for the case when an SP terminates their sector that was sealed **1.5 years** prior to the decision date and reonboards it with a new initial pledge, to that when an SP maintains their sector for their committed lifetime.
![](https://i.imgur.com/qgTDEn3.png)
*Fig 3. Incentives for individual SPs to terminate and reonboard sectors sealed 1.5 years prior to selected decision dates, at current termination fee parameters.*
We can clearly observe from the above image a strong incentive to reseal for most decision dates given the current policy.
### Incentives to Terminate with SDM
In [previous analysis](https://hackmd.io/_vk6vDwIQW2-h9Gs8a6CvQ#Termination-Incentives-Across-Regimes) from CEL related to the [Sector Duration Multiplier FIP](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0056.md), CEL investigated termination incentives in a post SDM network with different duration multiplier slopes.
An individual SP with $M$ sectors can terminate $M\cdot(1 - \frac{1}{max(SDM)})$ of their sectors and reonboard $\frac{M}{max(SDM)}$ sectors for the maximum duration, maintaining their effective power consolidated across a smaller number of sectors. Once again, we assume that the SP resells the terminated sectors to earn a rebate equivalent to the “salvage value” of the previously committed hardware. The alternative is for the SP to not terminate their $M$ sectors.
<!-- The definition of incentives to terminate remains the same - the ratio of $ROI_{Terminate}/ROI_{NoTerminate}$, and a value $>1 =>$ rational incentive to terminate to consolidate via a duration multiplier. -->
Individual incentives to terminate are considered in the context of two group-level behaviors:
(a) The whole population of SPs decides to terminate - This is reffered to as the 'Termination Regime'
(b) The whole population of SPs decides to not terminate - This is referred to as the 'No Termination Regime'
![](https://i.imgur.com/RW6y79g.png)
*Fig 4. A) Incentives for individual SPs to terminate sectors sealed 1 year prior to selected decision dates if the larger population of SPs decides to terminate, at current termination fee parameters. B) Incentives for individual SPs to terminate sectors sealed 1 year prior to selected decision dates if the larger population of SPs decides to **not** terminate, at current termination fee parameters.*
*SDM slopes of 0.285 and 1 are shown in blue and orange lines, respectively. Termination fees are capped at 90 days of Expected Block Rewards, following the current policy*
We observe incentives to terminate and consolidate power are higher in the data conservation regime than the FIL conserved regime, and markedly higher when the SDM slope increases from 0.285 to 1.
## Proposed Solution
Given the current state of temrinations in the network, and the need to update the fee structure which was designed under outdated assumptions, we propose a modified termination fee structure.
The current proposal specified in this document entails
1. Increasing $w$, the `weighting_factor` from `1/2` to `1`
2. Scaling the `TERMINATION_LIFETIME_CAP` linearly with duration.
Thus, the expression for the Termination Fee now becomes:
\begin{align}
TF := & SP(t) + B(t) \\
SP(t) := & \max \{ BR(t_u,t_u+ 2880 \times 20), BR(t_0, t_0 +2880 \times 20) \}\\
B(t) := & \max \{ BR(t_u,t_u+ 2880), BR(t_0, t_0 +2880) \} \times \min \{\frac{t - t_0}{2880}, 140 \times SectorDuration \},
\end{align}
Where,
- $TF$: The termination fee.
- $BR(t_1,t_2)$: The block rewards aggregated over the time between $t_1$ and $t_2$.
- $t$: The current epoch.
- $t_0$: The activation epoch.
- $t_u$: The upgrade epoch(or the epoch in which the sector's commited capacity was upgraded).
- $SectorDuration$: The duration (in years) that the sector has been active.
Fig.5 below summarizes the impact of these proposed changes on the termination fee structures for sectors of varying durations.
![](https://i.imgur.com/3iHezTV.png)
*Fig 5. Termination Fee Policy in various cryptoeconomic regimes as a function of sector duration.*
This change stays commited to the principle of an SP paying approximately half the lifetime earnings of their sector as a termination fee*. This principle, that the community arrived at consensus to, is preserved for **all sector durations**, only when the current **constant** `weighting factor` of `1/2`, is removed to make the scaling of the `TERMINATION_LIFETIME_CAP` dynamically change with the sector duration. This is illustrated with the following examples:
* Under the propsed structure, a sector with a commitment of 180 days would need to pay in termination fees:
$$ 20BR + (w\times 140 \times SectorDuration)BR$$
Where $BR$ is the expected daily block rewards, $w$ the weighting factor, and $SectorDuration$ the sector duration in years. This would be
$$ 20BR + (1\times 140 \times 0.5)BR = 90BR$$
Which is half the sector's lifetime earnings. This is the same as how much a 6 month sector would need to pay in termination fees under the current policy.
* Similarly, a sector with a commitment of 1.5 years would need to pay in termination fees:
$$ 20BR + (1\times 140 \times 1.5)BR = 230BR$$
Which is 42% of the sector's lifetime earnings.
In order to evaluvate the effectiveness of this proposal in curbing the number of terminations we observe in the network, we do the following:
1. Revisit the incentives to terminate under the prposed policy, to see if there is a drop in the ROI curves that we previously analysed in section 2 of this document. This would indicate weaker incentives to terminate upon accepting the proposed policy changes.
2. Statistically measure the approximate change to the daily terminating fraction in the past 365 days under the newly proposed policy
<sub>”*For a sector of 6 months, the ratio of maximum termination fee to lifetime earnings of the sector is exactly 0.5. But with an increase in duration, this ratio decreases, and for a maximum commitment of 5 years is 0.39.</sub>
## Rational Termination Incentives - With the proposed policy
We revisit the afformentioned 3 cases of:
1. Incentives to terminate from decreasing block rewards
2. Incentives to terminate from pledge decrease
3. Incentives to terminate from effective power consolidation in a post SDM network
### Incentives to Terminate: Decreasing Block Rewards
Fig. 6 below shows the ROI ratios between terminating sectors for their salvage value and maintaining sectors for their committed lifetime at the current v.s proposed termination policy parameters.
![](https://i.imgur.com/43fnmVL.png)
*Fig 6. Incentives for individual SPs to terminate sectors sealed 1.5 years prior to selected decision dates for hardware salvage value, at current and proposed termination fee parameters.*
It is clear from the above figures that the under the proposed policy, the ratio of the ROI from termination for salvage value to the ROI from maintaining the sector is lower that it is under to the current policy, for all decision dates. This indicates a weaker incentive to terminate and is a point in favour of our proposed policy over the current one.
### Incentives to Terminate: Decreasing Initial Pledges
Fig. 7 below shows the ROI ratios between terminating and reonboarding sectors with a new initial pledge versus extending and maintaining sectors for their committed lifetime at the current v.s proposed termination policy parameters.
![](https://i.imgur.com/EOGu87q.png)
*Fig 7. Incentives for individual SPs to terminate and reonboard sectors sealed 1.5 years prior to selected decision dates, at current and proposed termination fee parameters.*
Once again the figures suggests that under the proposed policy, the ratio of the ROI from termination for reonboarding to the ROI from maintaining the sector is lower than it is under the current policy, for all decision dates. This once again indicates a weaker incentive to terminate and is another point in favour of our proposed policy over the current one.
### Incentives to Terminate with SDM
Fig 8 and 9 summarize the results from our analysis on the ROI of an SP from consolidation of power across a smaller number of sectors post SDM v.s maintaining their sectors.
![](https://i.imgur.com/RW6y79g.png)
*Fig 8. In the data onboarding conservation regime, A) Incentives for individual SPs to terminate sectors with 1.5 year lifetime sealed 1 year prior to selected decision dates if the larger population of SPs decides to terminate. B) Incentives for individual SPs to terminate sectors sealed 1 year prior to selected decision dates if the larger population of SPs decides to **not** terminate* under the current policy.
*SDM slopes of 0.285 and 1 are shown in blue and orange lines, respectively. Termination fees are capped at 230 days of Expected Block Rewards.*
![](https://i.imgur.com/1HgsKdt.png)
*Fig 9. In the data onboarding conservation regime, A) Incentives for individual SPs to terminate sectors with 1.5 year lifetime sealed 1 year prior to selected decision dates if the larger population of SPs decides to terminate. B) Incentives for individual SPs to terminate sectors sealed 1 year prior to selected decision dates if the larger population of SPs decides to **not** terminate* under the proposed policy.
*SDM slopes of 0.285 and 1 are shown in blue and orange lines, respectively. Termination fees are capped at 230 days of Expected Block Rewards.*
These curves suggest that as we look ahead to upcoming protocol improvements, termination fees should be adjusted and raised accordingly. The proposal laid out in this document takes us once step closer to this goal since the ratio of the ROI from terminating sectors for effective power consolidation to the ROI from maintaining the sector, is lower under our proposed policy than it is under the current one, in both the termination and no termination regimes, and for both SDM slope values of 0.285 and 1.
**Therefore, our analysis suggests that under all the above scenarios, our proposed policy weakens the incentives to terminate when compared to the current policy.**
## Effect of the proposed policy on Daily Network Terminations
CEL also investigated the effect of the termination fee on the fraction of raw byte power terminating.
We built a statistical model that seeks to represent causal relationships between the daily terminating fraction and possible inflencuing factors such as the termination fees, filecoin price and other unpredictable exogenous factors such as changing legal regulations which cannot be effectively captured using historical data. We then used this model to simulate counterfactuals for the expected upper and lower bounds of the daily fraction of RBP terminating by changing the termination fee values to what it would be under our proposed policy. This helped us emperically analyze the effect that our policy change would have on daily terminations.
The results, summarized in Figure 7 below, suggest a decrease in the expected daily terminating fraction under our proposed policy, by approximatly a factor of 100.
![](https://i.imgur.com/EXBiqnN.png)
*Fig 7. Estimated impact of the proposed termination fee parameters on the fraction of raw byte power terminating in comparision to the present parameters.*
Estimated impact of the termination fee to the fraction of raw byte power terminating are conditional on model assumptions — see notebooks in References. The models necessarily give a highly simplified perspective that does not account for all factors that play a role in affecting the amount of terminations in the network. Nonetheless, our current analysis can be used to suggest policy changes.
## Tradeoffs
While tuning the temrination fee there are several things to keep in mind, out of which two very important yet contradictory ones are that:
* The termination fee needs to be high enough in order to ensure that SPs are penalized appropirately for not keeping their sectors active for the promised duration, thereby ensuring that incenitves are alligned towards providing reliable long-term storage.
* The termination fee should be low enough so that in case the operating costs of SPs exceed their rewards from the network, they always have an out. This would allow SPs to commit their resources to the network without hesitation, and allow the onboarding rate to remain unaffected.
We believe that our proposal strikes the right balance between the two extremes. Alternatives to the proposal in its current form could be to increase the `TERMINATION_LIFETIME_CAP` by a factor of `2X` or `3X` in order to further weaken the incentives to terminate.
In order to understand what these alternatives would look like, and what the tradeoffs are, we plot out the ROI curves for the scenarios of - (1) Ternimation from decreasing block rewards, (2) Termination from decreasing pledge, for policies with larger `TERMINATION_LIFETIME_CAP` values. The results are as given below.
![](https://i.imgur.com/4QiPqc0.png)
*Incentives for individual SPs to terminate sectors sealed 1.5 years prior to selected decision dates for hardware salvage value, for different `TERMINATION_LIFETIME_CAP` values*
![](https://i.imgur.com/x5Dw8ks.png)
*Incentives for individual SPs to terminate sectors sealed 1.5 years prior to selected decision dates for pledge difference, for different `TERMINATION_LIFETIME_CAP` values*
While we can observe the the ROI curves are further pushed down below the ROI = 1 line with an increased `TERMINATION_FEE_CAP`, the next question we ask ourselves is if the difference is high enough to justify an additional burden on the storage provider by increasing the termination fee, to which we believe that it is not.
## Conclusion
An analysis of recent behaviours, as well as results of rational SP models concerning termination incentives, strongly suggest that termination fees should be adjusted to better align protocol incentives to support robust storage on the Filecoin Network. Such adjustments are crucial giving upcoming protocol improvements that support longer sector commitments and duration multipliers. Increasing the `weighting_factor` in the termination fees calculation from `1/2` to `1`, and and scaling the `termination_fee_cap` linearly with sector duration commitment would concretely imply that for all sectors, the maximum termination fee would approximately correspond to the sector's expected block rewards over half of the sector's lifetime.
## Appendix and Source Code
* [Timeseries Forecast Modeling](https://github.com/protocol/CryptoEconLab/tree/termination_fees/notebooks/termination_fees/Timeseries_Forecast_Model)
* [Causal Intervention Modeling](https://github.com/protocol/CryptoEconLab/tree/termination_fees/notebooks/termination_fees/Casual_Intervention_Model)
* [Rational Storage Provider Termination Model](https://github.com/protocol/CryptoEconLab/tree/termination_fees/notebooks/termination_fees/Rational_SP_Termination_Model)