or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Reviewing Termination Fee
tags:
filecoin-pl
Protocol Review
Up to date by December 2022
Date: 15 December 2022
Speaker: Danilo Lessa Bernardineli (BlockScience)
Recording Link
What is
According to the Filecoin Spec, the Sector Termination Fee is an dynamical fee that can be paid
42 consecutive days
The proposed initial form as per section 4.7.1 of the is as it follows:
Sector Termination Fee = max(Earned Rewards, 90d of Sector Rewards)
Also, it is important to pinpoint the form of Sector Fault Fee, which are made of two:
Those interact with the Storage Pledge as it's value is defined as being at minimum 7 days worth of Fault Fees and 1 Sector Detection Fee. The sum of those gives an total of 16.48 BR of an sector.
The Code Implementation for the Fee Calculation is given by the
actors/builtin/miner/monies.go::PledgePenaltyForTermination
function on thespecs-actors
repo. (link), which can be simplified into:Sector Termination Fee = max(Sector Penalization, Base Termination Fee)
Sector Penalization = 3.5 days of Sector Expected Rewards
Base Termination Fee = Sector Storage Pledge + (expectedReward) / (2 * Days)
expectedReward = dayReward * cappedSectorAge + replacedDayReward * relevantReplacedAge
cappedSectorAge = min(sectorAge, 140 Days)
:replacedDayReward
: the day reward of the sector being replaced in a capacity upgraderelevantReplacedAge
: the age of the sector being reaplced in a capacity upgradeAssuming no Capacity Upgrades, the Code Implementation gives the following form:
Sector Termination Fee = max(Sector Penalization, Base Termination Fee)
Sector Penalization = 3.5 days of Sector Daily Expected Rewards on the Termination Time
Base Termination Fee = Sector Storage Pledge + min(0.5 * Sector Days, 70 Days) * Sector Daily Expected Rewards on the Activation Time
Base Termination Fee = Sector Storage Pledge + Half of Earned Rewards, with an ceiling on 70 days worth of expected rewards
The Code Implementation for the penalty processing is given by the
actors/builtin/miner/miner_actor.go::processEarlyTerminations
function on thespecs-actors
repo (link), and the Maximum Faulty period is located atactors/builtin/miner/policy.go::FaultMaxAge
, which is set as of now to 42 days.Pitfalls
Activation Time
. This can be an tricky situation, as for an fixed QAP, we can expect the Sector Storage Pledge and Expected Day Rewards for a sector being onboarded / upgraded to go down over time.3.5d of current BR > 20d of activation BR + at most 70d of expected earnt rewards
. For an old sector, we can assume3.5d of current daily BR > 90d of activation daily BR
, which means that the current daily BR should be ~25x bigger than the activation daily BR.Historical Context
The termination fee was initially proposed in the Slash the World document around April 2020, and its form was being defined as:
TerminationFee[t] := max(StoragePledge[t], BaseTerminationFee[t])
BaseTerminationFee[t] := InitialPledge * (1 + min[Sector Age, 180 Days] / 20 days)
BaseTerminationFee[t] := InitialPledge * (1 + min[Sector Age / 20 Days, 9 Days])
One limiting factor back then was associated with how much data was acessible. Computing the Locked Rewards associated an Sector was not trivial technically, so the formulation did require assuming how much collateral the miner would have.
Also, Termination Fee would be triggered when the sector is in the faulted state for "14 consecutive proving periods" rather than the current
42 consecutive days
. Note that those are way higher than the slack that the Storage Pledge provides (20 days worth of Block Reward)A modelling concern initially was related to the rationality of recovering sectors in cause of faults - FilSim Planning Doc, May 2020.
On the time between the design, testnet and mainnet, the Fee form did change a couple of times, namely:
TerminationFee[t] := max(SectorPenalization[t], BaseTerminationFee[t])
BaseTerminationFee[t] = InitialPledge + BlockReward(t_start) * min[Sector Age, 180 days]
SectorPenalization: 5 days of Sector BR at Penalty Time
BaseTerminationFee[t] = BlockReward(t_start) * (20 + min[Sector Age, 70 days])
SectorPenalization: 5 days of Sector BR at Penalty Time
BaseTerminationFee[t] = BlockReward(t_start) * (20 + min[0.5 * Sector Age, 70 days])
SectorPenalization: 3.5 days of Sector BR at Penalty Time
It's possible that the introduction of the
0.5x
multipler on theSector Age
was one of the concessions in response to the pushbacks associated with the introduction of an30% Target Locked Supply
.FIL Cryptoecon Recommendations
In Sep 2021, there was an network update through FIP-0026 that increased the Faulty Period in order to be terminated from 14 days to 42 days.
Upgrading the Termination Fee was considered during FIP 17/FIP 17, and some discussion back then can be found at the Qualitative Analysis, FIP 17/FIP 19, Meso Research Plan for Termination Fee and the Termination fee governance surface and functional form documents