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

auto-claim gas on tx submission #1078

Open
igormcoelho opened this issue Aug 30, 2019 · 9 comments
Open

auto-claim gas on tx submission #1078

igormcoelho opened this issue Aug 30, 2019 · 9 comments
Labels
Consensus Module - Changes that affect the consensus protocol or internal verification logic Discussion Initial issue state - proposed but not yet accepted Enhancement Type - Changes that may affect performance, usability or add new features to existing modules.

Comments

@igormcoelho
Copy link
Contributor

igormcoelho commented Aug 30, 2019

@lock9 has raised some questions related to points, which we have previously debated by community, on several threads (although I cannot find them all here now...)

The challenge is: how to prevent people from requiring Gas, in order to operate Neo.

Since every tx is paid, even claiming would cost a little bit of gas, and Neo would be stuck for a while...

In my opinion, solution is simple: now that we have Native NEP-5 for GAS, it's possible to pre-calculate how much gas user would have unclaimed for that Neo, and allow that as network fee in that transaction.

Other point was discussed on other thread, I guess by @MorganDream too, where a GAS gateway could help in other operations... this same GAS gateway could operate Neo to GAS on runtime (as long as we define a NEP for it), and the same would apply for any other NEP-5 that wants to subsidize user operations.

Please comment here if I forgot threads or names... it's an important issue.

@igormcoelho
Copy link
Contributor Author

One practical example for Gas gateways: neo-project/proposals#101

@rodoufu
Copy link

rodoufu commented Sep 5, 2019

@igormcoelho I think Rick login here is @lock9

So, you are suggesting that the blockchain calculates the unclaimed GAS and sand it to the wallet every time it makes a transaction, aren't you?
This way the wallet'd spend the GAS for the transaction that it was already going to create and save fees for one Claim transaction.
For the users that are just holding tokens, maybe as an investment, they wouldn't receive it for the holding time, but if they are just holding they wouldn't need it.

What if a wallet receives 10 NEO and no gas? If every transaction needs gas, including the claim it wouldn't be able to claim it.
When this wallet gets enough unclaimed gas to make a transaction would it be able to make it even if all its gas is still unclaimed? Is it what you are thinking?

@shargon
Copy link
Member

shargon commented Sep 5, 2019

What if a wallet receives 10 NEO and no gas

He must wait or buy some gas

@lock9 lock9 added Consensus Module - Changes that affect the consensus protocol or internal verification logic Discussion Initial issue state - proposed but not yet accepted Enhancement Type - Changes that may affect performance, usability or add new features to existing modules. labels Sep 27, 2019
@roman-khimov
Copy link
Contributor

I propose closing this one:

@shargon
Copy link
Member

shargon commented Nov 15, 2023

I propose closing this one:

What about modify the Gas.BalanceOf to be the claimed+unclaimed?

@roman-khimov
Copy link
Contributor

It's NEP-17, I don't think it can do these tricks without breaking compatibility. We also have unclaimedGas in the NEO contract (since distribution is dependent on NEO).

@shargon
Copy link
Member

shargon commented Nov 15, 2023

It's NEP-17, I don't think it can do these tricks without breaking compatibility. We also have unclaimedGas in the NEO contract (since distribution is dependent on NEO).

We can use hardforks to ensure the compatibility.

@roman-khimov
Copy link
Contributor

HF can do anything technically, but I mean conceptually, per NEP-17, balanceOf is supposed to be some real token amount that you can immediately spend. It's not the case for unclaimed GAS, it has to be minted (and callbacks have to be called for contracts). So while GAS is NEP-17 I don't think we can do this.

@shargon
Copy link
Member

shargon commented Nov 15, 2023

If you are able to spend this balance, and we increase totalsupply as well, we can do more or less the same as Aave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consensus Module - Changes that affect the consensus protocol or internal verification logic Discussion Initial issue state - proposed but not yet accepted Enhancement Type - Changes that may affect performance, usability or add new features to existing modules.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants