Skip to content

Update 03-calculate-aep-fees.mdx #2257

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Update 03-calculate-aep-fees.mdx #2257

wants to merge 14 commits into from

Conversation

gmehta2
Copy link
Contributor

@gmehta2 gmehta2 commented Apr 24, 2025

Copy link

vercel bot commented Apr 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arbitrum-docs ✅ Ready (Inspect) Visit Preview May 7, 2025 2:38pm

Copy link
Contributor

@TucksonDev TucksonDev left a comment

Choose a reason for hiding this comment

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

Thanks @gmehta2 !
I've requested some more clarifications in some of the points 🙏

If AEP fees are paid in ETH:

AEP_FEES = [
(L2BaseFee * Daily_price_L2_gas_token_to_ETH) +
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still a bit concerned about using "daily price" here. The price of an asset can vary a lot within a given day. I'd say we should either modify the language to not use "daily price" and/or include an explanation on how this price is expected to be obtained.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, working with David to define this

] * 0.1

Apechain Example:
L2BaseFee + L2SurplusFee: Summed from feeCollection traces excluding transfers to the system address (denominated in the Orbit’s gas token, example $APE).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think "system address" it's not mentioned anywhere else in the docs. Should we add an explanation to what that is? (also, I'm not sure what it is referring to)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, will find out here

Copy link
Contributor Author

@gmehta2 gmehta2 left a comment

Choose a reason for hiding this comment

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

updated with feedback

  1. remove l1base fee everywhere
  2. defined some terms further

Copy link
Contributor

@TucksonDev TucksonDev left a comment

Choose a reason for hiding this comment

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

Flagging some formatting errors. Also, there are 2 pending comments here:

  1. About the "daily price" (here)
  2. Mention to a "system address" (here)

@@ -14,14 +14,48 @@ Before we define “Protocol Net Revenue”, let's explain how fees work in a st

### Sequencing revenue

In a vanilla Orbit chain (a chain without customizations, transaction ordering policies, or other add-ons), users and dApps will pay a single gas fee to submit their transactions. Under the hood, however, a user’s fee is allocated across four components used by the network in different ways. These four fee components are split as follows:
In a vanilla Orbit chain (a chain without customizations, transaction ordering policies, or other add-ons), users and dApps will pay a single gas fee to submit their transactions. Under the hood, however, a user’s fee is allocated across three components used by the network in different ways. These three fee components are split as follows:
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
In a vanilla Orbit chain (a chain without customizations, transaction ordering policies, or other add-ons), users and dApps will pay a single gas fee to submit their transactions. Under the hood, however, a user’s fee is allocated across three components used by the network in different ways. These three fee components are split as follows:
In a vanilla Orbit chain (a chain without customizations, transaction ordering policies, or other add-ons), users and dApps will pay a single gas fee to submit their transactions. Under the hood, however, a user’s fee is allocated across four components used by the network in different ways. These three four components are split as follows:

We describe here how the fee collecting system works outside the context of AEP fees. So it makes sense to mention the 4 fee components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think we can change back to 3 if we remove the l1basefee


- `l2BaseFee`: fees paid to execute a transaction on the Orbit chain.
- `l2SurplusFee`: surplus fees are charged in addition to the base fee when an Orbit chain is congested.
- `l1BaseFee`: fees paid to cover the cost of an Orbit chain posting its settlement transaction to the parent chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

If we mention the 4 components above (based on my previous comment), we should keep this one there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Harry mentioned to delete this everywhere because it nets to 0 @hkalodner

- `l1SurplusFee`: an additional surplus fee that can be configured to award extra fees to the batch poster.

Based on the above, we interpret that an Orbit chain’s revenue sources include all fee components: `l2BaseFee`, `l2SurplusFee`, `l1BaseFee`, and `l1SurplusFee`. However, one of these fee components is also a cost, `l1BaseFee`, as it is used to pay for parent chain settlement.
Based on the above, we interpret that an Orbit chain’s revenue sources include all fee components: `l2BaseFee`, `l2SurplusFee`, and `l1SurplusFee`.
Copy link
Contributor

Choose a reason for hiding this comment

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

And here we start describing the context of "revenue", so it makes sense to pivot to these 3. This bit is correct.

Comment on lines 29 to 37
AEP*FEES = [
(L2BaseFee * Daily*price_L2_gas_token_to_ETH) +
(L2SurplusFee * Daily_price_L2_gas_token_to_ETH) +
(L1SurplusFee \* Daily_price_L1_gas_token_to_ETH)

- (
(AssertionCosts _ Daily_price_L1_gas_token_to_ETH)
)
] _ 0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use codeblocks for these

If AEP fees are paid in `ETH`:

AEP*FEES = [
(L2BaseFee * Daily*price_L2_gas_token_to_ETH) +
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
(L2BaseFee * Daily*price_L2_gas_token_to_ETH) +
(L2BaseFee * Daily_price_L2_gas_token_to_ETH) +

AEP_FEES = [
(L2BaseFee) +
(L2SurplusFee) +
(L1SurplusFee \* Daily_price_L1_to_L2_gas)
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
(L1SurplusFee \* Daily_price_L1_to_L2_gas)
(L1SurplusFee * Daily_price_L1_to_L2_gas)

(L1SurplusFee \* Daily_price_L1_to_L2_gas)

- (
(AssertionCosts _ Daily_price_L1_to_L2_gas)
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
(AssertionCosts _ Daily_price_L1_to_L2_gas)
(AssertionCosts * Daily_price_L1_to_L2_gas)

- (
(AssertionCosts _ Daily_price_L1_gas_token_to_ETH)
)
] _ 0.1
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
] _ 0.1
] * 0.1

- (
(AssertionCosts _ Daily_price_L1_to_L2_gas)
)
] _ 0.1
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
] _ 0.1
] * 0.1


Assertion costs: Pulled from the `RollupProxy` via `nodeCreated` events and other validator-related transactions (also in `ETH`).

To simplify this for developers and avoid discrepancies between chain operators and RaaS providers, we recommend using prebuilt SQL queries from Allium to extract each of these values consistently.
Copy link
Contributor

Choose a reason for hiding this comment

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

This text should be updated with the method we recommend for the accounting. If we want to change to the "fee splitter method", we should remove the mentions to using queries for Allium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants