With the v.1.8.0 changes, Klaytn now supports the following features for Ethereum Equivalence.

The Klaytn Team has picked out some of the most well-known, and widely used Ethereum tools to be used on Klaytn without any significant modifications. But Klaytn, unlike Ethereum, has a fixed gas price model. This means developers should take extra care when using Ethereum native tooling to be sure they have to set the right amount of gas when creating a transaction. This article will briefly explain some gas price related considerations when you are using Ethereum tools on Klaytn. As such, below we will explain how to set a Klaytn compatible gas price in web3.js, ethers.js, Hardhat and Truffle.

Background

With the introduction of EIP-1559 and the London hard fork, the gas price in Ethereum is flexibly determined in accordance with the base fee of the block. On the other hand, Klaytn has a fixed gas price (Baobab 750ston, Cypress 25ston at the time of writing).

If the fields relating to gas price, such as `gasPrice` or `max_priority_fee_per_gas`, `max_fee_per_gas`, are not defined, Ethereum tools will create a transaction using the default values generated by the library being used (usually web3.js or ethers.js). But as mentioned above, since Klaytn uses a fixed `gasPrice`, any default values generated by the library (which is set by matching the dynamic pricing model of Ethereum) will result in a transaction failure. This is why any fields relating to `gasPrice` must be explicitly defined when using Ethereum native development tools.

Below we would like to demonstrate how to set the `gasPrice` for the four tools: web3.js ethers.js, Truffle, and Hardhat. The `gasPrice` values used in our code samples are all 25ston, but remember that the fixed `gasPrice` may vary between networks.

web3.js

When you want to create a `legacy` Ethereum formatted transaction (a pre-EIP 1559 formatted transaction), explicitly include the `gasPrice` field.. and set it to the connecting network’s fixed gas price.

const url = `provider url`
const privateKey = `privateKey`
const web3 = new Web3(url)

const tx = await web3.eth.accounts.signTransaction({
to: `0x8a726c5d1b9b7796df6836f24ef9ea50ab5178c6`,
value: 90000000000,
gasPrice: 25000000000,
gas: 21000,
}, privateKey)

const receipt = await web3.eth.sendSignedTransaction(tx.rawTransaction)

If you want to create a `dynamic fee` formatted transaction (post EIP-1559, Ethereum Type 1 or Type 2 transaction), explicitly add the fields `maxFeePerGas` and `maxPriorityFeePerGas`, then set both to the connecting network’s fixed gas price.

const url = `provider url`
const privateKey = `privateKey`
const web3 = new Web3(url)

const tx = await web3.eth.accounts.signTransaction({
to: `0x8a726c5d1b9b7796df6836f24ef9ea50ab5178c6`,
value: 90000000000,
maxFeePerGas: 25000000000,
maxPriorityFeePerGas: 25000000000,
gas: 21000,
}, privateKey)

const receipt = await web3.eth.sendSignedTransaction(tx.rawTransaction)

ethers.js

Similar to the web3 case, if you want to create an Ethereum `legacy` formatted transaction, explicitly add the field `gasPrice` and populate with a fixed gas price value for the connected network.

const url = `provider url`
const provider = new ethers.providers.JsonRpcProvider(url)
const wallet = new ethers.Wallet(privKey, provider)

const tx = await wallet.sendTransaction({
to: account,
value: 90000000000,
gasPrice: 25000000000,
gasLimit: 21000,
})

const receipt = await tx.wait()

If you want to create a `dynamic fee` transaction, explicitly add the fields `maxFeePerGas` and `maxPriorityFeePerGas` and populate with fixed gas price rates.

const url = `provider url`
const provider = new ethers.providers.JsonRpcProvider(url)
const wallet = new ethers.Wallet(privKey, provider)

const tx = await wallet.sendTransaction({
to: account,
value: 90000000000,
maxFeePerGas: 25000000000,
maxPriorityFeePerGas: 25000000000,
gasLimit: 21000,
})

const receipt = await tx.wait()

Hardhat

