Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Deposit Fee design #112

Jan 4, 2022 · 11 comments · 31 replies
Discussion options

You must be logged in to vote

Adding more color:

Deposit Contract

Implements EIP4396 basefee calculations in solidity.

Storage

  • prev_deposit_timestamp:
    • value will update for every non-empty deposit block
    • used like self.parent(self.parent(block)).timestamp for L1 EIP
  • base_fee_per_guaranteed_gas
    • used like self.parent(block).base_fee_per_gas in L1 EIP
    • units of ETH/wei
    • is what's currently being charged for deposits
  • guaranteed_gas_allotted_in_block:
    • tracks guaranteed gas given out so far in the block
    • used like self.parent(block).gas_used in L1 EIP

Ideally, these values could be compressed into one slot.

Interface/functionality

  • deposit(guaranteedGasLimit, target, data) payable: charges guaranteedGasLimit * base_f…

Replies: 11 comments 31 replies

Comment options

You must be logged in to vote
7 replies
@ben-chain
Comment options

@ben-chain
Comment options

@norswap
Comment options

@norswap
Comment options

@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

Comment options

You must be logged in to vote
5 replies
@ben-chain
Comment options

@ben-chain
Comment options

@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

@norswap
Comment options

@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

Comment options

You must be logged in to vote
2 replies
@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

Comment options

You must be logged in to vote
1 reply
@ben-chain
Comment options

Comment options

You must be logged in to vote
4 replies
@ben-chain
Comment options

@norswap
Comment options

@ben-chain
Comment options

@norswap
Comment options

Comment options

You must be logged in to vote
2 replies
@norswap
Comment options

@maurelian
Comment options

maurelian Jan 7, 2022
Maintainer Author

Comment options

You must be logged in to vote
1 reply
@maurelian
Comment options

maurelian Jan 16, 2022
Maintainer Author

Comment options

You must be logged in to vote
6 replies
@norswap
Comment options

@ben-chain
Comment options

@norswap
Comment options

@ben-chain
Comment options

@norswap
Comment options

Comment options

You must be logged in to vote
1 reply
@maurelian
Comment options

maurelian Jan 25, 2022
Maintainer Author

Answer selected by maurelian
Comment options

You must be logged in to vote
2 replies
@maurelian
Comment options

maurelian Jan 17, 2022
Maintainer Author

@maurelian
Comment options

maurelian Jan 25, 2022
Maintainer Author

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants