-
Notifications
You must be signed in to change notification settings - Fork 96
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
feat(2.11): burn fees #232
Open
emidev98
wants to merge
3
commits into
release/v2.11
Choose a base branch
from
feat/v2.9/burn/fees
base: release/v2.11
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emidev98
requested review from
javiersuweijie,
tuky191 and
gregnuj
as code owners
December 14, 2023 15:04
emidev98
force-pushed
the
feat/v2.9/burn/fees
branch
from
December 15, 2023 17:10
85fe7dd
to
12cc695
Compare
emidev98
force-pushed
the
feat/v2.9/burn/fees
branch
from
December 15, 2023 17:20
12cc695
to
292c270
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/v2.10 #232 +/- ##
================================================
Coverage ? 70.57%
================================================
Files ? 46
Lines ? 2168
Branches ? 0
================================================
Hits ? 1530
Misses ? 463
Partials ? 175 |
…nto feat/v2.9/burn/fees
tuky191
approved these changes
Jan 10, 2024
gregnuj
approved these changes
Mar 22, 2024
This comment was marked as spam.
This comment was marked as spam.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request, introduce a new module named x/feeburn with very specific scope: the proportional amount of gas fees that are not used by the validator to comput the transaction will be burn. The module also has a parameter which defines if the burning mechanism is enabled or disabled.
In the x/feeburn post handler it will check if the module is enabled, if the transaction fees are defined, if there is a limit for the gas and will use the gas meter to calculate what is the proportional amount of tokens to be burned with the following formula:
The reasoning behind this implementation is that the user already paid for the full gas (gas_limit) but the validator didn't consumed all the gas to reach the limit, which makes it unfair to give the full amount of tokens to the validators.
At the same time will make it unfair to give the tokens back to the user because the user was already willing to spend that amount of tokens and by giving them back none will be responsible with the gas_limit, everyone will have the incentive to chose the maximum gas limit since the non-used gas-fee will be returned to them.