There are two ways to set `gasPrice` on Hardhat.

  1. Define `gasPrice` to be used as the default value for all transactions in Hardhat.config.js
  2. Define the `gasPrice` fields in the individual transaction code itself.

1. Defining the values in `hardhat.config.js`

In the `networks` options of the `hardhat.config.js`, you can define and use the options to be used when you are connecting to the Klaytn blockchain network explicitly. For more details, please refer to the official hardhat documentation.

//Hardhat.config.jsmodule.exports = {
networks: {
Hardhat: {
...............
}
},
klaytn: {
url: "provider url",
gasPrice: 25000000000,
account: [...],
}
},

2. Defining the values in the transaction code

Hardhat supports both web3.js and ethers.js. You can use whichever library you prefer. For the instructions for each library, refer to the explanations above. If you define gas price directly within your transactions, these definitions will overwrite any values defined in the config.

Tips on network forking

You can fork archive mode nodes with Hardhat at any block. However, when forking full mode nodes, you have to set an appropriate block number that corresponds to the state storage cycle. By default full mode nodes set their state storage cycle at blocks at a multiple of 128. How you set a block when forking depends on what kind of node you are connecting to with your config assigned RPC URI.

Truffle

Just as with Hardhat, there are two ways to set `gasPrice` with Truffle.

  1. Define `gasPrice` to be used as the default value for all transactions in Truffle-config.js
  2. Define the `gasPrice` fields in the transaction code

Warning: If you want to use migration contracts that manage contract deployment history, we recommend using the first method (truffle-config.js). The second method cannot control the gas price at the time of calling the function that records history on the migration contract, which may prevent it from functioning normally.

1. Defining the values in truffle-config.js

In the `networks` options in `truffle-config.js`, you can define and use the options to be used when you are connecting to the blockchain network via Truffle. Unlike Hardhat, in Truffle, you must assign values for both pre and post EIP 1559 functionality by exclusively setting the `gasPrice`, `maxFeePerGas`, and `maxPriorityFeePerGas` fields. Please refer to the documentation for more information.

If you want to exclusively create `legacy` Ethereum formatted transactions in Truffle, explicitly add the `gasPrice` field with the network fixed gas price.

module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
klaytn: {
provider: () =>
new HDWalletProvider({
providerOrUrl: "provider url",
privateKeys: [],
}),
gas: 50000000,
gasPrice: 25000000000,
network_id: "*"
}
},
};

If you want to exclusively create `dynamic fee` formatted transactions, explicitly add the fields `maxFeePerGas` and `maxPriorityFeePerGas` fields with the network fixed gas price.

module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
klaytn: {
provider: () =>
new HDWalletProvider({
providerOrUrl: "provider url",
privateKeys: [],
}),
gas: 50000000,
maxFeePerGas: 25000000000,
maxPriorityFeePerGas: 25000000000,
network_id: "*"
}
},
};

2. Defining the values in the transaction code

Truffle abstracts contracts, so you can easily deploy and call them. For more information, please refer to the official documentation.

If you look at the contract APIs provided on Truffle, you will see that you can add the transaction parameters. Here you can add the fields related to `gasPrice`.

If you want to create `legacy` Ethereum formatted transactions, add the `gasPrice` field.

deployer.deploy(MetaCoin, {gasPrice: 25000000000,
from: ...,
gas: ...,
});

If you want to create `dynamic fee` formatted transactions, add the fields `maxFeePerGas` and `maxPriorityFeePerGas`.

deployer.deploy(MetaCoin, {
maxFeePerGas: 25000000000,
maxPriorityFeePerGas: 25000000000,
from: ...,
gas: ...,
});

With the above changes, and the activation of Klaytn v1.8.0, Ethereum tooling will now work effortlessly with the Klaytn ecosystem. However, it should be noted that usage of the above tooling will strictly support the submission and processing of Ethereum formatted transactions within the `eth` namespace API offered by Klaytn.

For the last several months, the Klaytn team and the community have come a long way in identifying the spam transaction issue, applying technical mitigation measures, and building a consensus through surveys and AMAs.

Based on the support from our community, the Klaytn team is happy to announce the gas price adjustment plan including the adjusted gas price, gas fee burn policy, schedule, and notice for the dApp developers as shown below.

