|
| 1 | +--- |
| 2 | +title: Set the Minimum Base Fee |
| 3 | +description: Learn how to set a minimum base fee on your OP-Stack Chain |
| 4 | +--- |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +| Parameter | Type | Default | Recommended | Max Allowed for Standard Chains | Units | |
| 9 | +| ---------- | ---- | -------- | ------------ | ------------ | ------ | |
| 10 | +| <code>minBaseFee</code> | Number | 0 (disabled) | 100,000 | 10,000,000,000 | wei | |
| 11 | + |
| 12 | +The <strong>Minimum Base Fee</strong> (`minBaseFee`) configuration was introduced in the <strong>Jovian</strong> hardfork. |
| 13 | +This feature allows chain operators to specify a minimum L2 base fee to which can help avoid excessively long priority fee auctions that can occur when the base fee falls too low. |
| 14 | + |
| 15 | +When [batcher-sequencer throttling is active](https://docs.optimism.io/chain-operators/guides/configuration/batcher#batcher-sequencer-throttling) for long enough and the minBaseFee isn't enabled (or is zero), the base fee can drop all the way down to 1 wei. It can take a long time to recover back to a stable base fee. |
| 16 | + |
| 17 | + |
| 18 | +The steps below explain how to update the `minBaseFee` parameter on-chain using the <code>SystemConfig</code> contract. |
| 19 | + |
| 20 | +<Warning> |
| 21 | + Setting the `minBaseFee` too high may make transactions harder to include for users. |
| 22 | +</Warning> |
| 23 | + |
| 24 | + |
| 25 | +## How to Update the Minimum Base Fee |
| 26 | + |
| 27 | +<Steps> |
| 28 | + <Step title="Find your SystemConfig contract address"> |
| 29 | + The [SystemConfig](https://specs.optimism.io/protocol/system-config.html) contract stores configurable protocol parameters such as gas limits and fee settings. |
| 30 | + You can find its proxy address in the [state.json generated by op-deployer](https://docs.optimism.io/chain-operators/tutorials/create-l2-rollup/op-deployer-setup#deploy-l1-contracts). |
| 31 | + </Step> |
| 32 | + |
| 33 | + <Step title="Call the setMinimumBaseFee() method"> |
| 34 | + <Info> |
| 35 | + Note that the owner of the `SystemConfig` contract is the [System Config Owner address](https://docs.optimism.io/chain-operators/reference/privileged-roles#system-config-owner), so this transaction must be sent from that address. |
| 36 | + </Info> |
| 37 | + To update the minimum base fee, call the following method on the `SystemConfig` contract: |
| 38 | + |
| 39 | + `setMinBaseFee(uint64 minBaseFee) external onlyOwner;` |
| 40 | + |
| 41 | + Example (using [cast](https://getfoundry.sh/cast/reference/cast/)): |
| 42 | + |
| 43 | + ``` |
| 44 | + cast send <SYSTEM_CONFIG_PROXY_ADDRESS> "setMinBaseFee(uint64)" 100000 |
| 45 | + ``` |
| 46 | + </Step> |
| 47 | + |
| 48 | + <Step title="Verify the new value"> |
| 49 | + After the transaction confirms, verify the current value by calling the following getter method on the `SystemConfig` contract: |
| 50 | + |
| 51 | + `function minBaseFee() external view returns (uint64);` |
| 52 | + |
| 53 | + Example (using [cast](https://getfoundry.sh/cast/reference/cast/)): |
| 54 | + |
| 55 | + ``` |
| 56 | + cast call <SYSTEM_CONFIG_PROXY_ADDRESS> "minBaseFee()" |
| 57 | + ``` |
| 58 | + </Step> |
| 59 | +</Steps> |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## References |
| 64 | + |
| 65 | +* [Minimum Base Fee Configuration Spec](https://specs.optimism.io/protocol/jovian/system-config.html#minimum-base-fee-configuration) |
| 66 | +* [Jovian Upgrade Spec](https://specs.optimism.io/protocol/jovian/overview.html) |
| 67 | +* [SystemConfig Contract Spec](https://specs.optimism.io/protocol/system-config.html) |
| 68 | +* [Design Doc](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/minimum-base-fee.md) |
| 69 | + |
| 70 | + |
0 commit comments