Gas Option (Part 3.3)

Gregoire le Jeune
Oiler Network
Published in
7 min readMar 16, 2021

Hello Oilers!

In this series of article, we talk about everything Oiler is built upon.

Our first article is a back to basics focused on the ethos of options, our second one is a deep dive into options. We invite you to read them for the first time or to re-read them again.

We suggest that you start with Oiler’s back to basics and follow with our Underneath the hood article.

Once you understand the system you’re playing with, we suggest reading into the ethos of why we’re building blockchain native derivatives, block gas limit and Ice Age.

In case you might want a refresher on what we’re building, don’t hesitate to do so and read our previous articles:

Today, let’s talk about the product everyone wants to hear about:

“A way to hedge yourself against gas inflation.”

What is Gas?

When using Ethereum to transact or interact with a smart contract, you need to pay a fee to the miners, we call this fee gas. Gas is a reference to the computation required to process the transaction by a miner.

Gas is paid in ETH and denominated in gwei.

1 gwei = 0.000000001 ether

Imagine a situation in which you need to spend 100,000 gas to interact with a smart contract and an average gas price of 1 gwei.

100,000 gas x 1 gwei = 100,000 gwei = 0.0001 ETH

While executing the transaction, you pay a fee of 0.0001 ETH to push your transaction into the network.

It’s important to understand why you need to pay a fee to push a transaction. which is why it is important to grasp fully the concept of what the Ethereum Virtual Machine (EVM) is.

Ethereum Virtual Machine

The EVM can be viewed as the emulation of a computer system. In a computer, an operation consumes CPU cycles, disk access or memory on the hosting machine.

Virtual machines are creating a level of abstraction between the code and the executing machine. This layer is what enables Ethereum to be decentralised

Since contract executions are run by the people who maintain an Ethereum node, an attacker could eventually try to slow down the network by including expensive operations.

To prevent this and to reward the people who maintain Ethereum nodes, every opcode (the instructions set to use the EVM) has a cost, denominated in gas. The more complex the instruction, the more expensive it is.

Here’s an appendix of the fee schedule.

It’s important to note that Appendix G dates from Ethereum’s Yellow paper and is not up to date, but it’s a great way to understand how expensive a transaction is.

The main reason for these costs is that decentralisation matters.

Now, let’s look at transactions on Ethereum.

What are transactions on Ethereum?

Transactions are cryptographically signed instructions from accounts. They update the state of the Ethereum network.

In practice, a transaction on Ethereum looks like this:

gasLimit (the maximum) and gasPrice (actual price) will define the transaction fee paid to the miner.

For a transaction to be submitted to the network the following steps need to happen:

  • You send your transaction and a transaction hash is created
  • The transaction is broadcasted to the network and included in the mempool (pending transactions on Ethereum)
  • Miners decide to pick your transaction and include it in a block to verify it and mark it as successful. Miners prioritise the transactions which spent the most on Gas, which is why some transactions fail or are left pending.
  • The transaction gets a block confirmations number. Each block mined on top of a block where your transactions was included is a ‘confirmation’. The number of confirmations define how unlikely it is for the chain to reorganize into a different branch, that does not include your transaction.

Austin Griffith has realised a great video in order to visualise how transactions on Ethereum works.

Now that we’ve touched on these concepts, let’s go back to Gas.

Gas prices

As one can understand, gas prices fluctuate based on the activity on Ethereum. When the network is heavily utilised, transaction prices increase and inversely, when it is not utilised, gas prices decrease.

The best websites to find information regarding current gas prices are: ETHgasstation and Gasnow.

Transactions with the highest gas fee are prioritised for validation, as the system is based on auction to get your transaction through. A valid transaction is added to the blockchain and goes through.

When the gas fees are too low, the transaction can simply fail or be queued which lead to a longer waiting time for it to go through. In times of high demand, it is painfully annoying to get the right gas price to make a transaction go through.

A lot of traders simply opt for fast transaction as they do not understand how gas systems work. Which leads to increased prices and a snowball effect.

