Fixed Gas Price Mechanism

In a decentralized network where gas prices can often fluctuate based on demand and other factors, a fixed gas price can bring a layer of predictability. Let's assume the fixed gas price is set at 1€ and examine the mathematical models and efficiencies that come with it.

Fixed Gas Price Model

Mathematical Model

The fixed gas price (FGPFGP) is constant and equal to 1€. All transaction costs are thus calculated based on this:

FGP=1 €FGP=1 €

Inputs

  • None (since it's a constant)

Outputs

  • FGPFGP: Fixed Gas Price

Code Example

def fixed_gas_price():
    FGP = 1  # in €
    return FGP

Transaction Cost Efficiency

Mathematical Model

Normally, the cost of a transaction (TCTC) is calculated as follows:

TC=NumberofTransactions×FGPTC=Number of Transactions×FGP

Inputs

  • Number of Transactions: Total transactions made in the pool.

Outputs

  • TCTC: Total Transaction Cost

Code Example

def total_transaction_cost(number_of_transactions, FGP):
    TC = number_of_transactions * FGP
    return TC

Pool-Specific Gas Offsetting

Pools can offset their transaction costs by having an associated gas-offset fund. Any yield generated by the pool can contribute to this fund.

Mathematical Model

NetYield=GrossYieldTCNet Yield=Gross Yield−TC

Where TCTC can be calculated as above.

Inputs

  • Gross Yield: The total yield generated by the pool before transaction costs.

Outputs

  • Net Yield: The yield remaining after transaction costs.

Code Example

def net_yield(gross_yield, TC):
    net_yield = gross_yield - TC
    return net_yield

Advantages of Fixed Gas Price

  1. Predictability: A fixed gas price eliminates the uncertainty in transaction costs, making it easier for users to anticipate their expenses.

  2. Efficiency: Pool operators can more precisely manage their resources knowing the exact gas costs, potentially leading to better capital efficiency.

  3. Optimization: A fixed gas price makes it easier to develop optimization strategies that capitalize on known, unchanging fees.

Last updated

Logo