The initial value for
desiredEGLat launch will equal the current gas limit at launch, e.g. 15M gas.
Each vote specifies the voter’s desired
gasTarget, as well as an
lockupDuration, and the weekly tally calculates the weighted average of all the votes’
gasTargetto determine the
The votes are weighted based on
eglAmount(the more EGLs you use, the stronger your vote) and
lockupDuration(1 to 8 weeks; the longer you lockup your EGLs, the stronger your vote). Specifically, weight =
lockupDuration, and the weighted average is calculated as
desiredEGLis calculated by storing and updating 2 variables:
- 1.sum of all voters’
- 2.sum of all voters’
tallyVotes()is called, the weighted average is calculated, and
desiredEGLis adjusted towards it, but by no more than 1M gas.
To avoid manipulation of the weighted average by using very high / low values for
gasTarget, the value of
gasTargetmust be close to the actual gas limit of the block in which the
revote()Tx is mined.
desiredEGLis within 10,000 of the
tallyVotesGasLimit,functionally the community is voting to keep the gas limit the same. For simplicity, the
desiredEGLwill be set to
Specifically, the delta between the two must be no greater than 4M gas. To protect honest users from having their Tx fail due to jitters in the gas limit, the UI provided at egl.vote allows a delta of up to 3M gas between
gasTargetand the current gas limit. Sophisticated users can of course bypass this limitation, and carry the risk of having their Tx fail.
If your vote for a given epoch was within 4M of the gas at the time of the vote, but you've locked in your vote for several weeks and now it is outside of the 4M range, it will still be included in the
desiredEGLcalculation. For example, if you voted for 7M gas when the current gas was 10M and now the current gas is 13M, your 7M vote will still be included as (7M * your multiplier) in the calculation. However, remember that the
desiredEGLcannot change by more than 1M each week.
desiredEGLis calculated when
tallyvotes()is called for the first time after the epoch has ended. Thus, someone needs to call
tallyvotes()after an epoch has ended to ensure