# EIP1559

Ethereum historically priced transaction fees using a simple auction mechanism, where users send transactions with bids("gas prices") and miners choose transactions with the highest offers to generate the block.

Although this mechanism may work in some systems, such as Bitcoin or Ethereum, where limited resources are acquired only through auctions, this leads to several sources of inefficiency, such as a mismatch between the volatility of transaction fee levels and the social cost of transactions and needless delays for users.

EIP1559 is a dynamic transaction pricing mechanism applied in Ethereum London Hard-fork. This mechanism resolves network congestion algorithmically by burning a part of the block's transaction fee and adjusting the maximum gas usage of a block up and down by a 1/1024 scale.

WEMIX3.0 uses SPoA, a consensus algorithm capable of high-capacity, high-speed processing. It can support up to 3.5 times the block size of Ethereum(default block gas limit: 105,000,000) and 1/12 times the block generation time of Ethereum(default time: 1 second). In a way, unlike Ethereum, it may be a reasonable option for WEMIX3.0 to use a fixed gas price policy determined by the Governance.

However, fixing the gas price in the policy causes a problem. It may also affect the gas price for controlling DDoS attacks on the network according to the price volatility of the native coin WEMIX. Of course, it is possible to change the fixed gas price by on-chain Governance, but it cannot be dealt with promptly and involves the risk of impairing the safety of the network.

Therefore, in WEMIX3.0, we applied the EIP1559 protocol with the following conditions to protect the network from DDoS attacks and excessive transactions generated by the bots.

In WEMIX3.0, the `BaseFee` and the `CurrentGasTarget` are calculated per block by the following equations:

![BaseFee and CurrentGasTarget](https://lh5.googleusercontent.com/2tIDcFT4AOfJNjB4DSIcPw45iMQvs3wYLWBLOMH4syPyj2JJJrjEJOUaOKrdD3pFESa1gLmCbQLkYpQy2BwVk7JUZudjgYnJnQm2KH3eqb-6JuVSsknwLIJjJzO6AWBQaSSGk17lIRoGJyyLu1M)

The `baseFeeMaxChangeRate`(default: 55%) in the above formula is fixed but can be adjusted through the Governance.

Also, to prevent the `BaseFee` from becoming infinite and all WEMIX being used as transaction fees, the maximum value of BaseFee, `maxBaseFee`(default: 50,000Gwei), has been set. This value can also be adjusted through Governance.

![Range of BaseFee](https://lh6.googleusercontent.com/GWC0MxTHa6RhVFH_QlzcCVlLxagVsk_C-x3alDiWBdGDHy2KZCffgowZHsdBOju-Zoz2TN5ryTph9jLn0VGrjYA8dLuSpRrXs_unWuSTyHAJG-GUsbBLJJ2NRuyebBl6jRYKXXwK3eE5A8_G2uo)

In the formula below, `gasTargetPercentage`(default: 30%) and `PreviousGasLimit`(default: 105,000,000) are subject to change by governance voting but are always the same unless changed by Governance.

![GasTarget](https://lh3.googleusercontent.com/WWXd7x4zOq05_1Tmql9ChU-cLBNjBNJbJSf91B1wvQ6ar3Tye9cQfdh_nFGWTtw1UiP9yQcK5sQFgW52ovsxz2b7nsrlyxN3gDZwIBFthGdbAy_fL2R9ZSQBh0y_PFLWjILMRcymlEoJGM17YVQ)

WEMIX3.0 users can generate transactions using the fixed gas price `maxPriorityFeePerGas`(default: 100Gwei) value and the variable gas price `BaseFee`(default: 1Gwei) value recorded in the latest block. This algorithm is compatible with all wallets that support EIP1559.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wemix.com/en/design/eip1559.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
