Try   HackMD

With increasing the target to 4 and keeping the max at 6, we would end up with asymmetric max-scale rates of 6% (positive) and 11% negative. It would be better to achieve symmetry around the target. Thus we can simply scale the deviation form the taget by a scaling factor derived by comparing the max negative deviation with the max positive deviation. The scaling factor can then be applied directly or to the normalized excess gas.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Deriving the Scaling Factor

Understanding the Asymmetry

  • Maximum Negative Deviation (

    Dneg):

    Dneg=TargetMinimum~BlobGasUsed=T0=T

  • Maximum Positive Deviation (

    Dpos):

    Dpos=Max~BlobGasUsedTarget=MT

  • For

    T=4 and
    M=6
    :

    Dneg=4,Dpos=64=2

Equalizing the Deviations

To achieve symmetry, set the maximum positive and negative deviations equal in magnitude by introducing a scaling factor

S:

S=DnegDpos=TMT

Substituting the values:

S=464=42=2


Adjusted Excess Blob Gas Calculation

  • For

    BlobGasUsed>T:

    AdjustedExcessBlobGas=(BlobGasUsedT)×S=(BlobGasUsedT)×(TMT)

  • For

    BlobGasUsedT:

    AdjustedExcessBlobGas=BlobGasUsedT

This adjustment ensures the maximum deviations of the adjusted excess blob gas are equal in magnitude.


Calculating the Update Fraction

To achieve a maximum base fee change of ±12.5% (i.e.,

Rmax=1.125), calculate the update fraction:

  • At Maximum Deviation:

    |AdjustedExcessBlobGasmax|=T

  • Exponent at Maximum Deviation:

    |Exponentmax|=|AdjustedExcessBlobGasmax|UpdateFraction=ln(Rmax)

  • Solving for UpdateFraction:

    UpdateFraction=Tln(Rmax)

Substituting the values:

UpdateFraction=4ln(1.125)40.1177833.95


Final Base Fee Update Formula

The base fee per blob gas is updated using:

BaseFeePerBlobGas=PreviousBaseFeePerBlobGas×e(AdjustedExcessBlobGasUpdateFraction)

Where:

  • AdjustedExcessBlobGas is calculated as:

    • For

      BlobGasUsedT:

      AdjustedExcessBlobGas=(BlobGasUsedT)×(TMT)

    • For

      BlobGasUsedT:

      AdjustedExcessBlobGas=BlobGasUsedT

  • UpdateFraction:

    UpdateFraction=Tln(Rmax)33.95


Verification of the Formula

At
BlobGasUsed=0
Blobs

  • AdjustedExcessBlobGas:

    AdjustedExcessBlobGas=04=4

  • Exponent:

    Exponent=433.95=0.11778

  • Base Fee Adjustment:

    BaseFeePerBlobGas=1×e0.117780.8889

  • Percentage Change:

    Decrease=10.8889=0.1111 or 11.11%

At
BlobGasUsed=6
Blobs

  • AdjustedExcessBlobGas:

    AdjustedExcessBlobGas=(64)×(464)=2×2=+4

  • Exponent:

    Exponent=+433.95=+0.11778

  • Base Fee Adjustment:

    BaseFeePerBlobGas=1×e+0.117781.125

  • Percentage Change:

    Increase=1.1251=0.125 or 12.5%