optimistic-specs icon indicating copy to clipboard operation
optimistic-specs copied to clipboard

Milestone epic: Deposit fees 💸

Open protolambda opened this issue 3 years ago • 7 comments

Adds the Deposit Fee design currently being discussed in Discussion 112, and issue 78.

The deposit-rollup milestone (v0.1.0) does not charge for deposits or price L2 gas consumption at all: update this with deposit fees.

  • [ ] Spec deposit fees
  • Update deposit contract:
    • [ ] to lock/release deposit funds
    • [ ] to update EIP-1559-like fee var
  • [ ] Update core/types.DepositTx in reference-optimistic-geth
  • [ ] Update input-derivation in ref impl to parse new deposit receipts into new deposit tx types

Bonus, after the deposit type is well specified and tested: create an EIP for it, see https://github.com/ethereum-optimism/optimistic-specs/issues/75

protolambda avatar Jan 26 '22 16:01 protolambda

Could we rename this from "deposit rollup with deposit fees" to simply "deposit fees". AFAICT, there is nothing about this that can't also apply to the sequencer rollup.

maurelian avatar Jan 31 '22 16:01 maurelian

Question: Can you shed some details on this (issue 78): "Despite L1's high gas price, it is possible to submit a small deposit that will cause a massive amount of L2 gas to be consumed" Thank you!!

Graciouseats avatar Feb 03 '22 14:02 Graciouseats

@Graciouseats sure, you can imagine a cross chain transaction with a very high gasLimit, with zero data which calls to this contract:

contract Dos {
  fallback() {
    uint i;
	while(gasleft() > 500) { i++ }
  }
}

maurelian avatar Feb 03 '22 17:02 maurelian

Thanks! Code is not my specialty :} But it seems simple. So what would prevent someone from doing this easily?

Graciouseats avatar Feb 03 '22 18:02 Graciouseats

@Graciouseats We just have to charge the users for gas somehow. The issue you're highlighting was uncovered when we considered not charging for gas at all in deposits (to make them as cheap as possible).

norswap avatar Feb 04 '22 00:02 norswap

I see. Thank you for strengthening my understanding, and for providing some history.

Graciouseats avatar Feb 04 '22 01:02 Graciouseats

@Graciouseats you can find much more context here if you're more of a prose kind of person.

Let's not clutter up this thread more, but we'd be happy to answer further questions in a new discussion, or our discord. :)

maurelian avatar Feb 04 '22 16:02 maurelian