-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add L1 & L2 Farm Proxies #1
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: oldchili <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more comment.
However, feel free to delay handling until we finalize the architecture (like if we want to send the 2nd xchain message or not).
contract Estimate is Script { | ||
using stdJson for string; | ||
|
||
uint256 constant MAX_L1_BASE_FEE_ESTIMATE = 1 gwei; // worst-case estimate for l1BaseFeeEstimate (representing the blob base fee) returned from https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/node-interface/NodeInterface.sol#L95 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any reference for the 1 gwei max value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's just a rough worst-case estimate, which is very conservative. I was looking at the blob fee chart on https://ultrasound.money/#blobs and it seemed that the fee would very rarely spike beyond 1 gwei in the last few months.
A more formal method could be to use the baseFeePerBlobGas
returned from the eth_feeHistory
rpc command and calculate e.g. the 99th percentile for that value. Maybe this could be done in another script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I don't understand how it works.
Do we know the meaning of l1BaseFeeEstimate
? I thought it was the regular l1 base fee and not related to blobs.
But then you say MAX_L1_BASE_FEE_ESTIMATE
if related to blobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally l1BaseFeeEstimate
was an estimate of the L1 base fee but then after they started using blobs it became an estimate of the blob fee. They didn't update their doc, changed their interfaces or renamed any variable, so it's indeed a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so how did you figure that out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some Arbitrum discord messages were alluding to it, like this one
and then if you check the actual values returned for l1BaseFeeEstimate
, you'll see you consistently get values lower than 1 gwei.
Though there is still a difference between the l1BaseFeeEstimate
value and baseFeePerBlobGas
so not sure if Arbitrum adds some buffer on top of baseFeePerBlobGas
. Probably something to check with them.
Fix excess fee collection logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to send o audit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
telome seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Co-authored-by: telome <>
* Update deps * Update arb bridge --------- Co-authored-by: telome <>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.