Smart accounts are more expensive than EOAs - but by how much? š¤·
Introducing the MinimalAccount - the most gas-optimised ERC-4337 account, written in
@huff_language
- built to find out the answer to exactly that question
Firstly to caveat: the MinimalAccount is extremely minimal so I definitely don't recommend using it in production. It is meant purely as an experiment and has not been audited
Compared to other smart accounts, the MinimalAccount reduces gas by almost 28k overall (over 20k on creation and around 3.8k each for native/erc20 transfers)
However, compared to EOAs (who have no creation cost and a native transfer cost of 21k) the MinimalAccount is still
significantly more expensive. The main cost comes from the execution flow of ERC-4337 (divided into validation and execution phase) and by using the EntryPoint
The main takeaway from the MinimalAccount is finding out what the absolute lower barrier of gas cost is for functioning ERC-4337 compliant accounts. This is quite useful in benchmarking future versions of accounts and being able to answer, concretely, how much more expensive
@kristofgazso
@huff_language
not yet but planning to run tests to find out after how many batched txs (for different kinds of txs like native or ERC20 transfer) the account becomes cheaper than EOAs
@abstractooor
@huff_language
@_KtorZ_
Iāve heard that the Cardano design makes complex offchain computing relatively cheap still (whatās onchain is only validator scripts?)
Would that help reduce gas cost of using smart contract wallets on Cardano?
@abstractooor
@erc4337
@huff_language
Oh we have profiled the entrypoint most of the gas cost come from some sig verification, gas refunds, nonce maintenance.. optimization at the language level may not be very productive, we have design an zero knowledge driven AA for above problems