Summary or problem description
I can't claim GAS without GAS.
I can't perform a swap without GAS.
I can't get GAS if I don't have GAS (unless somebody sends it to me)
Do you have any solution you want to propose?
We could add "flash loans" to GAS and allow it to be used to claim gas and other activities that may result in my account having more GAS than it currently has. I suppose that we would charge a protocol fee to use this feature.
Neo Version
Where in the software does this update applies to?
I love this idea. It is an useful feature for Neo users.
What are flash loans?

Send transaction not need gas fee, how to avoid a lot of flash loan transactions blocking network?
Send transaction not need gas fee, how to avoid a lot of flash loan transactions blocking network?
You can't avoid a flash loan, because you can create a flash loan protocol in neo. I like your idea @lock9 but I think that it's a dapp
Do you have any solution you want to propose?
We could add "flash loans" to GAS and allow it to be used to claim gas and other activities that may result in my account having more GAS than it currently has. I suppose that we would charge a protocol fee to use this feature.
Those who will provide load will they get some % interest?
Send transaction not need gas fee, how to avoid a lot of flash loan transactions blocking network?
You can't avoid a flash loan, because you can create a flash loan protocol in neo. I like your idea @lock9 but I think that it's a dapp
a good idea would be to create a pool of gas and users can automatically loan/borrow with interest
I can't claim GAS without GAS.
I can't perform a swap without GAS.
I think all of this boils down to sponsored transactions. Loans are nice, but I'd agree with @shargon, it's a dApp, not something requiring changes to GAS or NEO contracts.
@shargon @roman-khimov but how can I invoke a dapp without GAS?
Summary or problem description
I can't claim GAS without GAS.
I can't perform a swap without GAS.
I can't get GAS if I don't have GAS (unless somebody sends it to me)
Can a dApp solve these problems?
I get your point @lock9, an interesting idea. Do you plan to lend GAS for quick usage and users keep some tokens locked as collateral?
As long as your dapp has GAS in it, it could do that process in a quite simple manner:
signers[0], aka sender (and they require some GAS for execution)push... push... invoke "transfer")Right now, I don't know how to fix that without NEP-TTT https://github.com/neo-project/proposals/issues/137 or some P2P engine.
Can a dApp solve these problems?
You can create a SmartContract, and this smartcontract can be used as a sender to pay the fee. Or we can approve this patch https://github.com/neo-project/neo/pull/2008 :)
@igormcoelho A flash loan doesn't need collateral. It is a loan that you take and pay within the same transaction (with a fee).
Please refer to Steven's answer. All of that happens inside a single transaction.
Guys, to be very clear, I don't want the smart contract to provide 'financial services'. My main goal is to solve the problems mentioned here:
I can't claim GAS without GAS.
I can't perform a swap without GAS.
I can't get GAS if I don't have GAS (unless somebody sends it to me)
If this is possible by other means, I would like to know how I can implement it.
@shargon How will this smart contract work? I don't think that sponsored transactions are the solution because I don't need somebody else to pay it for me; I have NEO and may have unclaimed GAS. I can pay it for myself if the system allows it.
Again: I don't think these flash loans should be of unlimited value, but rather something that would allow users to 'get GAS if they don't have GAS' by either swapping NEO or just claiming GAS. There may have other use cases, like withdraw some locked GAS.
Guys, to be very clear, I don't want the smart contract to provide 'financial services'.
Man, I thought you were opening a crypto bank :joy:
My opinions, one by one:
I don't really want 'flash loans'. Any solution for those problems is ok for me (as long as they are decentralized).
Neo Legacy had free transactions, now we can't even claim without GAS. Are we expecting people to always send NEO and GAS when they move their assets to a new savings account? I doubt people will remember that.
Send transaction not need gas fee, how to avoid a lot of flash loan transactions blocking network?
You can't avoid a flash loan, because you can create a flash loan protocol in neo. I like your idea @lock9 but I think that it's a dapp
a good idea would be to create a pool of gas and users can automatically loan/borrow with interest
there is already CEX, or flamingo swap potentially will provide the ability to acquire GAS?
It looks to me that at least a part of the problem is people buying wrong tokens. Because the case of I have NEO and may have unclaimed GAS doesn't happen magically, for it to happen you've already bought NEO, so the question is why have you bought it? You want to use Neo network? You need GAS for it, you don't need NEO. Yeah, I understand that it's a bit more complex than average user might expect, but that's the model we have. NEO is a share in its essence, GAS is money, you don't pay with shares, you pay with money.
Of course there are rules that allow you to get dividends from your shares. But yes, these rules at the moment may require you to pay some GAS. But it's not always the case. For example, you've been hodling a 1000 NEO for some time and you have X unclaimed GAS. To get this X amount of GAS you need to move NEO on your account in some way. This can be done with self-transferring transaction (that will cost you something in GAS), but it might as well be done with 1 NEO transfer to your account. So if you just buy 1 NEO that will move to the same account this transfer will trigger GAS distribution as well.
Can GAS distribution be improved to happen automatically? Maybe. But it's not trivial. And #2008 unfortunately just has technical issues that we don't yet know how to solve.
But we have contract-sponsored transactions. So you don't have to be transaction sender (signer[0] technically) paying fees, contract can pay that if it wants to. And we also have witness scoping. So you can sign some transaction where contract is a sender, but specifically limit your signature to whatever you need (it's not that contract being a sender magically could do anything it wants to with your assets).
And these relations can either be completely settled by contract's verify method (with whatever checks it wants to implement for its users) or by contract's backend that will add a signature to incomplete transaction as in #1573 scenario (this will require a small GAS deposit though). I think these options cover most of real-world problems with people trying to use the network but not necessarily wanting to mess with GAS.
Most helpful comment