gas price economics.pdf

Upload: gabriel-white

Post on 01-Jun-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Gas Price Economics.pdf

    1/22

    Gas Price EconomicsMatthew Wampler-Doty

  • 8/9/2019 Gas Price Economics.pdf

    2/22

    Two Gas Price Mechanisms

    Clients send in a gasPricealong with their transactions

    Mechanism 1 (Ethereum Yellow Paper)

    Clients charged the gasPriceincluded in their

    transaction

    Mechanism 2 (Investigated Here)

    All transactions in the block have the same gasPrice,

    client cant be charged more than the listed price in

    their transaction

  • 8/9/2019 Gas Price Economics.pdf

    3/22

    Weak Dominance

    A strategy !ifor client iis weakly dominatedby

    another strategy !"iif and only if !"ipays out at leastas much as !iregardless of the other clients

    strategies

    A strategy is !"isaid to be weakly dominantif itweakly dominates all other strategies !i

  • 8/9/2019 Gas Price Economics.pdf

    4/22

  • 8/9/2019 Gas Price Economics.pdf

    5/22

    Nash Equilibria

    Mechanism 1: ??????

    Mechanism 2: Each client isubmits gasPrice=Ri

  • 8/9/2019 Gas Price Economics.pdf

    6/22

    Symmetric Model

    Follows Vickreys Counterspeculation, Auctions, and Competitive Sealed

    Tenders(1961)

    Simplifying Assumptions

    Clients are risk neutral

    Clients have similar transactions, in terms of gas used

    Reserve prices are independently and identically distributed according to

    an1probability distribution function F, and this is common knowledge

    Fixed number of clientsM, of whichNhave their transactions run

    Drunk under a lamppost model !

  • 8/9/2019 Gas Price Economics.pdf

    7/22

    Symmetric Model

    Idea

    Each client isets gasPrice= #(Ri)according to the

    same strictly increasing function #

    Satisfy the boundary condition #(0) = 0

    Use variational calculus to derive #

  • 8/9/2019 Gas Price Economics.pdf

    8/22

    Symmetric Model

    Define G(x) = FM-N(x)and denote density function

    g(x) = G!(x)

    Assuming all clientsjare submitting transactions

    with gasPrice = #-1(Rj)

    Client isubmitting a transaction with gasPrice =x

    can expect a payoff of

    G(#-1(x))(Ri-x)

  • 8/9/2019 Gas Price Economics.pdf

    9/22

    Symmetric Model

    Client iis finding the optimal gasPricex, so assume

    she is solving the following equation:

    0 =

    xG(1(x))(Ri x)

    = g(1

    (x))0(1(x))

    (Rix)G(1(x))

  • 8/9/2019 Gas Price Economics.pdf

    10/22

    Symmetric Model

    Since we are assuming that client iis using the same

    strategy as everyone else, thenx = #(Ri), so the

    equation she is solving is equivalent to the ODE:

    xg(Ri) =G(Ri)0(Ri) + g(Ri)(Ri)

    = Ri

    (G(Ri)(Ri))

  • 8/9/2019 Gas Price Economics.pdf

    11/22

    Symmetric Model

    Given the boundary condition #(0)= 0, the solution to

    the ODE is:

    (Ri) = 1

    G(Ri)

    Z Ri

    0

    xg(x)dx

    =Ri Z Ri

    0

    G(x)

    G(Ri)dx

    =Ri

    Z Ri

    0

    F(x)

    F(Ri)

    MNdx

  • 8/9/2019 Gas Price Economics.pdf

    12/22

    Nash Equilibria (Redux)

    Under the assumptions of the Vickrey style

    symmetric model:

    Mechanism 1: Each client isubmits

    Mechanism 2: Each client isubmits gasPrice=Ri

    gasPrice= Ri Z Ri

    0 F(x)F(Ri)

    MN

    dx

  • 8/9/2019 Gas Price Economics.pdf

    13/22

    Revenue

    E[Revenue for Mechanism 2]

    =NMM 1N 1

    Z 0

    xf(x)F(x)N1

    (1F(x))

    MN

    dx

    E[Revenue for Mechanism 1]

    =NMM

    1

    N 2

    Z

    0

    Z

    x

    (y)f(y)dyf(x)F(x)N2(1 F(x))MN1dx

  • 8/9/2019 Gas Price Economics.pdf

    14/22

    Interlude

  • 8/9/2019 Gas Price Economics.pdf

    15/22

    !"Vs Hobby

    Embedding NP-Hard problems in a cryptocurrency

  • 8/9/2019 Gas Price Economics.pdf

    16/22

    KnapsackSet of variablesxi"{0,1}, each with value viand weight

    wi

    The Knapsack Problemis to maximize

    Subject to

    The Knapsack Problem is NP-Hard

    nX

    i=1

    vixi

    nX

    i=1

    wixi 6 W

  • 8/9/2019 Gas Price Economics.pdf

    17/22

    Revenue (Redux)

    Theorem: Optimizing revenue for a miner in

    Mechanism 1 is NP-Hard

    Proof. It is exactly the knapsack problem. Thexi

    reflect transactions, the wiare the gas used by

    those transactions, the viis the ETH that client iis

    willing to pay based on her gasPriceand the gasher transaction consumes.

    !

  • 8/9/2019 Gas Price Economics.pdf

    18/22

    Revenue (Redux)

    Theorem: Optimizing revenue for a miner inMechanism 2 is alsoNP-Hard

    See Aggarwal and Hartlines Knapsack Auctions

    (2006)

  • 8/9/2019 Gas Price Economics.pdf

    19/22

    Engineering RealityMechanism 1 makes more sense for miners

    Dynamic programming solutions exist for Knapsack and havebeen well studied, probably could be deployed for miners in

    Mechanism 1

    Mechanism 2s optimization problem has not been studied at all

    Mechanism 2 makes more sense for clients

    Weakly Dominant NE still holds when we consider thecomputational complexity of the miners optimization problem

    Vickreys symmetric model clearly does not, no real traditionaleconomic theory at all about client behavior

  • 8/9/2019 Gas Price Economics.pdf

    20/22

    Setting Transaction CostsA Proposal:

    Use Mechanism 2

    Why?

    Mining is already subsidized

    This optimization problem can probably be solved

    Greedy solutions may be good enough

    Put the gasPricein the header

    Have the default for clients be the minimum gasPriceof the last 256

    blocks, minus some small constant $

  • 8/9/2019 Gas Price Economics.pdf

    21/22

    The Price of Everything and

    the Value of Nothing Causes clients gasPriceto be strongly correlated,hopefully drives clients values for Ether to be strongly

    correlated as well

    Creates market pressure for the gasPriceto decline over

    time in the absence of strong demand

    Difficult to game, from the perspective of Vlads crypto

    economics framework

    An oligopoly would have to mine 256 consecutive

    blocks in a row in order to control the default price

  • 8/9/2019 Gas Price Economics.pdf

    22/22

    Conclusions

    The gas pricing mechanism slated to be in

    Ethereum 1.0 is challenging to analyze from a

    game theoretic point of view

    Both gas pricing mechanisms investigated here

    impose NP-Hard optimization problems on miners

    The contents of this talk is admittedly just the

    beginning to analyzing this particular research

    topic