protocol / CryptoEconLab

CryptoEconLab at PL aspires to become a hub for research on economic incentives, coordination games, and novel marketplaces.
https://research.protocol.ai/groups/cryptoeconlab/
Apache License 2.0
44 stars 5 forks source link

Analysis released on upgrading Filecoin's gas to support FVM #28

Open dmc314 opened 1 year ago

dmc314 commented 1 year ago

eta: 2022-12-15

juanpmcianci commented 1 year ago

FVM and gas gentrification: summary, work plan and timeline

Summary

Different stakeholders in the Filecoin network have been contemplating the potential effects on the gas and message economy that may occur from major upcoming upgrades to the Filecoin network, namely FVM (Filecoin Virtual Machine) –which could cause message demand surges, and IPC (InterPlanetary Consensus), –which could cause block space supply surges. In this document, we will focus on the former, and a similar writeup focusing on the latter will be published shortly. A more thorough description of the problem at hand can be found here.

If new FVM users and apps add enough incremental message traffic (demand), there is a possibility that the price-setting mechanism for block space would cause gas fees or user bids to rise to a point where mission-critical messages (i.e., those deemed necessary for the proper functioning of the network, such as SubmitWindowPost) may get priced out. This outpricing would, in turn, affect any related economic decision-making by network participants and may potentially hurt the network.

Block space Gentrification is the cheeky nickname we've been using for this phenomenon, as chic new messages move into the block and (potentially) drive up rent prices (base fees) for everyone.

While it is also possible that this does not become an issue, we are actively looking into modeling and simulating different scenarios resulting from this increase in demand so that we can better understand and quantify them. We are also brainstorming possible solutions, safety valves, and offramps.

We welcome any related thoughts, ideas, or questions here. Thank you!

Disclaimer: no one can perfectly predict the future. All our simulations depend upon multiple assumptions that authors and stakeholders deemed reasonable. While we are confident in our reasoning and simulation capabilities, the predicted results may not reflect reality due to the system's immense complexity and the large amount of non-linear interactions that drive it. These studies should be repeated and their conclusions/actions adjusted as new data becomes available.

Work plan

FVM devs aim for 100+ value-generating apps on the Filecoin mainnet the day after the FEVM upgrade. If this holds, it is not difficult to imagine that there will be a significant “spike” in demand that day, the effects and characteristics of which will have to be tested computationally.

Approach.

Our exploratory work consists of an Impact Assessment and a Solution Exploration.

Impact Assessment: We aim to understand and quantify what this surge in demand means for Filecoin utils, gas, and base fee. We are mainly focused on:

  1. Quantifying block space gentrification and estimating block usage per message class (e.g., proofs of storage vs. FVM) for different scenarios.
  2. Determining whether the probability of fault (by failing to submit windowsPosts) increases due to this surge in demand.
  3. Understanding the Impact that such an increase in demand would have on onboarding.

These assessments will rely upon several assumptions, e.g., actor behavior and demand profile, to name a few.

Our goal is to conclude with a report describing our methodologies and findings by the end of 22Q4.

Solution Exploration

The introduction of gas lanes is a potential solution to the block space gentrification issue. One could then (i) implement a simulated version of the gas-lanes methodology, (ii) compare how different observables and quantities of interest compare in a gas-lanes-using protocol vs. status-quo, and (iii) determine whether these differences are statistically significant. Some observables worth considering are:

  1. Change in block size allocated to windowpost
  2. Change in penalization probability
  3. Tokens burnt due to message class.

We are also interested in hearing other potential mitigation ideas from the community.

Timeline:

We aim to have a report addressing the first part of our approach, namely, an Impact Assessment, by the end of 22Q4. As a buffer, we marked weeks 3 and 4 as “wiggle room” in case there are any blockers during the first two weeks. Time permitting, we will also present a report on the Solution Exploration part by the end of 22Q4. Otherwise, we will deliver it early 23Q1.

Week 1 (28 November-4 December). Finish coding modular simulation environments that can investigate several quantities of interest related to the Impact assessment and the Solution Exploration parts.

Week 2 (5 December - 11 December). Run experiments related to the Impact Assessment part. Start documenting assumptions, results, and analysis.

Week 3 (12 December - 18 December). Write results and communicate analysis on the first part. Wiggle room. Time permitting, start running experiments on the Solution Exploration part. Start documenting assumptions, results, and the study of this second part.

Relevant links

eleijonmarck commented 1 year ago

Gas in the Filecoin network: issues and opportunities https://hackmd.io/U7mdH4D3QFeyy1wR3lT8Ew?view

The link to the hackmd is behind access control. I guess this is intended? 🤔

juanpmcianci commented 1 year ago

Hi. I fixed it. Could you confirm if it works?

On Thu, 1 Dec 2022 at 7:58 AM, Eric Leijonmarck @.***> wrote:

Gas in the Filecoin network: issues and opportunities https://hackmd.io/U7mdH4D3QFeyy1wR3lT8Ew?view

The link to the hackmd is behind access control. I guess this is intended? 🤔

— Reply to this email directly, view it on GitHub https://github.com/protocol/CryptoEconLab/issues/28#issuecomment-1333726475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXK7RC5KVN6F524ZOEKT4N3WLCOGZANCNFSM6AAAAAASQB3OUI . You are receiving this because you were assigned.Message ID: @.***>

eleijonmarck commented 1 year ago

confirmed to work! thx 🙏

dmc314 commented 1 year ago

Let's direct discussion of this FVM+Gas dynamics issue and work plan here to take better advantage of Githubs threading and discussion UX: