Hi guys, I'm currently learning about Account Abstraction and trying to create something with it.
I have some questions regarding to the nonce management in ERC-4337.
I learned that we can use 2D Nonces
for UserOperations to have higher throughput and facilitate independent transactions in parallel (https://docs.stackup.sh/docs/useroperation-nonce) unlike using the traditional sequential nonces. As from this documentation UserOps using the same nonce key will be ordered sequentially and userOps using different nonce keys will be parallel to each other.
However, I don't understand that how 2D Nonces
are treated and behave on chain beyond the EntryPoint
contract. From the Ethereum yellow paper, the term, nonce
is stated as below -
nonce: A scalar value equal to the number of transactions sent from this address or, in the case of accounts with associated code, the number of contract-creations made by this account.
Regarding to the above, I have two questions -
- Then with ERC-4337 2D Nonces, is the above statement still implied or how are the number of txns tracked?
- Race condition upon sending parallel UserOperations. Let's say I have 10 USDT and then I execute two parallel UserOperations with different
Nonce Keys
. Both UserOps will do the same thing, which will spend 10 USDT from my account. Then what will happen?
Thanks in advance. Much appreciated for your help.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments