From 556231357414c11f7bf693e89ac37b9c0313abfb Mon Sep 17 00:00:00 2001 From: Frederico Date: Sun, 5 Jan 2025 14:22:24 +0100 Subject: [PATCH] playing with parameters --- transaction_fee_models/eip-vs-stablefee.ipynb | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/transaction_fee_models/eip-vs-stablefee.ipynb b/transaction_fee_models/eip-vs-stablefee.ipynb index 6e36149..fe8e5a5 100644 --- a/transaction_fee_models/eip-vs-stablefee.ipynb +++ b/transaction_fee_models/eip-vs-stablefee.ipynb @@ -39,7 +39,11 @@ "metadata": {}, "outputs": [], "source": [ - "demand = 500" + "demand = 5000\n", + "\n", + "std_dev = 0.01/100.\n", + "variable_gas_limits = True\n", + "below_gas_limit = 0.5" ] }, { @@ -52,12 +56,12 @@ " num_blocks=int(days * 24 * 60 * 60 / 12), # number of blocks in \"days\",\n", " demand_sizes=[demand], # very low, normal, very high demand\n", " demand_probabilities=[1.], # they must sum to 1\n", - " fee_cap_range=(0., 0.00001), # in percentage, mean and std deviation\n", - " max_tip_pct=0.1, # this only affects the EIP-1559 simulation\n", - " scale_block_size_limits=(0.0, 0.05),\n", - " probability_stop_below_gas_limit=0.5,\n", + " fee_cap_range=(0., std_dev), # in percentage, mean and std deviation\n", + " max_tip_pct=0, # this only affects the EIP-1559 simulation\n", + " scale_block_size=0.05,\n", + " probability_stop_below_gas_limit=below_gas_limit,\n", " purge_after=4,\n", - " variable_gas_limits=False\n", + " variable_gas_limits=variable_gas_limits\n", ")" ] }, @@ -76,8 +80,13 @@ "metadata": {}, "outputs": [], "source": [ - "df_stats_merged[[\"price_StableFee\"]].plot(\n", - " title=f\"StableFee price - {demand} txs - variable gas limits\",\n", + "df_stats_merged[[\"price_StableFee\", \"price_EIP\"]].plot(\n", + " title=f'''\n", + "StableFee vs EIP-1559 - {demand} txs -\n", + "{\"variable\" if variable_gas_limits else \"fixed\"} gas/tx -\n", + "{std_dev * 100:.2e}% standard deviation - \n", + "{below_gas_limit * 100:.2f}% chance to stop below gas limit\n", + "''',\n", ")" ] },