Adjusted gas price

Gas fee burn policy (short-term)

*The short-term policy remains in place until a new gas fee burn mechanism is introduced.

Schedule

Notice for DApp developers

If you have any questions, please contact the Klaytn team through our Discord or Klaytn Forum

We had the pleasure of hosting EZ Yi, our Head of Strategy, and Colin Kim, Klaytn Core Development Team Leader, for an informative AMA session where they answered the community’s questions about Klaytn’s plans to increase the gas price to combat arbitrage bots. Listen to the AMA session below or read on for our recap!

Note: Some of the text have been edited for grammar and clarity.

Date & Time: Feb 18th at 1pm SGT / 2pm KST
Platform: Twitter Spaces
Speakers:
EZ Yi and Colin Kim from Klaytn Foundation
Host: Sofy, Community Manager at Klaytn Foundation


Introduction

Sofy: Good afternoon and Happy Friday everyone! Hope everyone is all ready for the weekend. Welcome to another AMA session with us. I am Sofy, the Community Manager for Klaytn and I will be the host for today’s exciting session. Thank you all for being here today with us. Once again, let’s welcome EZ, and this time, we have Colin who will be joining in. Together, they will both discuss the recent talks about the gas price adjustment.

Please kindly introduce yourself to the community and share with us about your place in the Klaytn network.

EZ: Good afternoon! I am EZ, the Head of Strategy of Klaytn Foundation, covering Klaytn 2.0 implementation, new opportunities identification, and token economy innovation. The focus of today’s topic—the gas price adjustment—is within a broader context of token economy innovation. I know how important the gas price adjustment is for the entire community and I will try my best to answer your queries as clearly as possible.

Colin: Hi, thanks for having me. I have been working with Klaytn for three years. I was involved in developing various products such as the Klaytn core, Klaytn API service, and KlipDrops, which is an NFT marketplace for digital art. Currently I’m leading the Klaytn core development team to achieve Klaytn 2.0’s technical goals.

Sofy: Thank you for the introduction guys, and really looking forward to hearing more about your thoughts and Klaytn’s approach to the gas price adjustment. We will also be sharing the results of 2 surveys that were sent out recently to both our community and our Governance Council towards the end of our AMA. Let’s get on to our community questions then.

Questions

Q1
Sofy: What is the motivation for the gas price adjustment?

Colin: When the mainnet first launched, we aimed for our gas fees to be 10% of Ethereum’s. However, currently, it is about 10,000 times less than Ethereum’s due to various reasons. This worked fine when the Klaytn network was not that busy. But recently, we found many arbitrage transactions operating in an inefficient manner. Most of these transactions are actually doing nothing, but they are able to remain profitable because the transaction fee is relatively low.

We tried some technical approaches to reduce these transactions. Some of them are effective to some degree, but not that much. Since the main reason for this kind of transaction surge comes from low transaction fee, this gas price increase is inevitable to reduce the transaction surge.

Q2
Sofy: What happened exactly with the bots?

Colin: There are many bots on the Klaytn network. The problematic bots are mainly arbitrage bots trying to capitalize on the tiny rate differences between exchanges that happen when a user buys a token using another token. The arbitrageurs all submit transactions when this happens, but only the first arbitrageur whose transaction is executed first will succeed.

Unlike Ethereum, Klaytn does not have a fee-based transaction prioritization mechanism. Klaytn’s gas price is fixed, which is good for service providers because they do not need to think about dynamic transaction fees. But it’s not good for arbitrageurs because they don’t have a method to execute their transaction faster than the others. To compensate, they submit many transactions to increase the probability of success. This is why there are so many transactions flooding on the network.

And since Klaytn’s transaction fee is low, they can afford to submit many transactions and still remain profitable.

Q3
Sofy: Klaytn’s TPS is around 4,000, however the bots’ TPS appears to be around 2,000, as shown in Klaytnscope. Are bots really a problem or is Klaytn’s TPS not actually 4,000?

