Presentation is loading. Please wait.

Presentation is loading. Please wait.

GasToken: A Journey Through Blockchain Resource Arbitrage

Similar presentations


Presentation on theme: "GasToken: A Journey Through Blockchain Resource Arbitrage"— Presentation transcript:

1 GasToken: A Journey Through Blockchain Resource Arbitrage
Florian Tramèr Stanford University Yet another token? Even academics going down this road. Bear with me. No product, no ICO. The whole idea is that the token encodes a resource that cannot be backed directly by ether. MIT Bitcoin Expo 18 March 2018

2 Imagine if… Monday: It’s $4 for the cappuccino… and the transaction fee is $0.10. Friday: It’s $4 for the cappuccino… and the transaction fee is $6.25. 18 March 2018 MIT Bitcoin Expo

3 Transaction fees / Ethereum gas prices are super volatile
18 March 2018 MIT Bitcoin Expo

4 Same in Bitcoin… source: bitinfocharts.com 18 March 2018
MIT Bitcoin Expo

5 How do ordinary businesses handle volatility?
Stock up when prices are low! Or buy financial instruments… How do you “speculate on” or stockpile transaction fees? You can’t stockpile transaction fees? In some twisted way, you can! 18 March 2018 MIT Bitcoin Expo

6 GasToken: Stockpiling and trading Ethereum gas
Phil Daian, Lorenz Breidenbach, FT + Ari Juels 18 March 2018 MIT Bitcoin Expo

7 Ethereum Gas 1 GWei = 109 Wei 1 Ether = 1018 Wei User Miner(s)
MyContract func(x): a = x + 1 b = hash(a) Mem[0] = b 3 gas 30 gas 20000 gas 20033 gas I want to run func(1) How Much? User Miner(s) 1 GWei per gas? ( eth) Meh… 18 March 2018 MIT Bitcoin Expo

8 Ethereum Gas 1 GWei = 109 Wei 1 Ether = 1018 Wei User Miner(s)
MyContract func(x): a = x + 1 b = hash(a) Mem[0] = b 3 gas 30 gas 20000 gas 20033 gas Gas cost of contract is FIXED (always gas). But price of one unit of gas in ether is highly volatile I want to run func(1) How Much? User Miner(s) 10 GWei per gas? ( eth) OK! 18 March 2018 MIT Bitcoin Expo

9 GasToken in a nutshell To encourage state cleanup, Ethereum offers a gas refund for: Released contract storage Destroyed contracts Write to state when gas price is low Trade state slots as an ERC20 token Release state when gas price is high Refund pays up to half of transaction fee Not a new idea: goes back at least to 2015, Vitalik Bueterin speculated that rational miners could use this mechanism to fill up blocks More generally, it was clear that clients could use this in isolation (I stock storage for my future transactions). We show that this can easily be transformed into an open market, where stockers and consumers can be distinct 18 March 2018 MIT Bitcoin Expo

10 An example Store 10 words Breed kitties Regular Total Gas: 200,000
1 GWei Store 10 words Total Gas: 200,000 Price: $0.20 Regular 4 GWei Breed kitties Total Gas: 250,000 Price: $9 18 March 2018 MIT Bitcoin Expo

11 An example Store 10 words Free 10 words & breed kitties refund Regular
1 GWei Store 10 words Total Gas: 200,000 Price: $0.20 Free 10 words & breed kitties Regular 4 GWei refund Total Gas: 250,000 – 100,000 Price: $9 $5 18 March 2018 MIT Bitcoin Expo

12 Nifty details Two variants of GasToken:
GST1: uses storage, SSTORE(1), SSTORE(0) GST2: uses contracts, CREATE, SELFDESTRUCT GST2 more complex but also more efficient SSTORE: 20k to stock, for 10k refund (50%) CREATE: 32k to stock, for ~17k refund (53%) Refund is interesting when gas volatility is >2x 18 March 2018 MIT Bitcoin Expo

13 Nifty details Two variants of GasToken:
GST1: uses storage, SSTORE(1), SSTORE(0) GST2: uses contracts, CREATE, SELFDESTRUCT Refund is interesting when gas volatility is >2x GST2 more complex but also more efficient SSTORE: 20,000 to stock, for 10,000 refund CREATE: 32,000 to stock, for ~17,000 refund 18 March 2018 MIT Bitcoin Expo

14 FAQ Who “pays” for the refund?
Technically, the miner by only being paid for half the transaction cost Why wouldn’t miners blacklist GasToken then? Ethereum is naturally “censorship resistant” GasToken can increase transaction demand when gas prices are low Is GST1/2 an investment vehicle / security / financial product? No! We make absolutely no promises of any returns, profit…GasToken is not based on any currency, asset, or other financial product… We encourage users to expect zero further effort from its developers… it is likely that the developers of GasToken will advocate for changes to the network that render GasToken unusable.  Looking forward: very interesting insights into incentives: do people use gastoken? If not, why not? if it is used, how closely does the token’s price reflect the price of the gas that it holds. Will gas prices stabilize? do miners try to blacklist it? 18 March 2018 MIT Bitcoin Expo

15 FAQ Who “pays” for the refund?
Technically, the miner by only being paid for half the transaction cost Why wouldn’t miners blacklist GasToken then? Ethereum is naturally “censorship resistant” GasToken can increase transaction demand when gas prices are low Is GST1/2 an investment vehicle / security / financial product? No! We make absolutely no promises of any returns, profit…GasToken is not based on any currency, asset, or other financial product… We encourage users to expect zero further effort from its developers… it is likely that the developers of GasToken will advocate for changes to the network that render GasToken unusable.  So many 0s… 40 bits 18 March 2018 MIT Bitcoin Expo

16 The issue with storage pricing
Blockchain state is (a priori) permanent Smart contract storage, UTXO set, etc. One time transaction fee ⇒ recurring & indefinite costs to network Writing to state must be expensive to deter DOS attacks Yet incentivize users to clean up… E.g., many transactions in Bitcoin’s UTXO have no positive incentive to be spent Why 20k gas for SSTORE? How do we fix this “bug” 18 March 2018 MIT Bitcoin Expo

17 Storage Rent EIP 35/87: Charge “rent” for contract storage
If rent unpaid, storage is removed from chain Refund scheme could be removed entirely Great idea but tricky execution Developers must guard against storage loss Entire contracts could disappear if unpaid Doesn’t work for UTXO set… 18 March 2018 MIT Bitcoin Expo

18 The big picture: Cryptocommodities
Blockchain transactions require a number of “raw” resources or commodities Memory: block space, UTXO set, etc. Computation: e.g., gas in Ethereum How do we accurately price and freely trade these commodities (and their derivatives)? 18 March 2018 MIT Bitcoin Expo

19 Project Chicago: beyond GasToken
More efficient transaction-fee derivatives Bob: I’ll pay Alice’s transaction on April 1st Avg. gas price is 5 GWei Alice: Run my transaction Transfer funds from Bob to Alice Other cryptocommodities? In-protocol futures Could stable & efficient cryptocommodity markets be supported at the consensus level? How much escrow do we need? 18 March 2018 MIT Bitcoin Expo

20 Learn More Thanks! https://gastoken.io https://projectchicago.io
18 March 2018 MIT Bitcoin Expo


Download ppt "GasToken: A Journey Through Blockchain Resource Arbitrage"

Similar presentations


Ads by Google