-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setting protocol controlled min gas price (#1326)
## Description Closes: #1214 This is a "v1" solution for requiring min-gas price. More flexible mechanism ([#1017](#1017)) we will develop for v4 (or v5). Notes: + added `fee-notes.md` files with stats for the fees. --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] added appropriate labels to the PR - [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist _All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items._ I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
- Loading branch information
1 parent
9675193
commit 49a5dbd
Showing
56 changed files
with
687 additions
and
388 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Notes about Gas prices and gas used | ||
|
||
NOTES: | ||
|
||
- the gas used depends on the current state of the chain | ||
- the gas records below are based on the empty state | ||
- user is charged the gas-limit, even if tx consumed less gas | ||
|
||
| operation | gas used | | ||
| :--------------------------------------------- | -------: | | ||
| x/bank send | 31'029 | | ||
| x/group create | 68'908 | | ||
| x/oracle MsgAggregateExchangeRateVote (3 curr) | 66'251 | | ||
| x/oracle MsgAggregateExchangeRateVote (6 curr) | 69'726 | | ||
| default gas limit | 200'000 | | ||
|
||
## Target price (in USD cent) for x/bank send | ||
|
||
| umee price (usd cent) | gas price in uumee | fee (usd cent) | | ||
| --------------------: | -----------------: | -------------: | | ||
| 2 | 0.2 | 0.0124 | | ||
| 2 | 0.1 | 0.0062 | | ||
| 2 | 0.02 | 0.00124 | | ||
| 5 | 0.2 | 0.031 | | ||
| 5 | 0.1 | 0.0155 | | ||
| 5 | 0.02 | 0.0031 | | ||
|
||
## Target price (in USD cent) for validator oracle txs (with 6 currencies) per day | ||
|
||
There are roughly 10tx / minute and 14400 per day. | ||
Validator has to do 2 tx (prevote and vote) every 5 blocks. | ||
Validator will need to do `5760 = 2*14400/5` tx. | ||
In table below we assume the same price scheme as above, but in the code most likely we will apply a fixed discount (eg 10x). | ||
|
||
The prices are indicative. For some transactions (especially oracle) fees can be disabled. | ||
See fee.go file for details. | ||
|
||
| umee price (usd cent) | gas price in uumee | fee (usd cent) | | ||
| --------------------: | -----------------: | -------------: | | ||
| 2 | 0.2 | 161.28 | | ||
| 2 | 0.1 | 80.64 | | ||
| 2 | 0.02 | 16.128 | | ||
| 5 | 0.2 | 403.2 | | ||
| 5 | 0.1 | 201.6 | | ||
| 5 | 0.02 | 40.32 | | ||
|
||
## Target price (in USD) for default gas limit | ||
|
||
| umee price (usd cent) | gas price in uumee | fee (usd cent) | | ||
| --------------------: | -----------------: | -------------: | | ||
| 2 | 0.2 | 0.08 | | ||
| 2 | 0.1 | 0.04 | | ||
| 2 | 0.02 | 0.008 | | ||
| 5 | 0.2 | 0.2 | | ||
| 5 | 0.1 | 0.1 | | ||
| 5 | 0.02 | 0.02 | |
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
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
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
Oops, something went wrong.