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

[Proposal] Increase min gas price #92

Closed
ilblackdragon opened this issue Jul 14, 2020 · 10 comments
Closed

[Proposal] Increase min gas price #92

ilblackdragon opened this issue Jul 14, 2020 · 10 comments

Comments

@ilblackdragon
Copy link
Member

Currently:

  • Transaction fees: 5N for 1M basic function call transactions (~4 Tg) => which mean full block of 1000Tg will be 0.00125N
  • Storage fees: 1N for 10kb => average contracts 300kb that requires 30N

The suggestion to:

  • Transaction fees: get full block fees to be 0.1 N by increasing min gas price to 100,000,000 attoN
  • Reduce storage fee by 10x: 100kb for 1N => making average contracts 3N

Reasoning: storage right now ends up being very expensive for contracts like multsig and we want to reduce it to manageable. Tx fees are way too low at this point and we should leave more room to reduce it later.

@MaksymZavershynskyi
Copy link
Contributor

The reasoning behind block cost in NEAR being too low is not clear. Isn't it our intention to have low fees, what is the reason for increasing it?

We should compute the lower bound on storage cost, but deriving the cost of maintaining EC on AWS for one year and use our inflation rate to connect it with NEAR. If the proposed storage fee is lower than that then we cannot decrease it.

@bowenwang1996
Copy link
Collaborator

@ilblackdragon then you are assuming that 1 shard = 100 TB storage, which seems ridiculous.

@SkidanovAlex
Copy link
Contributor

I don't have strong preference for storage (naturally most of NEAR will not be used for storage, and attempting to obuse it will be pretty expensive).

For gas fees an insight into why you want to change it would be helpful :)

@eriktrautman
Copy link

Do you have comparable numbers for AWS on one side and ETH on the other for both storage and tx's for reference? Can't find the post and the economics blog doesn't have hard numbers.

@ilblackdragon
Copy link
Member Author

ilblackdragon commented Jul 15, 2020

Current prices are 40-70 GWei
Current ETH price ~$240

Ethereum:

  • Transfer tx: 21,000 gas. 0.00084 - 0.00147 ETH. $0.2 - $0.35
  • Storage price (spent): 6,400,000 gas per 10 kb. 0.256 - 0.448 ETH. $61.44 - $107.52

One major point is that contracts on Ethereum are only max 24KB with usually way smaller. Our contracts average at 300kb and sometimes go to 1MB.

Our simple transfer: 446 Ggas. Current gas price is 100,000 yN -> 0.0000000446 N (https://explorer.near.org/transactions/AbVHgMH85zTVKZGNY2VhG55apWhVMdbMrC8YbB4M1ibk)
I suggest we bump it to 100,000,000 yN -> 0.0000446 N
At current price: $0.00001784, if price increases 100x: $0.001784

Reasoning for min gas price increase is mostly around few things:

  • It's still dramatically cheaper, being 10,000x cheaper and NEAR can grow 100x and it still will be 100x cheaper than Ethereum.
  • We can always decrease but won't be able to increase it later IMO
  • 0.1N per full chunk has a nice effect that ~15 shards would be almost covering the 5% of security issuance. Currently it's 0.0001N per full chunk - which would require 15k shards...

@SkidanovAlex
Copy link
Contributor

Re: gas prices, agree with all the points except "We can always decrease but won't be able to increase it later IMO", I don't think there's anything specific that prevents us from later bumping the minimum gas price.

This sounds like a very strong reason in support of this idea:

0.1N per full chunk has a nice effect that ~15 shards would be almost covering the 5% of security issuance. Currently it's 0.0001N per full chunk - which would require 15k shards...

Storage should be extracted into a separate issue, so that we can discuss each issue separately.

@ilblackdragon ilblackdragon changed the title [Proposal] Reduce storage fee and increase tx fee [Proposal] Increase min gas price Jul 17, 2020
@ilblackdragon
Copy link
Member Author

anything specific that prevents us from later bumping the minimum gas price

We can indeed increase if we are ok with some applications breaking.
For example we have allowances, where apps created with expectation to allow 5-10 transaction.
If we increase price later, these allowances may not be enough even to cover 1 tx.
Or some contracts that were balancing usage of gas and amount on the balance based on the pricing.

@SkidanovAlex
Copy link
Contributor

SkidanovAlex commented Jul 21, 2020

If we increase price later, these allowances may not be enough even to cover 1 tx.

What happens if the gas price increases to that level organically via usage?

@vgrichina
Copy link

@SkidanovAlex aren't we always pre-charging according to max price and then refunding (after #67)? Maybe I'm misunderstanding how that works though.

@bowenwang1996
Copy link
Collaborator

@vgrichina it is not according to max price but rather some pessimistic gas price computed from current gas price.

bowenwang1996 added a commit to near/nearcore that referenced this issue Jul 25, 2020
Update gas price to 1_000_000_000 according to near/NEPs#92. 

Test plan
---------
* `upgradable.py` with transactions.
* spin up a node with this change and verify that it can sync to testnet and process blocks without any issue.
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this issue Jan 5, 2024
After near/NEPs#92, the min gas price was
set to 100M yoctoNEAR. But the genesis file we get from the state viewer
dump-state command copies the 1B min gas price from the genesis file. This
results in a network with 10x the gas fees as mainnet when we launch mocknet
testing networks, and many transactions sent by the mirror run command fail
with too little balance. So this PR allows setting the min/max gas prices
in the mocknet genesis file so we can fix that. It might also be worth
changing the behavior of `view-state dump-state` to set the min gas price,
but this will work for now and lets us get the right gas price in all cases
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this issue Jan 5, 2024
After near/NEPs#92, the min gas price was
set to 100M yoctoNEAR. But the genesis file we get from the state viewer
dump-state command copies the 1B min gas price from the genesis file. This
results in a network with 10x the gas fees as mainnet when we launch mocknet
testing networks, and many transactions sent by the mirror run command fail
with too little balance. So this PR allows setting the min/max gas prices
in the mocknet genesis file so we can fix that. It might also be worth
changing the behavior of `view-state dump-state` to set the min gas price,
but this will work for now and lets us get the right gas price in all cases
github-merge-queue bot pushed a commit to near/nearcore that referenced this issue Jan 8, 2024
After near/NEPs#92, the min gas price was set
to 100M yoctoNEAR. But the genesis file we get from the state viewer
dump-state command copies the 1B min gas price from the genesis file.
This results in a network with 10x the gas fees as mainnet when we
launch mocknet testing networks, and many transactions sent by the
mirror run command fail with too little balance. So this PR allows
setting the min/max gas prices in the mocknet genesis file so we can fix
that. It might also be worth changing the behavior of `view-state
dump-state` to set the min gas price, but this will work for now and
lets us get the right gas price in all cases
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this issue Jan 11, 2024
After near/NEPs#92, the min gas price was
set to 100M yoctoNEAR. But the genesis file we get from the state viewer
dump-state command copies the 1B min gas price from the genesis file. This
results in a network with 10x the gas fees as mainnet when we launch mocknet
testing networks, and many transactions sent by the mirror run command fail
with too little balance. So this PR allows setting the min/max gas prices
in the mocknet genesis file so we can fix that. It might also be worth
changing the behavior of `view-state dump-state` to set the min gas price,
but this will work for now and lets us get the right gas price in all cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants