Skip to content
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

Update gas-pricing.md #2165

Merged
merged 1 commit into from
May 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/src/learn/tokenomics/gas-pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A unique feature of Sui’s gas price mechanism is that users pay separate fees

$GasFees[\tau] \ \ = \ \ ComputationUnits[\tau] \ \times \ ComputationPrice[\tau] \ \ + \ \ StorageUnits[\tau] \ \times \ StoragePrice$

The gas functions $ComputationUnits[\tau]$ and $StorageUnits[\tau]$ measure the amount of computation and storage resources, respectively, required to process and store the data associated with t. The gas prices $ConsumptionPrice[\tau]$ and $StoragePrice$ translate the cost of computation and storage, respectively, into SUI units. The coupling between gas units and gas prices is useful since SUI’s market price will fluctuate over time depending on demand and supply fluctuations.
The gas functions $ComputationUnits[\tau]$ and $StorageUnits[\tau]$ measure the amount of computation and storage resources, respectively, required to process and store the data associated with $\tau$. The gas prices $ConsumptionPrice[\tau]$ and $StoragePrice$ translate the cost of computation and storage, respectively, into SUI units. The decoupling between gas units and gas prices is useful since SUI’s market price will fluctuate over time depending on demand and supply fluctuations.

## Computation gas prices

Expand All @@ -26,9 +26,9 @@ Sui’s gas price mechanism is intended to make the $ReferencePrice$ a credible
* _Tallying Rule_ - Throughout the epoch, validators obtain signals over the operations of other validators. Each validator uses these signals to build a (subjective) evaluation over the performance of every other validator. Specifically, each validator constructs a multiplier for the stake rewards of every other validator such that validators who behave well receive boosted rewards, and validators who do not receive reduced rewards. Good behavior is proxied by the share of transactions above a validator’s self-declared reservation price that the validator processed in a timely manner. The tallying rule’s goal is to create a community-enforced mechanism for encouraging validators to honor the quotes submitted during the gas survey.
* _Incentivized Stake Reward Distribution Rule_ - At the end of the epoch, the distribution of stake rewards across validators is adjusted using information from the gas price survey and tallying rule. Specifically, a global multiplier is built for every validator using the median value – weighted by stake – out of the set of individual multipliers constructed during the tallying rule. The incentivized stake reward distribution then sets the share of stake rewards distributed to each validator $v$ as:

$$ RewardShare(v) \ \ = \ \ Constant \ \times \ (\ 1 \ + \ GasSurveyBoost \) \ \times \ Multiplier(v) \ \times \ StakeShare(v) $$
$$ RewardShare(v) \ \ = \ \ Constant \ \times \ (1 \ + \ GasSurveyBoost) \ \times \ Multiplier(v) \ \times \ StakeShare(v) $$

The Constant term is used as a normalization such that the sum of RewardShare(v) across the validator set sums up to one. If the validator submitted a price quote under the reference gas price, then $GasSurveyBoost \ > \ 0$. If not, $GasSurveyBoost \ < \ 0$. The purpose of this booster is to encourage validators to submit low reservation prices during the gas price survey. Finally, $Multiplier(v)$ is the global multiplier built from the subjective evaluations in the tallying rule. Note that in a symmetric equilibrium where all validators submit the same quote to the gas price survey and where all validators behave well as measured by the tallying rule, then $ RewardShare(v) \ = \ StakeShare(v)$ and each validator receives stake rewards in proportion to their share of overall stake.
The $Constant$ term is used as a normalization such that the sum of $RewardShare(v)$ across the validator set sums up to one. If the validator submitted a price quote under the $ReferencePrice$, then $GasSurveyBoost \ > \ 0$. If not, $GasSurveyBoost \ < \ 0$. The purpose of this booster is to encourage validators to submit low reservation prices during the gas price survey. Finally, $Multiplier(v)$ is the global multiplier built from the subjective evaluations in the tallying rule. Note that in a symmetric equilibrium where all validators submit the same quote to the gas price survey and where all validators behave well as measured by the tallying rule, then $ RewardShare(v) \ = \ StakeShare(v)$ and each validator receives stake rewards in proportion to their share of overall stake.

In sum, the gas price mechanism has two main forces: the tallying rule incentivizes validators to honor the quotes submitted during the gas survey, while the distribution rule incentivizes validators to submit low reservations prices. The interaction of these two forces delivers a mechanism encouraging validators to set a low network-level reference gas price – but not too low since they face penalties if they cannot honor their quotes. In other words, the gas price mechanism encourages a healthy competition for fair prices.

Expand Down