This is what trading on Ethereum has felt like for the past months.

Now, how does one takes advantage of the gas market and how could one trade it? Currently, well there aren’t wildly traded solutions. But there are a few great solutions on the market.

My personal favourite is the CHI token, brought to life this summer by the 1inch team. I suggest reading into it as the product was deployed in a brilliant manner, the only constraint to its usage is that most people don’t realise how cool it is!

The OG of the gas trading game is GasToken. GasToken was launched in August 2018. The goal behind GasToken is to tokenise gas, in order to enable users to store gas when it is cheap and using it when it becomes expensive.

Unfortunately, both these will be rendered useless with EIP-3298 which intends to remove refunds such as SELFDESTRUCT and SSTORE. This EIP was created very recently (26/02/2021) and might go through.

As discussed by Nick Chong, in a recent Twitter thread, these tokens are often used for the wrong reasons and led to gas price inflations.

There are other alternatives on the market. My main issue with them is that their kind of design opens up attack vectors because a single entity can manipulate gas prices.

As we have seen recently with exchanges driving gas prices up. Voluntary or not, exchanges pushed the price of gas and made DeFi unusable and could’ve profited on their market. The other reason why we are different is that they rely on oracles which can lead to hacks and important flash loans opportunities.

This leads us to EIP-1559 and its importance for Oiler.

Why are we waiting for EIP-1559 to deploy Gas Options?

We have already explained previously why we’re waiting for the EIP-1559 to be released before releasing our gas hedging contract.

The reason is that we believe strongly that our products should be as safe as possible and, therefore, should not rely on oracles.

Thanks to EIP-1559, Oiler won’t have to rely on an oracle as we will be able to fully rely on Ethereum’s block header. We also want to highlight that BASEFEE will be less manipulable than the current gas pricing system.

As previously said in our article focused on EIP-1559:

“To move the BASEFEE up it is enough for the manipulator to generate thousands of transactions that are ready to pay a lot for gas while to force the BASEFEE down we need to have a set of colluding miners willing to do so (and they need to have together nearly 50% of the hashrate to be successful with a high probability).”

To go deep into EIP-1559, I highly recommend reading Deribit Insight’s articles. The first one is a complete analysis of EIP-1559, the second is an explainer regarding why miners will accept EIP-1559 and the third one is an analysis of miner’s revenues post EIP-1559.

GasOption Hedge

The underlying of the gas option is BASEFEE — a transaction cost parameter used in the EIP-1559. These options will only be available when EIP-1559 is deployed on the Ethereum mainnet.

EIP-1559 has been approved for the London upgrade which will occur in July 2021.

BASEFEE fluctuates as a result of the supply and demand changes. The

Supply-side is represented by the block gas limit and is set by miners and/or core developers.

Demand-side is defined by the demand for the storage and computation on the Ethereum network (simply speaking — how many transactions users want to execute and the given moment and how valuable they are for them).

While BASEFEE introduces a critical mechanism of fee burning that prevents miners from freely manipulating the gas prices to any value, BASEFEE remains prone to some manipulation from market participants.

  • a cartel of miners can bring the BASEFEE down
  • any network users can bring the BASEFEE for short period of times by generating high-paying transactions

This article concludes our introductory series 🛢️

We’re busy building, but soon, our Liquidity bootstrapping event will occur.

You know the drill.

Legal Notice:

This article and any information contained in it is subject to the Oiler Legal Notice available at https://docs.oiler.network/oiler-network/token/legal-notice-and-risk-disclosure-statement. Please carefully review the Legal Notice as it contains important legal information, risk disclosure statement, limitations and restrictions relating to the information that we provide, third-party resources and forward-looking statements.

Links

Oiler’s Website: oiler.network

Oiler GitBook: https://docs.oiler.network/oiler-network/

Oiler’s Medium: https://medium.com/oiler-network

Oiler’s Twitter: https://twitter.com/OilerNetwork

Oiler’s Discord: https://discord.gg/bxMsvVTgJp

Oiler’s Telegram: https://t.me/oilernetwork

--

--