Skip to content
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

Acp 176 config #1462

Draft
wants to merge 1 commit into
base: acp-176
Choose a base branch
from
Draft

Acp 176 config #1462

wants to merge 1 commit into from

Conversation

ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Mar 4, 2025

Why this should be merged

How this works

How this was tested

Need to be documented?

Need to update RELEASES.md?

@ceyonur ceyonur changed the base branch from master to acp-176 March 4, 2025 14:56

TimeToFillCapacity = 10 // in seconds
TargetToMax = 2 // multiplier to convert from target per second to max per second
TargetToPriceUpdateConversion = 87 // 87s ~= 60s * ln(2) which makes the price double at most every ~60 seconds
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder if the calculation here made by using TargetToMax if so we need to factor out 60s as a separate parameter.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know Stephen thought about it, but the more intuitive parameter is this ratio between K and T, that produces the 60s doubling time. Note that the comment is actually backwards (since that equation is clearly not true).

Copy link
Contributor

Choose a reason for hiding this comment

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

Relating to my comment above, this equation (as a function of this ratio and TargetToMax, would look like this:
DoublingTime = TargetToPriceUpdateConversion * ln(2) / (TargetToMax - 1)

TimeToFillCapacity = 10 // in seconds
TargetToMax = 2 // multiplier to convert from target per second to max per second
TargetToPriceUpdateConversion = 87 // 87s ~= 60s * ln(2) which makes the price double at most every ~60 seconds
MaxTargetChangeRate = 1024 // Controls the rate that the target can change per block.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is something we cannot parameterize because EVM also imposes the same limit.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is something we can parameterize

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


TimeToFillCapacity = 10 // in seconds
TargetToMax = 2 // multiplier to convert from target per second to max per second
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does 2 here control doubling the price? I.e does 3 here means triple it?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the ratio between R and T, in variables from the ACP. In other words, we add twice as much gas to the bucket as is our target. This also defines our "sustained maximum capacity", so that with sustained 2 * T sized blocks, we increase x by T * dt every block, so the fee will double every 60s. You can think of this as our excess gas over target. So I think that if you change this ratio to something else (say 3), then we get sustained higher excess (like 2 * T * dt), so then this change will actually half the time to double. However, It's important to note that this is because this the time for the fee to double is linear in this "sustained excess gas", not the "sustained gas".

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.

3 participants