Colin: Like many other blockchains, Klaytn’s peak TPS is measured based on simple token transfer transactions. Because an arbitrage transaction is a more complicated transaction that executes several token transfers in a single transaction, we will not see a chain’s peak TPS when executing a large number of these transactions.

Bots are problematic because they fill up the processing capacity of a block, preventing other transactions from executing normally. If arbitrageurs take a large portion of the network capacity, it will not be good for the entire community.

Q4
Sofy: Are the bots evil? Aren’t they just one of the users of the Klaytn network?

Colin: I don’t think bots are evil. As you said, they are also Klaytn users. But it would be better to implement bots more efficiently. They are creating a large amount of inconvenience for other users in exchange for the tiny benefits of arbitrage trading. Since the Klaytn network is a common resource to be shared among all Klaytn users, it is not good to make such large number of meaningless transactions on the network. This is the problem we are facing, and we need to solve it.

Q5
Sofy: What has the Klaytn team done to tackle the bots problem?

Colin: First, we analyzed what was happening with the large number of transactions. We found some small number of contracts being used for arbitrage bots, and that most of the transactions are just reverted. Only 1% of the transactions submitted by bots succeed.

So we tried to throttle transactions based on the contract addresses. If many transactions are reverted on certain contract addresses, we can limit the transaction propagation of those transactions. It had some effect, but in turn some of the bots responded by changing their behavior to execute normally without reverting.

This made it impossible to differentiate between normal transactions and these kinds of bot transactions. So in this case, we were left with only two solutions, but neither were meaningful—fair scheduling and prioritization of transactions based on age. So we concluded that we need to increase the transaction fee to effectively reduce the number of bot transactions. If you are interested to learn more about this in detail, please check out our two of blog posts where we detail our analysis and conclusions:

Bot Transaction Analysis Report

Technical Solutions Against Transaction Surges

Q6
Sofy: Is the gas price adjustment the only option? Can we just identify who are the bots, make a blacklist and penalize them?

Colin: This can be another solution, but it has several problems. Firstly, identifying the bots isn’t that easy. If we use a threshold to identify bot transactions, it creates a chance that a normal service will hit the threshold and end up wrongly classified as a bot.

If we implement blacklisting, it can be misused to block a legitimate service’s success. In addition to this, blacklisting will not be effective because deploying a smart contract to change the address is so easy.

Q7
Sofy: Gas price adjustment can help solve spam transactions caused by a small number of users, but it is disadvantageous for the majority of ecosystem participants. Is there a solution for this?

EZ: I think it’s the other way around. Adjusting the gas price will give the bot traders a disadvantage as it will be harder for them to make a profit. On the other hand, the majority of ecosystem participants will enjoy a less congested network. In addition to that, the Klaytn team will come up with an enhanced gas fee policy and token economy plan to make up for the gas price adjustment. For example, we are exploring dynamic gas pricing and a gas burning mechanism. Under the dynamic pricing, gas fee becomes cheaper when the network is not congested.

Colin: I agree with that opinion, but it is kind of a conflict. If we keep the gas price at our current level, more spam or bot transactions will inevitably flood into our network, causing ecosystem participants and KLAY holders to suffer when their transactions are not processed well due to the spam transactions. That’s why we are also thinking about how we can give other advantages to ecosystem partners such as through a gas fee burning mechanism, incentive systems, and grant programs funded by the gas price adjustment. We are trying hard to offset the impact of the gas price adjustment for normal users.

Q8
Sofy: Instead of discussing the pros and cons of the decisions made by the Klaytn team, I think it would be better to discuss the direction with the developers participating in the GCs and KIR. Please comment on this.

Colin: We published several blog posts to communicate the gas price adjustment proposal, including a survey we conducted with our GC members as well as a second survey for the broader Klaytn community. We are trying to gather as much feedback as we can, so please feel free to share your thoughts through any channels you can access. We are open to hearing.

EZ: The Klaytn team didn’t make a decision, but a suggestion. We are in the process of building a consensus of the community through various communication channels.

Q9
Sofy: What is the rationale behind the Klaytn team’s proposal of 500 ston or 750 ston as potential gas price adjustment levels?

