What is gas?
Gas is the lifeblood of any EVM compatible blockchain network. It is a monetary fee that compensates miners/validators of a blockchain in exchange for their computational effort of mining blocks. Depending on the consensus mechanism, this computational effort can be realized to the miner/validator as an electricity cost (Proof of Work) or financial stake (Proof of Stake).
Like gasoline for a car, blockchain gas fees are what allow a blockchain (ledger) to move forward in time.
***Please note: 1inch Network does not receive any portion of gas fees. 100% of the fee goes to the miner/validator of the blockchain, and generally cannot be refunded.
Gas fees are always paid in the native token of the network that the transaction is taking place on. 1inch has integrated with 7 different networks, each of which have their own native token.
Arbitrum: ETH (Arbitrum version)
BNB Chain: BNB
Gnosis Chain: xDAI
Optimistic Ethereum: ETH (optimistic version)
***To ensure a successful swap, it is recommended to have an approximate amount of these tokens for gas (depending on which network you are using):
.01 Arbitrum ETH
.01 Optimistic ETH
If you don't have enough, check out this guide on topping up your balance.
Why can't I pay for gas with the tokens I'm swapping?
On the above blockchains, all transactions require a gas fee. These operations carry significant costs (of both electricity, equipment, or capital) for the miners/stakers, who rely upon the gas fees to continue validating blocks. Since the miners/stakers are providing this service at a cost, they require payment in the native currency of the network that they are putting time, energy, and capital into supporting.
The size of this gas fee is proportional to the amount of computation required to execute an operation (not the amount of tokens swapped). The more complex the operation is, the more gas it requires to execute. Therefore, it is impossible to calculate the exact amount of gas needed before the transaction has been executed. Thankfully, 1inch provides an "Estimated Fee" to help you have an idea of how much gas you will need to pay for.
For example, as the Ethereum network and its market value grows in size, so do the gas fees required for transactions. At times, Ethereum fees can very high and significantly impact the profitability of trades/swaps. These high Ethereum gas costs have led to the evolution of newer, cheaper blockchains, such as BNB Chain, and Polygon.
***You can view current Ethereum gas prices here.
*** Need some gas for your transaction? Check out these instructions on how to top up your balance.
Why don't I have to pay gas fees (and wait for confirmations) when trading on a centralized exchange, like Binance, Coinbase, or FTX?
Centralized exchanges use "off-chain" order books to facilitate trades, and therefore do not have to rely upon miners of a blockchain to validate transactions. It is essentially an "IOU" system where the user gives the exchange full custody of their funds. Instead of paying a gas fee to trade, the user instead pays a trading fee, which goes to the exchange's wallet as profit. Unfortunately the user then also has to pay a "Withdrawal fee" for moving any funds on the centralized exchange into their own possession.
What is the gas limit?
The gas limit refers to the maximum amount of gas (in gwei) that you are willing to pay for an individual transaction. Most Ethereum transfers require a gas amount of 21,000 gwei; however, swaps (and other interactions with smart contracts) can consume significantly higher amounts. For reference, it could be seen as "the distance you are willing to drive a car vs. the distance to your destination". If the gas amount needed is 21k, and your limit is 22k, the Ethereum Virtual Machine (EVM) will use what is needed and send the excess gas back to your wallet. However, if you set the gas limit at 20k, the EVM will attempt to complete the transaction, but ultimately at the point of reaching 20k.
Most wallets will set the gas limit automatically, so the user does not have to think about it; however, the 1inch iOS Wallet allows for full gas limit customization.
How gas fees changed with EIP 1559
Since Ethereum "London" Hardfork event (EIP 1559), the entire structure of gas fees on Ethereum has changed substantially. Now, gas fees are broken down into a base fee, and a priority fee (miner tip). The base fee only changes incrementally based off of network demand, and the priority fee is a crucial incentive for miners to remain profitable for including transactions into blocks. The base fee and the priority tip combined together create the "Max fee", as seen in the 1inch user interface and mobile wallets.
You can find more details on EIP1559 and how it works here.
To customize gas fees within the 1inch iOS Wallet, please see this guide.
Questions, comments, concerns? Feel free to reach out to us in the live support chat!