Skip to content

[MAINNET] Reduces EIP-1559 denominator 250 -> 50 #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mainnet/2025-05-15-eip1559-denominator-reduction/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OP_COMMIT=ef7a933ca7f3d27ac40406f87fea25e0c3ba2016
BASE_CONTRACTS_COMMIT=cab46f4c34f11e22640ec3073aa6f0b46cdaa1b7

OWNER_SAFE=0x14536667Cd30e52C0b458BaACcB9faDA7046E056
SYSTEM_CONFIG=0x73a79Fab69143498Ed3712e519A88a918e1f4072
18 changes: 18 additions & 0 deletions mainnet/2025-05-15-eip1559-denominator-reduction/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include ../../Makefile
include ../.env
include .env

ifndef LEDGER_ACCOUNT
override LEDGER_ACCOUNT = 0
endif

.PHONY: sign
sign:
$(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L1_RPC_URL) ReduceEip1559DenominatorScript \
--sig "sign(address[])" "[]"

.PHONY: execute
execute:
forge script --rpc-url $(L1_RPC_URL) ReduceEip1559DenominatorScript \
--sig "run(bytes)" $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv
146 changes: 146 additions & 0 deletions mainnet/2025-05-15-eip1559-denominator-reduction/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Funding

Status: READY TO SIGN

## Description

This task contains a single script that reduces the EIP-1559 denominator from 250 to 50.

## Procedure

### 1. Update repo:

```bash
cd contract-deployments
git pull
cd mainnet/2025-05-15-reduce-eip1559-denominators
make deps
```

### 2. Setup Ledger

Your Ledger needs to be connected and unlocked. The Ethereum
application needs to be opened on Ledger with the message "Application
is ready".

### 3. Simulate, Validate, and Sign

#### 3.1. Simulate and validate the transaction

Make sure your ledger is still unlocked and run the following command:

```bash
make sign
```

For each run, you will see a "Simulation link" from the output.

Paste this URL in your browser. A prompt may ask you to choose a
project, any project will do. You can create one if necessary.

Click "Simulate Transaction".

We will be performing 3 validations and extract the domain hash and
message hash to approve on your Ledger:

1. Validate integrity of the simulation.
2. Validate correctness of the state diff.
3. Validate and extract domain hash and message hash to approve.

##### 3.1.1. Validate integrity of the simulation.

Make sure you are on the "Overview" tab of the tenderly simulation, to
validate integrity of the simulation, we need to check the following:

1. "Network": Check the network is `Mainnet`.
2. "Timestamp": Check the simulation is performed on a block with a
recent timestamp (i.e. close to when you run the script).

##### 3.1.2. Validate correctness of the state diff.

Now click on the "State" tab, and refer to the [validations instructions](./VALIDATION.md) for the transaction you are signing. Once complete return to this document to complete the signing.

### 4. Extract the domain hash and the message hash to approve.

Now that we have verified the transaction performs the right
operation, we need to extract the domain hash and the message hash to
approve.

Go back to the "Overview" tab, and find the
`GnosisSafe.checkSignatures` call. This call's `data` parameter
contains both the domain hash and the message hash that will show up
in your Ledger.

It will be a concatenation of `0x1901`, the domain hash, and the
message hash: `0x1901[domain hash][message hash]`.

Note down this value. You will need to compare it with the ones
displayed on the Ledger screen at signing.

Once the validations are done, it's time to actually sign the
transaction.

> [!WARNING]
> This is the most security critical part of the playbook: make sure the
> domain hash and message hash in the following three places match:
>
> 1. On your Ledger screen.
> 2. In the terminal output.
> 3. In the Tenderly simulation. You should use the same Tenderly
> simulation as the one you used to verify the state diffs, instead
> of opening the new one printed in the console.
>

After verification, sign the transaction. You will see the `Data`,
`Signer` and `Signature` printed in the console. Format should be
something like this:

```shell
Data: <DATA>
Signer: <ADDRESS>
Signature: <SIGNATURE>
```

Double check the signer address is the right one.

#### 4.1. Send the output to Facilitator(s)

Nothing has occurred onchain - these are offchain signatures which
will be collected by Facilitators for execution. Execution can occur
by anyone once a threshold of signatures are collected, so a
Facilitator will do the final execution for convenience.

Share the `Data`, `Signer` and `Signature` with the Facilitator, and
congrats, you are done!

### [For Facilitator ONLY] How to execute

#### Execute the transaction

1. Collect outputs from all participating signers.
1. Concatenate all signatures and export it as the `SIGNATURES`
environment variable, i.e. `export
SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`.
1. Run the `make execute` command as described below to execute the transaction.

For example, if the quorum is 2 and you get the following outputs:

```shell
Data: 0xDEADBEEF
Signer: 0xC0FFEE01
Signature: AAAA
```

```shell
Data: 0xDEADBEEF
Signer: 0xC0FFEE02
Signature: BBBB
```

Then you should run:

Coinbase facilitator:

```bash
SIGNATURES=AAAABBBB make execute
```
70 changes: 70 additions & 0 deletions mainnet/2025-05-15-eip1559-denominator-reduction/VALIDATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Validation for Coinbase Signers

This document can be used to validate the inputs and result of the execution of the EIP-1559 denominator reduction script which you are signing.

> [!NOTE]
>
> This document provides names for each contract address to add clarity to what you are seeing. These names will not be visible in the Tenderly UI. All that matters is that addresses and storage slot hex values match exactly what is presented in this document.

The steps are:

1. [Validate the Domain and Message Hashes](#expected-domain-and-message-hashes)
2. [Verifying the state changes](#state-changes)

## Expected Domain and Message Hashes

First, we need to validate the domain and message hashes. These values should match both the values on your ledger and the values printed to the terminal when you run the task.

> [!CAUTION]
>
> Before signing, ensure the below hashes match what is on your ledger.
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>
>
> ### Incident Safe - Mainnet: `0x14536667Cd30e52C0b458BaACcB9faDA7046E056`
>

> - Domain Hash: `0xf3474c66ee08325b410c3f442c878d01ec97dd55a415a307e9d7d2ea24336289`
> - Message Hash: `0xec8524022c8c43daf2a8ec1ed0990e9f9870f2b420278190ac079782c7bd3241`

# State Validations

For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract:

- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur.
- All key values match the semantic meaning provided, which can be validated using the terminal commands provided.

## State Overrides

### Incident Multisig - Mainnet (`0x14536667Cd30e52C0b458BaACcB9faDA7046E056`)

- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004` <br/>
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001` <br/>
**Meaning**: Override the threshold to 1 so the transaction simulation can occur.

- **Key**: `0xb2e9994c6b31ed56228de129778956be15269b0c7c0536d91dd4772660ea897a` <br/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key here will change as it corresponds to the slot associated with your signer address.

**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001` <br/>
**Meaning**: Simulates an approval from msg.sender in order for the task simulation to succeed.

## Task State Changes

### Incident Multisig - Mainnet (`0x14536667Cd30e52C0b458BaACcB9faDA7046E056`)

0. **Key**: `0x0000000000000000000000000000000000000000000000000000000000000005` <br/>
**Before**: `0x000000000000000000000000000000000000000000000000000000000000003e` <br/>
**After**: `0x000000000000000000000000000000000000000000000000000000000000003f` <br/>
**Value Type**: uint256 <br/>
**Decoded Old Value**: `62` <br/>
**Decoded New Value**: `63` <br/>
**Meaning**: Increments the nonce <br/>

### SystemConfig - Mainnet (`0x73a79Fab69143498Ed3712e519A88a918e1f4072`)

1. **Key**: `0x000000000000000000000000000000000000000000000000000000000000006a` <br/>
**Before**: `0x00000000000000000000000000000000000000000000000000000002000000fa` <br/>
**After**: `0x0000000000000000000000000000000000000000000000000000000200000032` <br/>
**Value Type**: (uint32,uint32,uint32,uint32) <br/>
**Decoded Old Value**: operatorFeeConstant: `0`, operatorFeeScalar: `0`, eip1559Elasticity: `2`, eip1559Denominator: `250` <br/>
**Decoded New Value**: operatorFeeConstant: `0`, operatorFeeScalar: `0`, eip1559Elasticity: `2`, eip1559Denominator: `50` <br/>
**Meaning**: Sets the eip1559Denominator to 50 <br/>

### Sender - Mainnet

- Nonce increment for the sender of the simulated transaction.

You can now navigate back to the [README](../README.md#4-extract-the-domain-hash-and-the-message-hash-to-approve) to continue the signing process.
20 changes: 20 additions & 0 deletions mainnet/2025-05-15-eip1559-denominator-reduction/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[profile.default]
src = 'src'
out = 'out'
libs = ['lib']
broadcast = 'records'
fs_permissions = [{ access = "read-write", path = "./" }]
optimizer = true
optimizer_runs = 999999
solc_version = "0.8.15"
via-ir = false
remappings = [
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
'@rari-capital/solmate/=lib/solmate/',
'@base-contracts/=lib/base-contracts',
'solady/=lib/solady/src/',
]

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

import {Vm} from "forge-std/Vm.sol";
import {Simulation} from "@base-contracts/script/universal/Simulation.sol";
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";

import {MultisigScript} from "@base-contracts/script/universal/MultisigScript.sol";

interface ISystemConfig {
function eip1559Elasticity() external view returns (uint32);
function eip1559Denominator() external view returns (uint32);
function setEIP1559Params(uint32 _denominator, uint32 _elasticity) external;
}

contract ReduceEip1559DenominatorScript is MultisigScript {
address internal immutable OWNER_SAFE;
address internal immutable SYSTEM_CONFIG;

uint32 internal constant DENOMINATOR = 250;
uint32 internal constant ELASTICITY = 2;
uint32 internal constant NEW_DENOMINATOR = 50;

constructor() {
OWNER_SAFE = vm.envAddress("OWNER_SAFE");
SYSTEM_CONFIG = vm.envAddress("SYSTEM_CONFIG");
}

function setUp() external view {
vm.assertEq(ISystemConfig(SYSTEM_CONFIG).eip1559Denominator(), DENOMINATOR, "Denominator mismatch");
vm.assertEq(ISystemConfig(SYSTEM_CONFIG).eip1559Elasticity(), ELASTICITY, "Elasticity mismatch");
}

function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override {
vm.assertEq(ISystemConfig(SYSTEM_CONFIG).eip1559Denominator(), NEW_DENOMINATOR, "Denominator mismatch");
vm.assertEq(ISystemConfig(SYSTEM_CONFIG).eip1559Elasticity(), ELASTICITY, "Elasticity mismatch");
}

function _buildCalls() internal view override returns (IMulticall3.Call3Value[] memory) {
IMulticall3.Call3Value[] memory calls = new IMulticall3.Call3Value[](1);

calls[0] = IMulticall3.Call3Value({
target: SYSTEM_CONFIG,
allowFailure: false,
callData: abi.encodeCall(ISystemConfig.setEIP1559Params, (NEW_DENOMINATOR, ELASTICITY)),
value: 0
});

return calls;
}

function _ownerSafe() internal view override returns (address) {
return OWNER_SAFE;
}
}