EZ: 500 ston is a level from which Arbitrageurs’ costs will outweigh their benefits if they maintain their current transaction volume even after the adjustment. Thus, we can call 500 ston a ‘threshold’ price level. Arbitrageurs could then try to reduce the transactions to a level where they can have a similar level of yield as before, which is 900%. In this case, the transaction volume could be reduced to less than 5%.

Although this is quite an impressive reduction of transactions, we went further to check the expected transaction volume with yield less than 900%. From our analysis, arbitrageurs still can enjoy about 60% yield, which is not that low, with transaction volume reduced to about 30%. Considering that it is likely that bot algorithms will evolve in the future to bring marginally higher yields, we think that taking a more proactive and prudent approach is the more desirable option by adjusting the gas price to one of the higher-level options.

If you wish to learn more about the analysis that led to these two gas price levels, please read our post here.

Q10
Sofy: Will DApps need to be modified for this gas price increase?

Colin: Unfortunately, yes. Klaytn employs a fixed gas price policy, so it only accepts transactions having a gas price of 25 ston. If we increase the gas price to, for example, 750 ston, then the Klaytn network will only accept transactions with a gas price of 750 ston. So DApps will need to be modified to set gas price to 750 instead of 25 ston. If you do not do this, the transaction cannot be submitted into the network. Also, the transaction pool will be flushed when the gas price change is effective on a node. More information on this will be published soon on our blog—stay tuned.

Q11
Sofy: When calling a smart contract function, who gets paid and how much does the caller pay?

Colin: In general, when you call a smart contact, you are using a network of computers. So you need to pay for their use. This is the basic concept of the transaction fee. The transaction fee is calculated based on how many instructions you executed on EVM. When an instruction is executed on EVM, the amount of gas used is added. The amount of gas is multiplied by the gas price, and the result is the transaction fee.

This transaction fee is normally charged to the transaction sender. But with the fee delegation feature implemented at the platform level on Klaytn, this transaction fee can instead be directly charged to the fee payer. This is one key difference between Klaytn and Ethereum. Ethereum also has a fee delegation mechanism on a smart contract, but it requires some special care when you implement it in your smart contract.

Q12
Sofy: What is difference between “gas” “gas price” and “fee”?

Colin: “Gas” is the value of how much a transaction uses the blockchain network resources. Every time you execute a smart contract it takes numerous EVM opcodes, and each opcode takes some determined gas. The value of the determined gas is defined in the platform source code. So “gas” is just a number that represents how much resource the transaction uses. “Gas” is then multiplied by the “gas price”to get the “gas fee”, which is the final value to be subtracted from the sender’s balance.

Q13
Sofy: Are GCs ok with the gas price adjustment?

EZ: Yes. There was a survey for GC members around early January. 12 entities responded and they supported the Klaytn Team’s active engagement for both technical measures and gas price adjustment. In regards to the approach, they preferred a permanent adjustment initially up to the threshold level. You can see the results of our GC survey here.

Q14
Sofy: How about the overall community?

EZ: They are also with the Klaytn team, based on our community survey results. Network availability is the factor that has the highest ratio of respondents who answered as important, followed by transaction speed, on-chain data integrity, and finally low gas fee.

It is interesting to see the gas fee ranked as the lowest. 60% of respondents also chose 750 ston as the more appropriate level of gas price compared to 500 ston.

Lastly, 76% of respondents preferred an immediate increase to a gradual one.

Q15
Sofy: When will the gas price adjustment and deflation take effect? It’s important to implement the burn mechanism for the increased tx fee transparently, to maintain and enhance the value of Klaytn.

EZ: We will start with the Baobab network first. The announcement will be on Feb 22nd and activation on Feb 28th. For the Cypress network, the announcement and activation will be in March and is subject to change depending on how the Baobab test turns out. The incremental gas fee from the gas price adjustment will be burned, and you will be able to check it through a publicly open channel.

Concerning deflation, I would regard the question as asking about ‘deflationary measures’ such as gas fee burn, etc. The Klaytn team is working hard to introduce the gas fee burning mechanism as early as possible. And just as how we are doing for gas price adjustment, the Klaytn team will share an initial idea with the community, gather feedback, and build consensus before execution. It won’t be long.


