You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/user-fees.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The aim with this document is to describe the Effective Gas Price (EGP), a mecha
5
5
6
6
Let's make a quick recollection of the basic fee schema used in Ethereum.
7
7
8
-
Firstly, gas is a unit that accounts for resources used when processing a transaction. At the time of sending a transaction, the user can decide two parameters; $\texttt{gasLimit}$ and $\texttt{gasPrice}$:
8
+
Firstly, gas is a unit that accounts for resources used when processing a transaction. At the time of sending a transaction, the user can decide on two parameters; $\texttt{gasLimit}$ and $\texttt{gasPrice}$:
9
9
10
10
- $\texttt{gasLimit}$ is the maximum amount of gas units that a user is willing to buy in order to complete a transaction.
11
11
@@ -860,9 +860,9 @@ Let’s examine the above figure in more detail.
860
860
861
861
Henceforth, the Executor executes the transaction using $\texttt{EEGP}$, obtaining $\texttt{GasUsedNew}$, which the sequencer utilizes to compute a new effective gas price, referred to as $\texttt{NEGP}$.
862
862
863
-
4. We have to paths:
863
+
4. We have two paths:
864
864
865
-
- If the percentage deviation between $\texttt{EEGP}$ and $\texttt{NEGP}$ is higher than a fixed deviation parameter $\texttt{FinalDeviationPct}$, which is $10$ in the actual configuration, that is
865
+
- If the percentage deviation between $\texttt{EEGP}$ and $\texttt{NEGP}$ is higher than a fixed deviation parameter $\texttt{FinalDeviationParameter}$, which is $10$ in the actual configuration, that is
there is a big difference between executions and we may better adjust gas price due to potential (and quite big) losses to the network or the user.
883
+
there is a big difference between executions and we may want to adjust gas price due to potential losses to the network or the user.
884
884
885
885
5. In the latter case, two options arise:
886
886
887
-
- If the gas price signed is less or equal than the accurate effective gas price computed with the correct state root
887
+
- If the gas price signed is less than or equal to the accurately computed effective gas price, with the correct state root, and
888
888
889
889
$$
890
890
\texttt{SignedGasPrice} \leq \texttt{NEGP}
891
891
$$
892
892
893
-
the network suffers again a risk of loss.
893
+
the network runs the risk of incurring a loss.
894
894
895
-
Henceforth, the user is charged the full $\texttt{SignedGasPrice}$, so the Executor will execute the transaction using it, concluding the sequencing process.
895
+
Hence the user is charged the full $\texttt{SignedGasPrice}$, and the executor therefore executes the transaction using the $\texttt{SignedGasPrice}$. And the sequencing process is concluded.
896
896
897
-
- Otherwise, if $\texttt{SignedGasPrice} > \texttt{NEGP}$, then it means we have margin to adjust the gas price that is charged to the user.
897
+
- Otherwise, if $\texttt{SignedGasPrice} > \texttt{NEGP}$, then there's sufficient margin to adjust the gas price and thus charge the user less than their $\texttt{SignedGasPrice}$.
898
898
899
899
However, in order to save executions, we end the adjustment process in this iteration, so that we conclude the flow using a trick explained in the next point.
900
900
@@ -911,7 +911,7 @@ Let’s examine the above figure in more detail.
911
911
912
912
This precaution is employed to mitigate potential vulnerabilities in deployed Smart Contracts, that arise from creating a specific condition based on the gas price, for example, to manipulate execution costs.
913
913
914
-
- If the transaction does not make use of the gasprice-related opcodes, the Executor executes the transaction with the more adjusted gas price up to this point which is $\texttt{NEGP}$ and end up the sequencing process.
914
+
- If the transaction does not make use of the gas-price-related opcodes, the executor executes the transaction with the more adjusted gas price, which is $\texttt{NEGP}$, and ends the sequencing process.
0 commit comments