filecoin-project/FIPs

FIP 104: Implement scaling payments for storage deals

Closed this issue · 0 comments

Short Summary

The structure of Storage Deals is compatible with short term optimization, but presents issues for long-term use cases (i.e. 5+ year deals, or As Long As Possible storage endowments). We propose the introduction of Variable Priced Storage Deals which can support long-term endowments (i.e. Trust Funds for files) by allowing pricing of deals to scale relative to an external index or cost evaluator.

This would require two modifications to the way storage deals are currently handled:

  1. An optional input for an oracle to submit a scalar value at each payment interval of a storage deal
  2. A rule to ensure that all variable priced storage deals are able to be topped-up by the storage client in order to accommodate the rewards pool being insufficient to cover the term of the deal
  3. A rule to handle excess rewards in the event that a storage pool is not depleted after the full period of the deal

The application of points 2 and 3 above may not be apparent at first. Please see the section titled Ensuring Proper Rewards Pool Management for more details.

Problem

The current storage deal model is designed to support pre-determined fixed payouts over time, which exposes both the client and provider to unnecessary risk from FIL volatility. Filecoin deals are an unprecedented innovation in decentralized assurances around file storage verification, but FIL price volatility constrains the potential of the protocol.

Storage Provider Financial Stability

When storage providers accept a deal, they must put up collateral in FIL to allow for slashing if the deal terms are not met. In the event that the price of FIL increases, this provides a nice upside for honest storage providers, and risk can be minimized with correct oracle optimizations. However, when the price of FIL declines, the storage provider has their collateral devalued temporarily,while also receiving a lower payment for services, since those are already statically priced in FIL.

Long Term Deal Stability

Because storage providers can see both their collateral and incoming fees devalued over time, a worst-case scenario could see a shock of defaults if the price of FIL goes down considerably, or the price of storage dramatically increases due to supply chain disruptions or other global issues. Not only does this present risk to Storage Providers, but it also limits client performance assurances. Additionally, this risk incentivizes prioritizing shorter term deals with well-financed storage providers. Over time, this could ultimately lead to a consolidation of services to providers with a high risk tolerance for short term price spikes, and limit the average length of storage deals provided on the network.

Related Issues

From a tokenomics perspective, lower circulating supply benefits overall token price. Longer storage deals are a positive force within the ecosystem, ensuring token lock-up, and providing higher quality SLAs for storage clients. Prioritizing short-term deals generates more transaction fees, but ultimately reduces the likelihood of widespread adoption of FIL and the Filecoin ecosystem.

Possible Solutions

One solution would be to establish alternate pricing mechanisms for storage deals, ideally in USDC or another effectively stable pricing mechanism. We could use stablecoins for storage deals directly, but this would increase circulating supply since FIL would not be used for storage deal rewards and staking pools, and could ultimately decrease FIL price long term. This doesn’t suit the core goals of the network, since it would relegate the use of FIL to inflationary rewards, transaction fees, and staking.
If we want to ensure stability for storage providers without using non-FIL tokens for collateral or storage deal rewards, we could change the storage deal model to allow payments from a reward pool to be optionally adjusted by an external oracle.

p' = p * oracle_scalar

Where p represents the original payment per period, p’ represents the adjusted payment per period, and oracle_scalar is a positive number, with a value of 1 representing no adjustment.

In this model, the external oracle would check some value, such as the price of FIL in USD, and provide a general reward scalar to either increase the payout in the event that FIL has sunk in price, or decrease it in the event that FIL has increased in price.

oracle_scalar = f ( x1, x2, x3 ... )

Where x1, x2, … xn represent relevant data to help price the underlying value provided by the storage provider.
When each incremental payment p’ to the storage provider is made, the FIL required to satisfy the deal will be calibrated to ensure the margin of the storage provider is not affected. Not only will this stability help storage providers to budget their operational costs, but it will also provide guarantees of SLAs for clients.

As an example, if the underlying cost of storage is $0.08 / GB, and the storage deal is priced at $0.10 / GB, then the provider will receive the same value per GB no matter how the price of FIL changes.

Ensuring Proper Rewards Pool Management

When the oracle_scalar is consistently greater than 1, the price of FIL must be dropping, and the storage deal’s reward pool will need to be refilled to account for the shift in pricing during the storage term. We propose a cap on the maximum refill amount without requiring the creation of a new deal. Other discussions on storage deal extensions have highlighted the need for fair handling of extensions.

The max total FIL to be paid pMax can be established by taking the weighted average of scalar values over the history of the deal, and allowing the client to refill the reward pool to support the full term of the deal.

pMax = pTotal = sum ( (p’i - pi) ) [ from i = 0; last ]

This allows the total refill amount to be specified in advance, protecting storage clients from unnecessary risk of short term price shifts over time, where the oracle_scalar is on average greater than 1, and the overall price of the initial deal in value terms has shifted considerably.

In the event that the oracle_scalar is consistently less than 1, the rewards pool will last longer than the full term of the deal, leaving a residual amount at the end of the deal. In these cases, the price of FIL must be rising, so we propose to split the remaining amount between the storage provider and client.

Expected Outcome

Because this will increase the stability of payments, we expect this will decrease the risk of defaults by storage providers, thereby providing greater assurance for storage clients. Additionally, the introduction of price stabilization on deals can extend deal lifetimes well beyond the current several year limits, and provide competitive alternatives to products like the Arweave network using FVM and other liquidity pooling solutions.

Note

This is a work in progress, and represents significant discussion with storage providers, Filecoin community members, and developers seeking to use these services.