Many thanks to EZ Yi and Colin Kim for taking time out of their busy schedules for our AMA! To find out more about Klaytn and join our growing global community, please follow these links below:

Website | Twitter | Discord | Telegram


As a first step to understanding how our communities view the potential gas price adjustment, the Klaytn team surveyed our GC members and identified how they view the matter. Combining the result of both the GC survey and the previous technical analysis, the Klaytn Team came up with a potential gas price adjustment plan and asked the community’s opinions in a survey outlined as follows in our last article:


Survey Outline

Period

Feb 10 2022 — Feb 16 2022

Questions


Results

Respondents

25 persons

Answers

Rank the factors that matter most to you when using a blockchain.

  1. Transaction speed
    (48%) Important
    (36%) Neutral
    (16%) Not important
  2. Low gas fee
    (20%) Important
    (28%) Neutral
    (52%) Not important
  3. Network availability
    (64%) Important
    (24%) Neutral
    (12%) Not important
  4. Integrity of on-chain data
    (44%) Important
    (12%) Neutral
    (44%) Not important

Similar to Solana, Klaytn’s low gas fees make our network vulnerable to DDoS attacks. If we were to increase our gas price, how much should it be raised to?

How should the gas price increase be implemented?

Do you have any other feedback regarding the proposal to combat arbitrage bot spam transactions by increasing our gas price?


In short, network availability is the factor that has the highest ratio of respondents who answered as important, followed by transaction speed, on-chain data integrity, and low gas fee. 60% of respondents chose 750 ston as the more appropriate level of gas price than 500 ston. Lastly, 76% of respondents preferred an immediate increase to a gradual one.

The Klaytn Team plans to introduce a gas price adjustment plan based on our findings from the Technical Solutions Against Transaction Surges and Klaytn GC Survey Report on Gas Price Adjustment. We would highly appreciate feedback from the community, please share your thoughts with us in the survey linked at the bottom.


Gas Price Adjustment Plan

We are currently contemplating an adjustment between 250 ston — 750 ston for the gas price for KLAY transactions (assuming that KLAY = $1.20, a KLAY transfer would then cost approx. $0.006 — $0.018). Based on the gathered data, we have already estimated the anticipated results for three different price points at 250 ston, 500 ston, and 750 ston:

Assuming that arbitrageurs will maintain their transaction level even after the adjustment:

Assuming that arbitrageurs will seek to secure 100% yield rate even after the adjustment:

Assuming that arbitrageurs will seek to maintain their current yield rate (900%) even after the adjustment:

It can be seen from these estimates that an adjustment to 250 ston would not be sufficient to stop spam transactions, as the arbitrageurs would not face any losses for keeping their current volume of transactions sufficiently, since the forced reduction of transactions by half would still give them high yields. A 500 ston adjustment, however, is where the arbitrageurs will start to become dissuaded from sending out bulk bot transactions. But even at this increased adjustment level, the transaction volume is only reduced down to 30% while relatively high yields (ca. 60%) can still be generated, which ensures that at current level this activity will still occur even without considering that it is likely that bot algorithms will evolve in the future to bring marginally higher yields. Therefore, it is our conclusion that to adequately bring down transaction volume and lower network congestion, taking a more proactive and prudent approach is the more desirable option by adjusting the gas price to one of the higher level options.

For the actual implementation of the price adjustment, we considered taking an immediate or an incremental approach. The former would have the gas price increase directly to 750 ston or 500 ston, whereas the latter would increase the price in steps over a longer period of time, for example from 100 ston, to 200 ston and then 300 ston. The advantages of each option can be summed up as follows:

An incremental adjustment is going to put less pressure regarding the gas price, but it may not be a strong enough solution against the spam transactions in the short term. Another point of concern is the confusion and inconvenience to the Klaytn community should there be multiple implementations of the gas price increase. Considering these aspects, we believe an immediate one-time increase seems to be the more desirable option.

The gas price increase will be accompanied by the gas price policy as defined below:

Gas Price Policy Direction

