GasTokenThe first contract that allows users to buy and sell Ethereum gas directly.
Description
GasToken is a new, cutting-edge Ethereum contract that allows users to tokenize gas on the Ethereum network, storing gas when it is cheap and using / deploying this gas when it is expensive. Using GasToken can subsidize high gas prices on transactions to do everything from arbitraging decentralized exchanges to buying into ICOs early. GasToken is also the first contract on the Ethereum network that allows users to buy and sell gas directly, enabling long-term "banking" of gas that can help shield users from rising gas prices.
GasToken works by taking advantage of the storage refund in Ethereum. To encourage contracts to delete storage variables (that all nodes have to store forever!), Ethereum provides a refund when a storage element is deleted. This refund can pay for up to half of the gas used by a contract transaction (simple sends are not eligible for a refund, since they already use the minimum amount of gas; batched sends to contracts, however, can benefit from GasToken).
The way GasToken works is simple: you create (or mint) GasToken tokens by saving data into the GasToken contract's storage, when gas prices are low. When gas prices are high (during an ICO, during peak hours, whatever), you spend (or free) GasToken tokens by sending them back to the GasToken contract for destruction, freeing up the data saved in an earlier step. This new transaction now gets a refund, making it much cheaper to execute than the same transaction that doesn't use GasToken. The general mechanism of banking storage at low prices and releasing it at high prices had been previously suggested for miners (a miner that encounters a non-full block has incentive to fill it up with storage-filling transactions). GasToken extends this idea to all Ethereum users (not just miners) by introducing a simple way of tokenizing stored gas. GasToken complies with the ERC20 token standard, thus allowing free exchange of gas tokens between users.
There are actually two versions of GasToken: one that uses storage to bank gas, and another one that banks gas by creating contracts. The latter takes advantage of the gas refund obtained when deleting a whole contract. The two GasToken variants have different efficiency profiles, and users should choose which is more appropriate for their use case.
It's a simple, powerful idea. Use GasToken in this manner, and pay less per contract transaction than anyone else on the Ethereum network.
Ethereum