Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions pages/notices/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"pectra-fees": "Pectra user fees notice",
"superchain-withdrawal-pause-test": "Superchain withdrawal pause test",
"upgrade-15": "Upgrade 15: Isthmus Hard Fork",
"upgrade-14": "Upgrade 14: MT-Cannon and Isthmus L1 Contracts",
Expand Down
3 changes: 3 additions & 0 deletions pages/notices/pectra-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ The following sections are how chain operators can prepare the first part of the

* [`op-batcher/v1.11.5`](https://github.com/ethereum-optimism/optimism/releases/tag/op-batcher%2Fv1.11.5).
* [`op-proposer/v1.10.0`](https://github.com/ethereum-optimism/optimism/releases/tag/op-proposer%2Fv1.10.0).

### Double-check your fee scalars
See [this notice about modifying fee scalars after the Pectra upgrade on L1](/notices/pectra-fees).
</Steps>

## For fault proof enabled chains
Expand Down
48 changes: 48 additions & 0 deletions pages/notices/pectra-fees.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: L1 Pectra user fees and chain profitability
description: L1 Pectra affect on user fees and chain profitability analysis
lang: en-US
content_type: notice
topic: pectra-fees
personas:
- chain-operator
- node-operator
categories:
- security
- protocol
- infrastructure
- l1-contracts
is_imported_content: 'false'
---

# Pectra impact on user fees and chain profitability

The Ethereum L1 Pectra upgrade has introduced changes to calldata gas costs via [EIP-7623](https://eips.ethereum.org/EIPS/eip-7623) that may affect OP Stack chain profitability in specific configurations and market conditions. This notice outlines the potential impact on your chain and recommends specific actions.

[EIP-7623](https://eips.ethereum.org/EIPS/eip-7623) increases the amount of gas payable for calldata transactions. These include such transactions as those used by OPStack chains *before the [Ecotone upgrade](https://specs.optimism.io/protocol/ecotone/overview.html)* when blob data availability (blob DA) was introduced.

Blob DA has now been the default and recommended option for the OPStack for some time, so almost all chains make use of it. In order to continue to optimize for chains operating with blob DA, the Optimism protocol's current DA fee pricing formula has remained unchanged despite Pectra activating on Ethereum.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add something like
"This allowed us to leave the base fee scalar of modern fee configurations unchanged, because it accounts for only the fixed intrinsic gas cost of 21,000 of a blob transaction."


Chains configured for blob data availability remain entirely unaffected by the Pectra upgrade. However, chains configured for calldata (i.e. operating in a legacy DA mode) may experience a reduction in profitability. It possible for such chains to be making a loss on data availabilty costs under certain market conditions. Therefore all chains should check their fee scalar config.

## Actions required

Since the Ecotone upgrade, the Optimism protocol prices L2 transactions using a function that incorporates the L1 base fee as well as the L1 blob base fee. The other inputs are the so-called "Ecotone scalars": operator-controlled parameters stored in the SystemConfig contract which can be used to tune the chain's (approximate) target profit margin for DA.

Please review your [Ecotone scalar chain configuration](/operators/chain-operators/management/blobs). If your chain uses a zero blob base fee scalar, meaning it's configured to price for calldata only, you may need to update the base fee scalar and or the blob base fee scalar. Otherwise, no action is necessary.

If your batcher is configured to submit using calldata *only*, then you should:

* scale your base fee scalar by 10/4.

This will ensure that, since you are paying exclusively for calldata DA, you are charging users appropriately such that your target profit margin is the same as it was before Pectra.
Comment on lines +34 to +38
Copy link
Member

Choose a reason for hiding this comment

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

We should add, " under the assumption that you observed a perfectly realized profit margin before the Ethereum Pectra upgrade". And realistically, chains should just watch their actually achieved profit margin and adjust accordingly, which is something they need to do regularly anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we worked out a rejig of this section, ptal


If your batcher is configured to submit using blob DA, or configured to automatically choose the cheaper of the two DA modes, then you should adjust your Ecotone scalars for blob DA pricing (meaning a nonzero blob base fee scalar). You are referred back to [this guide](/operators/chain-operators/management/blobs). Doing so will ensure that you are charging accurately for using blob DA. Without such a change it is likely that you are overcharging users most of the time, and undercharging them in the rare occasions where blob DA is more expensive than calldata DA on Ethereum mainnet.
Copy link
Member

Choose a reason for hiding this comment

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

We should somehow highlight that this paragraph applies only to chains who use an outdated calldata base fee-only fee configuration.

Copy link
Member

Choose a reason for hiding this comment

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

And we should acknowledge that this is only possible if the SystemConfig has a version() of at least x.y.z (the Ecotone one), and that an upgrade to a newer SystemConfig is strongly recommended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added subsections here 4be4827 which hopefully helps.

Let's discuss the versioning thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussion with @sebastianst today: even very old SystemConfig implementations can actually support a blob DA config.

The instructions here https://docs.optimism.io/operators/chain-operators/management/blobs would not apply out of the box. But on a case-by-case basis it might be an interesting option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not worth getting into the weeds of this versioning subtlety here.


As ever, you may continue to tweak the Ecotone scalars as desired in order to adjust the profitability of your chain.

### Technical References

* [Optimism Protocol Specification - Ecotone L1 Cost Fee Changes](https://specs.optimism.io/protocol/exec-engine.html#ecotone-l1-cost-fee-changes-eip-4844-da)
* [Optimism Protocol Specification - Fjord Execution Engine Fees](https://specs.optimism.io/protocol/fjord/exec-engine.html#fees)
* [Implementation Source Code](https://github.com/ethereum-optimism/op-geth/blob/3d7afdc2701b74c5987e31521e2c336c4511afdf/core/types/rollup_cost.go#L527)
10 changes: 9 additions & 1 deletion pages/operators/chain-operators/management/blobs.mdx
Copy link
Member

Choose a reason for hiding this comment

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

I realize that his file needs an overhaul. By default, all examples should use blobs and a modern blob base fee-based config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed with @sebastianst: we think there are still edge cases (very quiet chains) which may want to configure for exclusively calldata.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This guide walks you through how to switch to using blobs for your chain after E
For example, if you wished to increase your margin on L1 data costs by \~10%, you would do:

```
newBaseFeeScalar= prevBaseFeeScalar * 1.1
newBaseFeeScalar = prevBaseFeeScalar * 1.1
newBlobBaseFeeScalar = prevBlobBaseFeeScalar * 1.1
```

Expand Down Expand Up @@ -121,6 +121,10 @@ blobs back to using calldata.
to get a better estimate for scalar values on your chain. The following
information is tuned to a network like OP Mainnet.

<Callout type="warning">
Since the Pectra upgrade on L1, chains which exclusively use calldata DA need to scale up their BaseFeeScalar by 16/10. See [this notice](/notices/pectra-fees).
</Callout>

Chains can update their fees to increase or decrease their margin. If using calldata, then `BaseFeeScalar` should be scaled to achieve the desired margin.
For example, to increase your L1 Fee margin by 10%:

Expand All @@ -145,6 +149,10 @@ blobs back to using calldata.
* Ensure your `OP_BATCHER_MAX_CHANNEL_DURATION` is properly set to maximize savings. **NOTE:** While setting a high value here will lower costs, it will be less meaningful than for low throughput chains using blobs. See [OP Batcher Max Channel Configuration](/operators/chain-operators/configuration/batcher#set-your--op_batcher_max_channel_duration) for more details.
</Steps>

## Use auto DA mode in your batcher
The batcher now supports automatically switching from blobs to calldata depending on which DA type is more affordable. This is an optimization which allows for a slightly better DA profit margin for your chain.
To enable this mode, set `OP_BATCHER_DATA_AVAILABILITY_TYPE=auto`.

## Other considerations

* For information on L1 Data Fee changes related to the Ecotone upgrade, visit the [Transaction Fees page](/stack/transactions/fees#ecotone).
Expand Down
6 changes: 2 additions & 4 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ authrpc
autorelay
Autorelay
autorelayer
availabilty
basefee
bcde
betanet
Expand Down Expand Up @@ -79,7 +80,6 @@ Comprensive
computependingblock
COMPUTEPENDINGBLOCK
confs
command
Consen
corsdomain
counterfactually
Expand All @@ -92,12 +92,10 @@ datacap
DATACAP
datadir
DATADIR
devdocs
devnet
Devnet
devnets
Devs
Devdocs
devdocs
Devnets
direnv
disabletxpoolgossip
Expand Down