The Klaytn Team is reviewing various possibilities to let more contributors to the network and ecosystem benefit from Klaytn’s growth.The following are points that we think will best serve the community moving forward.

All of the newly adjusted gas fees will be burned.

Only the gas price calculated with the existing 25 ston will be used as KGF, KIR resources as well as GC rewards. Any portion of the adjusted amount exceeding this base fee pricing will be 100% burned. We want to thereby emphasize that the goal of the price increase is “promoting the fair and effective use of the Klaytn network”.

A fee burning mechanism to maintain KLAY’s value will be put in place soon.

The Klaytn Team is firmly convinced that our ecosystem is going to expand and flourish, and we are doing our best to realize this. In the process of the ecosystem’s growth, the total gas fee is bound to increase, so a deflationary mechanism to maintain and support KLAY’s value is necessary. We are thankful for the community’s patience with us on this matter. We want this mechanism to be accurate, stable and accomplish our shared goals. We promise to bring you a proper burning mechanism that best serves the ecosystem once it is ready.

We want a dynamic and deterministic fee policy in the long term

Dynamic Fee Policy
The network stability is highly undermined during transaction surges. Most of the transactions are initiated by a few entities, but the consequences are borne by the vast majority of unsuspecting users, who would have to wait longer for one transaction to be processed. To reduce the incentives for creating bursty volumes of transactions, we want to put in place a dynamic fee policy whereby the prices change in accordance with the transactions. In addition to this, organic transaction volume can create the same issue in the future. If we have a mechanism which incentives processing transactions that “need to be given priority even at the cost of high gas fees, the spam transactions generated by bots and other less priority transactions are likely to decrease at those times. Later, as less transactions compete for network resources, the gas price will return to its previous level naturally.

Deterministic Fee Policy
If developers within the Klaytn ecosystem cannot reliably estimate the gas price, it could become a source of great inconvenience for developers and users. The Klaytn Team wants to solve this via retaining a Deterministic fee policy. For example, the gas price for a block could be determined based on the total gas used for the X number of blocks in the previous month. (Example: If the total gas used for the last 10 blocks exceeds 90% of a certain threshold, the gas price of the next block increases by the square root of 1.5). In addition, we will include measures (e.g. a certain level of randomness) to prevent any abusive cases that could occur with a 100% deterministic policy.


The Klaytn Team is actively seeking additional measures to raise the value of KLAY from a token economy standpoint and is always happy to hear of new and valuable solutions from the Klaytn and wider blockchain community.

Please share your opinions on the Klaytn Team’s gas price adjustment plan in this link. Thank you in advance for your participation.

After determining that the several technical measures applied to tackle spam transactions have had limited real impact on the issue of the recent bursty transaction pattern congesting the Klaytn network, the Klaytn Team has come to the conclusion that a gas price adjustment is the best effective countermeasure to tackle network congestion.

As a first step to understand how our communities view the potential gas price adjustment, the Klaytn Team asked the Governance Council’s opinions in a survey outlined as follows:


Survey Outline

Period

Jan 3 2022 — Jan 14 2022 (two weeks)

Questions


Results

Respondents

13 persons from 12 entities responded (one of the GC entities had two respondents, names listed without any specific order)

Hanwha Systems, FSN, Maekyung Media Group, cocone, The Korea Economic Daily, gumi Cryptos, AhnLab, EVERRICH, NEOPLY, Wemade Tree, GS Retail, Verichains Lab

Answers

Should the Klaytn Team be more engaged with the network congestion problem caused by bursty transactions mainly from arbitrage trading?

If the Klaytn Team were to take technical measures and increase the gas price, in which sequence should they be implemented?

Which approach should a possible gas price increase take?

How much should the gas price be increased?

Tell us your opinion about the gas price increase on the Klaytn mainnet. Any suggestions or comments are welcome.


In short, GC members expect Klaytn Team’s active engagement for both technical measures and gas price adjustment. In regards to the approach, a permanent adjustment initially up to the threshold level is preferred.

Being aware of the importance of this matter, the Klaytn Team will continue to stay in active communication with our communities before any decision is made.