diff --git a/FIPS/fip-0036.md b/FIPS/fip-0036.md new file mode 100644 index 000000000..ae67369d9 --- /dev/null +++ b/FIPS/fip-0036.md @@ -0,0 +1,241 @@ +--- +fip: "0036" +title: Introducing a Sector Duration Multiple for Longer Term Sector Commitment +status: Draft +type: Technical +author: Axel C (@AxCortesCubero), jbenet (@jbenet), Maria S (@misilva73), Molly M. (@momack2), Tom M. (@tmellan), Vik K. (@vkalghatgi), ZX @zixuanzh) +discussions-to: https://github.com/filecoin-project/FIPs/discussions/386 +created: 2022-06-22 +--- + +## Simple Summary +- A Sector Duration Multiplier is introduced for all sectors, including Committed Capacity sectors and sectors containing storage deals. +- A longer sector will have a higher Quality Adjusted Power than a shorter sector, all things equal. +- The Duration Multiplier is multiplicative on the existing Quality Multiplier incentive (Filecoin Plus incentive). +- Sectors with higher Quality Adjusted Power as a result of Duration Multiplier and Quality Multiplier will require higher initial pledge collateral. +- The minimum sector duration time will increase to 1 year and the maximum sector duration to 5 years. +- The SectorInitialConsensusPledge multiplier will increase from 30% to 40%. +- This policy will apply at Sector Upgrade and Extension. + +## Problem Motivation +Currently, storage providers do not receive any additional compensation or incentive for committing longer term sectors (whether that be CC or storage deals) to the network. The protocol places equal value on 180 to 540 day sectors in terms of storage mining rewards. However, in making an upfront commitment to longer term sectors, storage providers take on additional operational risks (more can go wrong in a longer time period), and lock rewards for longer. Furthermore, in committing longer term sectors/deals, storage providers demonstrate their long-term commitment to the mission and growth of the Filecoin Network, and are more aligned with client preference for persistent storage. Therefore, the added value of longer-term sector commitments, coupled with the compounded operational/liquidity risks storage providers incur for longer term sectors should be compensated for in the form of increased rewards. + +From a macroeconomic perspective, incentives to seal for longer durations affect the circulating supply dynamics of the network, since collateral is locked for longer. As the network exists in its current state, the percentage of FIL locked on the network is more likely to decline. This FIP looks to introduce more favorable percentage locked value dynamics, while simultaneously ensuring that this increase in locking contributes to network utility, stable circulating supply dynamics, and SP profitability and optionality. + +Per the economic preference to increase the percentage value locked, we also propose adjusting the [Initial Consensus Pledge Mutliplier](https://spec.filecoin.io/systems/filecoin_mining/miner_collaterals/) to 40%. The intention is to create long-term aligned total value locked (TVL) dynamics to support stable and predictable conditions for storage provider (SP) returns. We further discuss the problem/change motivation, and explore impacts on SP profitability and network macroeconomics in the CEL analysis brief [here](https://pl-strflt.notion.site/Duration-Changes-FIP-discussion-Analysis-Summary-735ce6685b7946f0a03fc13c3fe271fa). + +The motivation to increase the minimum and maximum sector durations is decreased sector turnover and improved network stability. Given that the network expects to grow, having sectors that expire every 6 months means that the network potentially needs to find new sealing throughput to compensate for the loss of power from expiration. This hinders the network as it continues to scale. + +Another perspective is that block rewards are high now but exponentially decreasing, and these high early rewards should be used to incentivize participation that’s long-term aligned. 6 months is not long-term. In particular it's short over the scale we need stability in the supply dynamics. Increasing the minimum duration from 6 months to 1 year doubles the minimum level of commitment, and smooths out locking dynamics by stretching inflow-outflow over a longer time period, all while impacting relatively few storage providers as sector durations for CC and FIL+ are both substantially above the minimum on average. + +Finally, the new maximum limit of 5 years gives SPs the option to express a long-term commitment to the network which was previously not possible with the maximum sector duration length of 540 days, and also receive commensurate rewards. + +## Specification + +### Sector Duration Multiplier +The current sector quality multiplier follows from the spec [here](https://github.com/filecoin-project/specs/blob/ad8af4cd3d56890504cbfd23e5766a279cbfa014/content/systems/filecoin_mining/sector/sector-quality/_index.md). The notion of Sector Quality distinguishes between sectors with heuristics indicating the presence of valuable data. + +Sector Quality Adjusted Power is a weighted average of the quality of its space and it is based on the size, duration and quality of its deals. + + Name | Description | +| ----------------------------------- | ----------------------------------------------------- | +| QualityBaseMultiplier (QBM) | Multiplier for power for storage without deals. | +| DealWeightMultiplier (DWM) | Multiplier for power for storage with deals. | +| VerifiedDealWeightMultiplier (VDWM) | Multiplier for power for storage with verified deals. | + +The formula for calculating Sector Quality Adjusted Power (or QAP, often referred to as power) makes use of the following factors: + +- `dealSpaceTime`: sum of the `duration*size` of each deal +- `verifiedSpaceTime`: sum of the `duration*size` of each verified deal +- `baseSpaceTime` (spacetime without deals): `sectorSize*sectorDuration - dealSpaceTime - verifiedSpaceTime` + +Based on these the average quality of a sector is: + +$$avgQuality = \frac{baseSpaceTime \cdot QBM + dealSpaceTime \cdot DWM + verifiedSpaceTime \cdot VDWM}{sectorSize \cdot sectorDuration \cdot QBM}$$ + +The _Sector Quality Adjusted Power_ is: + +$sectorQuality = avgQuality \cdot sectorSize$ + +**Proposed Protocol Change**: + +Introduce a multiplier based on sector duration + Name | Description | +| ----------------------------------- | ----------------------------------------------------- | +| QualityBaseMultiplier (QBM) | Multiplier for power for storage without deals. | +| DealWeightMultiplier (DWM) | Multiplier for power for storage with deals. | +| VerifiedDealWeightMultiplier (VDWM) | Multiplier for power for storage with verified deals. | +| **SectorDurationMultiplier (SDM)** | **Multiplier for power for storage based on promised sector duration** | + +**This SectorDurationMultiplier function proposed is linear with slope 2**. See below for the function proposed. +![alt text](https://lh3.googleusercontent.com/IB_Xn5JBcFPQvc_eu-bwcnA3pDdY6mcRER68ThWkI2cGxK3K3c1wyjVF6zf7tQbQn-HqGGn8u7Ct2jX_wp1gzv0TxLuvGqN4gMV21-q4wU2cygemqrVEhTAneVwtPoePgZjK9X_dT3L26Ycsabk) + +The rationale to select this linear slope 2 function is based on a principle that the selected parameters should maximize the effectiveness of the duration incentive, subject to SP’s collateral availability constraints, while taking into account micro and macroeconomic consequences with minimal added implementation complexity. Further analysis/simulation is shown in the analysis brief CEL prepared linked above. + +Therefore, the new suggested *Sector Quality Adjusted Power* is: + +$sectorQuality = (avgQuality \cdot sectorSize) \cdot SDM$ + +### Change to Minimum Sector Commitment +We propose a minimum sector commitment of 1 year (360 days). This is a 180-day increase from the current minimum of 6 months (180 days). This will not change the mechanics of sector pre-commit and proving, it will just adjust the minimum sector commitment lifetime to 1-year. + +### Change to Maximum Sector Commitment +We propose a maximum sector commitment of 5 years. This is an increase from the current maximum sector commitment of 540 days. Note, the protocol currently sets a maximum sector **lifetime** to 5 years (i.e sectors can be extended up to 5 years). This FIP would not adjust that. So, the maximum sector commitment of 5 years would now equal the maximum sector lifetime. Therefore, upon sector-extension, the maximum sector-extension of up to 5-years remains the same. + +### Change to PreCommitDeposit +With this FIP, sectors can get higher quality and expect higher expected rewards than currently possible. This has an impact on the value of the PreCommit Deposit (PCD). From the security point of view, PCD has to be large enough in order to consume the expected gain of a provider that is able to pass the PoRep phase with an invalid replica (i.e. gaining block rewards without storing). The recent FIP0034 sets the PCD to 20 days of expected reward for a sector of quality 10 (max quality). We now need to increase this to 20 days of expected reward for a sector of quality 100 (the new max quality) to maintain the status quo about PoRep security. + +### Initial Pledge Calculation +The change we propose to status quo Initial Pledge Calculations is the change to the SectorInitialConsensusPledge calculation as detailed below. + +The protocol defines Sector Initial Pledge as: + +$SectorInitialPledge = SectorInitialStoragePledge + SectorInitialConsensusPledge$ + +Currently, + +$SectorInitialConsensusPledge = 0.3 \cdot FILCirculatingSupply \cdot \frac{SectorQAP}{max(BaselineTarget, NetworkQAP)}$ + +We propose changing the calculation to a multiplier of 40%: + +$SectorInitialConsensusPledge = 0.4 \cdot FILCirculatingSupply \cdot \frac{SectorQAP}{max(BaselineTarget, NetworkQAP)}$ + +### Impact on Fault and Termination Fees +We currently propose no change to status quo Fault and Termination Fee calculations. Fees continue to be based on expected daily block rewards. In the future it may be valuable to re-examine the 90 day duration for the termination fee. + +## Design Rationale + +### Supporting Longer-Term Commitments +The current maximum commitment of 1.5 years limits the ability for SPs to make a long-term commitment to the network (or get rewarded for it). We expect that increasing the maximum allowable commitment of 5 years, while also introducing thoughtful incentives to seal sectors for longer, can increase the stability of storage and predictability of rewards for SP’s. This is further discussed in the sections below. + +### Incentivizing Longer Term Commitments +Longer term commitments are incentivized by a rewards multiplier. The multiplier increases the amount of FIL expected to be won per sector per unit time based on the duration the sector is committed for. + +The proposed rewards multiplier is linear in duration. This means sectors recieve rewards at a rate linearly proportional to duration. + +Example: +- **Storage Provider A** commits sectors for 1 year that generate on aggregate **2 FIL/day** on average. By the end of the commitment, Storage Provider A expects to have received **730 FIL**. +- **Storage Provider B** agrees to store the same data, but makes a commitment to store it for 3 years. Since their commitment is three times as long, they receive **6 FIL/day** on average. At the end of the three year commitment they expected to have received **2,190 FIL**. + +The rationale is that operational burden and risk to storage providers increases with duration, and it is fair that they’re commensurately rewarded for this. + +To maintain protocol incentives that are robust to consistent storage, the amount of collateral temporarily locked for the duration of the sector must also increase. Sector sealing gas costs do not increase with the multiplier. This means longer durations have higher capital efficiency, which further incentives longer commitments. + +The form of the duration incentive multiplier is linear with slope 2. The factors behind this specific design choice to incentivize longer commitments are: +- **Simplicity**. Rewards proportionate to risk, with an understandable incentive mechanism that’s easy to reason about. +- **Sufficiency**. Sublinear may be inadequate to incentivize storage providers to accept the burden of risk longer commitments entail. +- **Supply**. In terms of percentage of available supply, a slope of 2 is identified in simulations as the lowest level that sustains circa 50% percentage available supply locked (two-thirds higher than current value). This is important to incentivize long-term commitments as it supports a stable business environment.. +- **Capital**. A more aggressive slope was not chosen on the basis that capital may be less available in the future, and long sector durations with high rewards multipliers, which require increased collateral, should be widely accessible. + +### Refusing Shorter-Term Commitments + +Currently the minimum sector duration is six months. A new minimum duration of one year is proposed. The rationale is based on three factors: +- **Stability**. A one year minimum smooths out locking dynamics by stretching inflow-outflow over a longer time period. +- **Efficiency**. Waves of expiration on a six month basis have the potential to waste resources resealing sectors at twice the rate of one year minimum sectors. +- **Ethos**. Filecoin has an exponential rewards emission schedule, with high rewards that have been useful to bootstrap the network. As the network matures this perspective should be refined to better incentivize storage providers who are aligned with the long-term goals of the network. One year is only six months longer than the current minimum duration, but it shows much stronger commitment to the long-term principles and long-term success of the network. + +Furthermore, there is empirical evidence from the duration of sectors sealed that most storage providers support sectors greater than one year. Increasing the minimum from six months to one year will discourage only the most short-term-aligned storage providers. + +### Improving Stability of Rewards +A stable investing environment is needed to support long-term storage businesses. A high double-digit percentage return on pledge locked is not sufficient alone. To this end a sustained and substantial amount of locked supply is also needed. + +In reality the percentage of available supply locked has been decreasing since September 2021. While current token emission rate is exponentially decreasing with time, the percentage of available supply locked is expected to continue to decline, at least until the linear vesting schedule completes, based on current locking inflow-outflows and network transaction fees. + +This environment can be improved however. The first way to improve it is by increasing the 30% multiplier in the InitialConsensusPledge to 40%. This is a moderate increase that provides a solid long-term improvement in percentage of available supply locked. The second way is a corollary of the duration multiplier incentive. Longer sectors mean collateral is locked for longer. All else equal, at equilibrium this means the total amount of locked collateral is consistently higher. Simulations confirm both effects together can target a percentage of available supply locked that is sufficiently high and sustained to substantially improve the long-term storage business environment. See [Supplementary Information](https://www.notion.so/pl-strflt/Duration-Changes-FIP-discussion-Analysis-Summary-735ce6685b7946f0a03fc13c3fe271fa?d=711694bed594481eb26c1aa46a8e51ec#4c47f8071e7c4d35bfd242580b43efbe) for a detailed summary of the supporting simulation analysis + +### Rebalancing SP Profitability +Return on investment from pledged collateral provided by the storage rewards are currently substantial, with Filecoin-denominated returns in high double digits. Yet Filecoin-denominated returns are only part of what is needed to support successful long-term storage. + +Simulations indicate a better balance between current and future rewards can be achieved through the proposed changes. The proposals adjust the Filecoin-denominated minting-based returns to a more sustainable level in the immediate term, while the long-term trajectory is unchanged. This enables improving the percentage locked supply to stabilize the business environment for long-term network success. See [Supplementary Information](https://www.notion.so/pl-strflt/Duration-Changes-FIP-discussion-Analysis-Summary-735ce6685b7946f0a03fc13c3fe271fa?d=711694bed594481eb26c1aa46a8e51ec#4c47f8071e7c4d35bfd242580b43efbe) for further details for percentage return on invested collaterals from mining reward. + +### Impact on Initial Pledge +The initial pledge per raw byte power will increase. This is by design. It intends to increase the percentage of available supply locked. + +The initial pledge per quality adjusted power, which is the relevant measure for storage provider’s return on pledge invested, may be marginally higher than current to begin with, but will decrease with time. See [Supplementary Information](https://www.notion.so/pl-strflt/Duration-Changes-FIP-discussion-Analysis-Summary-735ce6685b7946f0a03fc13c3fe271fa?d=711694bed594481eb26c1aa46a8e51ec#4c47f8071e7c4d35bfd242580b43efbe) for plausible trajectories across different new average duration scenarios. + +### Impact on Pre-Commit Deposit +FIP-0034 sets the pre-commit deposit to a fixed value regardless of sector content. From the security point of view, PCD has to be large enough in order to cover the expected gain of a provider that is able to pass the PoRep phase with an invalid replica (i.e. gaining block rewards without storing). The recent FIP0034 sets the PCD to 20 days of expected reward for a sector of quality 10 (max quality). We now need to increase this to 20 days of expected reward for a sector of quality 100 (the new max quality) to maintain the status quo about PoRep security. + +As of end of July 2022, the calculations are roughly: + +``` +EpochReward := 20.53 * 5 = 102.7 FIL +NetworkPower := 17.98 * 2^60 Bytes +CirculatingSupply := 330.7 * 10^6 FIL + +// Sector quality = 2 +StoragePledge := 0.0196 FIL +ConsensusPledge := 0.4386 FIL +PreCommitDeposit := 50 * StoragePledge = 0.9802 FIL +InitialPledge := StoragePledge + ConsensusPledge = 0.4582 FIL + +// Sector quality = 100 (values are approx 50x greater) +StoragePledge := 0.9802 FIL +ConsensusPledge := 21.93 FIL +PreCommitDeposit := StoragePledge = 0.9802 FIL +InitialPledge := StoragePledge + ConsensusPledge = 22.9102 FIL +``` +Note: +- per the change proposed by the FIP, the ConsensusPledge is calculated as: +- $SectorInitialConsensusPledge = 0.4 \cdot FILCirculatingSupply \cdot \frac{SectorQAP}{max(BaselineTarget, NetworkQAP)}$ +- The **minimum** Sector Quality is now 2 per the duration multiplier function outlined in the Design Specification. + +## Backwards Compatibility +This policy would apply at Sector Extension and Upgrade for existing sectors. + +## Test Cases +N/A + +## Security Considerations + +### Risks of Faulty Proof-of-Replication +The existing 1.5 year sector duration limit in effect provides a built-in rotation mechanism that can be used to turn over power in the event we discover a flaw in PoRep. Increasing the maximum commitment to 5 years weakens this mechanism. [Alternative](https://github.com/filecoin-project/FIPs/discussions/415) policies have been suggested. This is something the community must be aware of and agree on. + +### Risks to Consensus +The proposed rewards multiplier increases potential risk to consensus. The main consideration is how long it would take for a colluding consortium of storage providers to exceed threshold values of consensus power. + +Analysis indicates a malicious consortium would need consistent access to high levels of FIL+, and near-exclusive access to the maximum rewards multiplier, for a substantial period of time, for a viable attack. + +*Example:* +The network currently has 18 EiB of quality adjusted power. +Consider the scenario of 50 PiB/day onboarding, with 5% attributed to FIL+, and that this is sustained for several months. + +Now if the malicious consortium can acquire 50% of FIL+ deals and commit sectors for 5 years to gain the maximum duration multiplier, and all other storage power maintain the lowest possible duration sectors of 1 year, then in a single day, the adversarial colluding group is expected to gain 0.7% of consensus power. This follows from: + +``` +1. advPower = advFILplus * FILplusMultiplier * durationMultiplier * powerOnboarding * FILplusPct +2. advPower = 0.5 * 10 * (2 * 5) * 50 * 0.05 +3. honestPower = 0.5 * 10 * (2 * 5) * 50 * 0.05 + 0.5 * 1 * (2 * 1) * 50 * 0.95 +4. advPowerDailyPctGain = advPower/(18,000 + advPower + honestPower) +5. advPowerDailyPctGain = 0.7% +``` +If this scenario is maintained, the adversarial group is expected to exceed 33% of consensus power within 140 days. + +Factors that mitigate this risk are that it’s unlikely a single group could achieve 50% of FIL+ power consistently, and unlikely that the adversarial group exclusively takes up the longer duration sectors with enhanced power multipliers. + +A limitation is that the above calculation assumes the malicious party is starting from 0% of consensus power. If they already control 10%, time to 33% is reduced to approximately 100 days. + +### Rollout Shock +Rollout shock could occur if SPs race to extend their commitments and gain a further 10x multiplier. This could be mitigated by gradually increasing the maximum multiplier 1x to 5x during an initial period (e.g. first three months) + +## Product & Incentive Considerations +As discussed in the problem motivation section, this FIP introduces incentives to further align the cryptoeconomic schema of the Filecoin Network with intended goals of the network to provide useful and reliable storage. We introduce the idea that longer term sectors represent a long-term investment and commitment to the Filecoin ecosystem, and therefore should be rewarded proportionally with greater block reward shares. + +Note, we also introduce the possibility for storage providers to receive additional multipliers from committing CC for longer. Even this has added value insofar as it represents a commitment to the ecosystem long term that should be rewarded. + +From a product perspective, we see strong support for a network more aligned with longer-term stable storage. From a recent (< 3 week old) snapshot of all LDN applications, the responses fall into the buckets below. Almost half (47%) of all applicants want long-term or "permanent" storage. + +| Period | Count | Percentage | +| :---: | :---: | :---: | +| 1 to 1.5+ years | 56 | 22% | +| 2+ years | 22 | 9% | +| 3+ years | 40 | 16% | +| 5+ years | 15 | 6% | +| Long-term/Permanent | 120 | 47% | + +We recognize that this proposal may not align with a small fraction of SP’s who exclusively prefer shorter commitments to the network, but contend that from an ecosystem perspective, this policy on aggregate makes most participants better off. Note, regular deals can still be accepted for less than sector duration, so there should be minimal loss to flexibility for onboarding clients. + +For smaller SP’s, introducing this policy could help improve their competitiveness and ability to capture network block rewards, Under this proposal, returns on tokens put up as collateral scale linearly for all SP’s (regardless of size), whereas only larger ones are able to take advantage of economies of scale for hardware. This proposal, if anything, should benefit smaller SP’s because they can still get rewards boost/multipliers without prohibitively expensive hardware costs, and termination risks associated with FIL+ data. + +## Implementation +TBD