-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement support for account abstraction #2917
Comments
@roman-khimov Continuing from #2907 (comment):
It's great. There are several use cases that already interest me on MainNet, GrantShares voting for example. But before we can extend this, we have to extend the Neo protocol. This is part of the proposal that is novel to Neo. The rest of the blockchain world is learning to not hate its regular joe users by having unrealistic expectations of them. In user land, private keys are going away. Most KOL's in the industry are convinced this is how the floodgates to blockchain adoption will ultimately be opened, and I find it hard to disagree. This is the purpose of account abstraction. It's considered one of the "holy grails" in Ethereum and is the overarching goal of ERC-4337. All it really means is arbitrary validation logic. As in, you can swap in any signature scheme you want, say a quantum resistant one, or you could not require any secret material provided by the user at all. Because Ethereum is too bloated and adopted to make protocol changes, they landed on alt mempool + smart contract wallets with "counterfactual addresses" (just means deterministic address, so you can derive it and transfer to it before the contract is deployed). But that's just the thing. They still have to deploy a new proxy contract for every single user. Okay for L2, too expensive at L1. It's the same smart account problem again. On the other hand, in Neo-land we have arbitrary verification logic just sat there, not to mention a willingness to make protocol changes. It's ironic that without any intention to be in this position, we are so much closer to a so much more powerful solution than what Ethereum has been chasing for years 😄
The GAS problem is separate from the keyless verification problem, though they can be solved together. While we are custodial, we can sponsor trivially as sender, and we do. But we are forced to go non-custodial. And we don't want to ask a user to store a key or download a wallet in order to perform actions. It defeats the entire point of the application, which is Web2 -> Web3 onboarding, i.e. use the blockchain from within the applications you are already using. So our limitation is ECDSA.
Which is a good start. But we have to move beyond signers. We need "users", freed from:
A But maybe Telegram or GitHub doesn't support it. Maybe I want to do a biometric verification, or an email OTP. In that case, I need to be able to point the interop at my custom verification handler. Maybe I have to deploy a contract for that, I'm not sure, it's an implementation detail, but if so that's fine, my user still shouldn't need a proxy contract. |
I believe these are the features that users on neo want most.Neo's witness mechanism allows us to have full flexibility in transaction authentication. This is something that many other layer-1 networks cannot provide. |
something like the mentioned I wonder why witness scope was not mentioned there. witness scopes are necessary and important part under current authorization policy of neo. I'm not sure if the smart contract worm virus is known by @roman-khimov that happened on NEP-5 on neo 2.0 and I'm going to explain it a bit. it would be the first smart contract virus in the history. For a long time, users have some understandings of blockchain usage that not always true (may influenced by ethereum)
at that time, a fake NEP-5 asset named neo was airdropped to many accounts and when someone tried to transfer the fake neo, during the execution of the transfer (written in the smart contract of fake neo), all other valuable assets are transfered to the hackers' addresses. ( while the fake neo went to the next victims and let it be able to spread ) that's the exact reason why witness scope is introduced in neo3. No one is going to take responsibility for this incident at that time:
We often put many unrealistic and even higher requirements for our users and application devs than ourselves. |
#2866 is made to be app-specific in that it's a contract that decides how to interpret a particular request. That is its strength (not hard to implement) and that is its weakness (can't do any invocation with it) at the same time, as usual.
This can be hidden by contracts that manage accounts for their users. In fact, that was one of the things I had in mind with #2866, things like
Well, that's #2577 as is, what we're trying to do in our sidechain now is to have a scheme where no sidechain GAS is required for any operations. And here I mostly mean storage node operations, users don't need it already. In general it should work this way:
In some ways we can do that because NeoFS sidechain is just that, a NeoFS sidechain, we don't have any random activity there, only NeoFS management operations. While this scheme is transaction-based now, we do have some notion of user intents at the same time. Container creation (done by end users) is an example of that, currently it works this way:
But again all of this is app-specific and container registration just costs some real (mainnet) GAS that is written off of the user's balance (relying on IR multisig as well). Doing arbitrary executions is more challenging. Oracle invocations can be an example in some ways (signers are substituted there and some other native contract could do that in a different manner based on some token data), but I'm not ready to propose anything here. |
One account for one authorization method is fine, but app-specific accounts are simply not good enough. If a user can create a wallet with their Gmail, that Gmail wallet should work with any application. It shouldn't have a different address based on what application someone is using. There's nothing user-friendly about that. If I can use my Gmail wallet to get bNEO from NeoBurger, I expect to be able to use that Gmail wallet to stake it with Flamingo too. From what I've studied of Neo's architecture and forgetting the current design of Wouldn't this approach give one address per user per verification method in a way that is completely dApp-agnostic? Again, hard to overstate how superior this solution is compared to Ethereum's account abstraction approach, thanks to verification scripts. An ERC-4337 user pays N fee for N smart wallets. An N3 user has to pay 0 for N smart wallets.
It falls short of the requirements. Sponsorship is an option that dApps should have available to them, but it's not a silver bullet for user onboarding. A user that has ANY token in their account should be able to make a transaction, without first acquiring GAS or requiring someone else to pay it for them. The proposed system solves this by letting the user allocate some of a NEP-17 to the bundler in return for the bundler covering tx fees. This is completely generic. If the bundler accepts the NEP-17 held by the user, it just works, and it only ever took one on-chain transaction. |
Sure, by "contracts that manage accounts for their users" I just mean that user accounts are tied to this particular contract, but they're proper Neo accounts this way and can enjoy all the properties of proper Neo accounts. Some trivial example is a contract that stores name->public key mapping and expects a signature in invocation script. So verification one will look like
I see what you mean, but transactions are paid for with GAS. And someone has to pay some GAS to have things happen. This entity can theoretically take other tokens for its service, but they have to convertible into GAS in an easy way, otherwise this sponsor will run out of GAS anyway. But if something can be converted into GAS easily, why a user can't do that? If we imagine transaction sponsor taking arbitrary tokens it'll likely require some premium for doing that, because taking non-GAS is a risk for him. I'd expect this to be more than just a conversion rate, so likely users will be economically motivated to convert by themselves. |
I feel like there is all these options, but no written down in stone defined way to go about executing the situation, what that is; Is variable. To be honest doesn't really matter, What matter most is know how to drive, we know we need keys, gas and money. What is the neXt? That's a plan for a trip. But we are missing the roadmap, goals... a governance if i may. Where do these bylaws come from? Where and how do we seek these entities? Its the 90s and domain names just came out and now i want a GPS to find where to go. But you know how to find a store. You put your order in knowing someone is responsible. When you step into a bank we all know how it works. And at the same time don't even care what the cost is; to do something or the responsibly. All we know is we want someone to do it for us at whatever the cost may-be. We're in the ever growing world of NOW NOW NOW NOW. All things aside these are my cryptic thoughts on my 1st take. But one problem i had; That you shouldn't need; to read code to figure out how stuff works. I think getting more proposals updated and set in stone in a reasonable time frame. That is what holds me back from dump tons of hours into anything that isn't set in stone... get funding and do it all yourself.... Now you need PHD in cryptographic and business... Off-topic..... 😺 |
@shargon how do you think? |
Yes, someone has to pay the GAS at the end of the day. But we want to abstract that away from the user. It should not be the user's problem. The whole issue with blockchain today is that we make everything the user's problem. Consider the user experience with the proposed solution:
At no point in this flow does the user need to understand how private keys work and how to keep them secure, or that transactions on Neo need GAS, or where to get that GAS. They just sent a "normal" transaction from an easy-to-use wallet and it magically worked.
Expecting too much from the user again. It's absolutely fine if a technically capable user wants to manage their own keys and send their own transactions in order to save on costs. But we should absolutely not require that of everybody in order to make use of the chain. The majority of people are not technically capable. No one is adopting the technology like this.
There's nothing wrong with it costing more to make use of these abstractions. Maybe to do a manual FLM transfer, it would cost $0.12 GAS instead of $0.30 FLM via the bundler. So what? If you want to learn how everything works to save money, be my guest. Right now we require the user to learn how everything works. It's not good enough.
You're exactly right. Everything we require users to do in blockchain is front-loaded with an impossible amount of information and knowledge. What's an exchange, how do I safely store keys, if I have $value of tokens in my wallet why can't I afford the fees, and 100 other such questions. Account abstraction means hiding these unnecessary confusing details around account ownership away so that the user doesn't have to care. I don't care what the final solution looks like really, but I know what barriers need to be removed when it comes to UX. |
To clarify i love all these ideas. I would to love to turn neo into operating system or vm into a kernel based subsystem and we all could but we need more goals set into place with clear roadmaps i know help is low or limited or maybe not. but im ready to run on fire... cryptic math so much fun. |
This issue is intended to replace and continue discussions that started in #2907.
Summary or problem description
Neo lacks flexibility in regards to how users may interact with the network. We make too many assumptions about usability and it leaves massive barriers to adoption that are not feasible to overcome at the application layer. Examples include the fact that we require regular users to manage private keys or to initially load an account with GAS before they can do anything with the network.
We can build better applications and experiences by abstracting these things away from the end user. Depending on the approach taken, possible benefits include:
Do you have any solution you want to propose?
Taking inspiration from ERC-4337, Neo should implement support for
user operations.
A user operation documents a user's intent for a transaction and grants increased flexibility for verification.User operations are shared with the network through a separate channel than conventional transactions. Special operators, "bundlers", presumably an enhancement to P2P Notary, bundle these operations into transactions targeting a new native contract (Notary extension?), which unbundles and executes them. By sending the bundle transactions, bundlers pay any associated system/network fees, and are expected to be reimbursed in the process by the user operation. This reimbursement can be in any token desired by the bundler. Presumably a non-altruistic bundler will refuse any operations that do not meet its fee or validity checks.
User operations should allow the use of a new interop, along the lines of
CheckData
#2866. This interop should allow arbitrary verification logic to be validated, beyond what is possible with ECDSA alone. This, as an example use case, allows us to support end users that don't need to store private key material.This facilitates a new type of Smart Account capable of onboarding any user regardless of their background. It also opens the door to several other benefits, such as Social Recovery services and transfer quotas, offering protection in the event that a user loses access or otherwise compromises it.
Optionally, we can explore the ERC-4337 concept of
Paymasters
as a method for doing practical arbitrary transaction sponsorship. A dApp should be able to maintain a GAS balance that any user operation can spend providing the operation abides by the requirements defined by the dApp.Neo Version
Where in the software does this update applies to?
Probably small changes to most of it, some more significant ones in parts.
The text was updated successfully, but these errors were encountered: