The design space for protocol upgrades that improve the user experience on Ethereum is large, however, there are two categories that I believe deserve most of our attention (thread).
These categories can be deduced by working backwards from the types of accounts available today, and the functionality each of them provide.
It's also important to note _why_ UX in Ethereum tends to be so poor:
Authentication is a critical building block for smart contracts. There needs to be a secure way to know "account X is okay with Y happening". Developers have turned to `msg.sender` for this functionality.
Since most user txs are from EOAs, they are only allowed to perform one authenticated action per tx. This graph shows how msg.sender is only set to their address once in the initial frame of the tx. The solution is to therefore allow accounts to both execute code & originate txs.
This leads us to the first category of design choices, Account Abstraction.
Allowing contract accounts to originate transactions is one of the oldest research problems in Ethereum. @VitalikButerin originally authored a post called "On Abstraction" in 2015. Unironically, this one of my favorite blog posts in crypto. blog.ethereum.org/2015/07/05/on-…
Over time, the idea of allowing contracts to originate transactions became known as "Account Abstraction" or "AA" for short. The idea continued to be refined, mainly by Vitalik. In February 2020 he authored a post that would become a turning point for AA: ethereum-magicians.org/t/implementing…
This post laid the foundation for the Quilt team's work in co-authoring the Account Abstraction EIP -- EIP-2938. A bit over a year later, this is still the most comprehensive proposal for a protocol modification to allow Account Abstraction. eips.ethereum.org/EIPS/eip-2938
The tldr; of EIP-2938 is that it introduces a new tx type which allows senders to specify an address that will determine the validity of the tx, and therefore be its originator. Clients can define a local limit of how much gas a tx may use to determine its validity in the txpool.
This is an exceptionally elegant way of abstracting the validation logic from the protocol. Unfortunately there are a lot of complexities lurking. Relying on state external to the originating account is tricky, because it requires executing all preceding txs to completion.
This breaks an invariant today that all txs can be validated in linear time, w.r.t the number of txs. We're continuing to see block producers become more sophisticated (re: flashbots), so this concern may be overstated.
Account Abstraction also doesn't solve one of the most poignant issue that plague smart contract wallets today: cost. It could be $20 for a simple proxy contract deployment to $500 for a full copy of a Gnosis Safe. AA will continue to require users to pay to deploy these wallets.
There is an interesting design space here where, along with implementing AA, all EOAs are simply replaced with a smart contract that emulates the current behavior. This could be an interesting way of upgrading the functionality of EOAs. ethereum-magicians.org/t/we-should-be…
Moving on to the second main category I see for improving Ethereum UX at the protocol, we could implement a mechanism that allows EOAs to execute code in the context of their own account.
EIP-2803 and EIP-3074 are two candidates in this design space. After contemplating the Rich Transactions EIP we (the Quilt team & authors of EIP-3074) found it lacked the versatility that we desired in a solution to the UX problems. eips.ethereum.org/EIPS/eip-2803
I've written in-depth about EIP-3074 and how it works, so I'll just link to a past thread
@adietrichs and I gave a very comprehensive talk at @EthCC on EIP-3074. It's probably the best introductory resource for the EIP:
I believe EIP-3074 has three "superpowers":
1. It is incredibly flexibly + future proof. 2. Once an invoker is deployed, _all_ users can take advantage of contract wallet functionality. 3. Due to 2, it creates a schelling-point for contract wallet interfaces.
Superpower 3 is particularly interesting, because it sort of allows us to skip the coordination that would be required to get web3.js and ethers to begin supporting things like batch txs, expiring txs, etc in a way that Argent, Gnosis, etc. would all agree upon.
As we move to an L2-focused world, superpower 2 also shines. Migration into L2s becomes simpler+cheaper due to the tx batching now available to all users. Additionally, switching between L2s becomes easier, because the same contract wallet functionality is offered on each L2.
Although Account Abstraction and EIP-3074 may seem at odds with each other, I actually think they are rather complementary. EIP-3074 is a drop-in solution for authentication complexities in the protocol and AA allows relayer networks to be codified into smart contracts.
The gist is that wallets should focus on the aspect that make them unique, i.e. _validation_. Every wallet validates differently, whether it's verifying a different recovered address or using a different cryptographic primitive altogether.
The machinery that executes transactions is overwhelmingly not unique. Wallets tend to either originates a single call or multiple (batched) calls. This functionality can & should be separated from the validation logic.
/fin
I continue to be a proponent of the EIP-3074 first approach. AA is an elegant solution, but it has been researched for over 6 years and it's unclear when it may make it into an upgrade. EIP-3074 is a more straightforward solution to UX issues.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Ethereum clients currently store 275 GB of historical data that is unnecessary to validate the chain. That number is growing at a rate of around 140 GB per year. EIP-4444 proposes clients prune data older than 1 y/o.
So why don't we just prune the data already?
To understand why the data has yet to be pruned and why this is even a discussion, it's important to understand how historical data is used today. There are two main categories of usage: syncing and user requests over JSON-RPC.
In the world of syncing, there are two main approaches:
- Full sync - from genesis, download every block & execute it until tip of chain is reached.
- State sync - many schemes here, but essentially header sync using PoW checks and then download the state for the latest block.
How much does the storage refund need to decrease before you start using a different value to represent 0?
The London hard fork in July will almost certainly modify the behavior of refunds. There have been several iterations, but the latest is EIP-3529: Reduction in refunds.
I recommend reading the EIP as it is very thorough and explains the past proposals, however the main case we care about for this thread is setting a nonzero storage element to zero and the refund that incurs.
In the last month, users spent $23,830,482 on ERC-20 approvals. EIP-3074 would reduce that number by at least 30%, saving users millions while freeing up block space (thread).
Anyone whose nonce is greater than ten has likely experienced the approve+transfer flow that defi applications use to interact with ERC-20 tokens. The approve method is a relic of the original ERC-20 design.
There have been many attempts to alleviate the burden of token approvals, but none have succeeded. We believe EIP-3074 will resolve the issue because it addresses the two problems that have beleaguered other approaches.
Ethereum wallets may be getting a significant upgrade soon. With the proposed change, EOAs will immediately be able to send batch txs, expiring txs, unordered txs, and more. (thread)
My colleagues, @_SamWilsn_ and @adietrichs, and I have been working on improving the UX of interacting with Ethereum. After many iterations, we've come up with EIP-3074: AUTH and AUTHCALL opcodes.
To use these opcodes, an EOA signs a message off-chain, provides the message to a relayer, the relayer passes the signature and calldata to a contract on-chain (called an invoker), the contract verifies the signature using AUTH, and then relays the EOA's call with AUTHCALL.
so far, the most interesting IMO (as a non-dapp dev) are EIP-2535 Diamond Standard (@mudgen), EIP-3009 Transfer with Authorization (@petejkim), EIP-3000 Optimistic enactment of governance (@izqui9), and EIP-3156 Flash Loans (@acuestacanada)
but i feel like there are interesting conversations happening in some lower number EIPs that I'm just not following. any standards to improve the readability of tx data when signing (or signing standards in general)?