How should we pay gas for deposits? #32
Replies: 4 comments 5 replies
-
My current favorite proposal is sticking with (1), the status quoThe reason why I think we should just continue with the status quo is:
Until we have identified product reasons to change our gas payment mechanism (eg. user pain points) I'd suggest we stick with the status quo. |
Beta Was this translation helpful? Give feedback.
-
We've definitely seen people annoyed by the gas burn in various capacities, including the fact that it means L1 gasprice volatility impacts deposit gasprice volatility, even if the two aren't correlated. I think @K-Ho should really be the one here to weigh in, ideally after collecting interview data from integrators. One complexity that I can see in number 2 is that it means there can be "invalid transactions" in a deposit block now if they don't have enough funds. However, since it is a new TX type, that may fine, and we just say that the deposit TX is auto-reverted and returns |
Beta Was this translation helpful? Give feedback.
-
Three unrelated points:
|
Beta Was this translation helpful? Give feedback.
-
I think from an ENG perspective we may actually have more than two options. It seems like we really have a combo of possibilities in two dimensions: Where the ratelimit occurs:
How the ratelimit is paid:
We currently implement (1., 1.). I think any combo is possible to implement other than (1., 3.). |
Beta Was this translation helpful? Give feedback.
-
One of the decisions that we haven't come to a conclusion on (or really documented) is whether we change how we pay gas for deposits. These are the two design choices:
Option 1 [status quo]: Pay gas on L1
Currently we have a fixed amount of L1 gas which is burned in exchange for L2 gas. The value is set here. This approach works, but it is conceptually a bit wonky. It creates two gas markets for L2 gas - one gas market on L2 (normal EIP1559 for L2), and one gas market on L1 (using this fixed exchange rate). This means that theoretically if L2 gas becomes extremely expensive, it can be cheaper to execute L2 transactions using deposits than sending transactions directly on L2.
While it may feel a bit funky, it has the benefit of being relatively simple. Sometimes simplicity is worth optimizing for vs theoretical cleanness. Also, probably most compellingly is this is currently what we have implemented and we have a lot of other features that might be higher leverage to build.
Option 2: Pay gas on L2
Another proposal is break deposits into two types:
The process for depositing tokens other than ETH would be: 1) deposit ETH, and then 2) send a normal deposit transaction which uses the newly deposited ETH to pay the current BASE_FEE on L2.
The benefit of this approach is that it means that only ETH is subject to special gas rules, and all other transactions to pay the BASE_FEE and contribute to congestion on L2 (which makes sense conceptually). Of course the downside is implementation complexity which may or may not be justified based on user needs. It also could be the case that this approach introduces more room for manipulation by the sequencer! This is because the sequencer can manipulate the BASE_FEE and use that to intentionally invalidate specific deposits.
Call to action
Process note: the way we handle deposits (and all other spec related decisions) should be product driven. That means that to come to a conclusion here we need to ensure pain points & user stories for each approach are throughly explored.
Beta Was this translation helpful? Give feedback.
All reactions