The protocol layers specified so far — network topology, consensus, monetary policy, cryptography, and inter-ledger bridge — define the infrastructure. This section and the two that follow (Sections 9–10) specify the user-facing stack: how individuals and merchants interact with the Aevum ESC in practice, from account creation to point-of-sale payment.
8.1. Native Account Abstraction: EOA Eradication
The Aevum ESC implements Account Abstraction at the protocol level — not as an application-layer retrofit (as ERC-4337 on Ethereum), but as a foundational design decision that eliminates Externally Owned Accounts (EOAs) entirely. The consumer-hostile custody model identified in §1.2 stems precisely from the EOA constraint: a single key, mandatory gas holding, no delegation, no recovery. Native AA eradicates each of those constraints:
Arbitrary Signature Logic. A Smart Contract Wallet can implement any verification logic — ML-DSA-44, multisig M-of-N, social recovery quorums, session-based authentication (NMW Session Auth Tokens), or future post-quantum schemes. The wallet's signature logic is upgradeable without changing the account address.
Gas Delegation (Paymasters). EOAs must hold native tokens to pay gas — a bootstrapping paradox for new users. Paymaster contracts sponsor gas on behalf of users, enabling zero-gas-cost consumer experiences (§8.6.2).
Atomic Multi-Operation Execution. A UserOperation (UserOp) encodes multiple contract calls atomically in a single transaction — eliminating EOA approve-then-transfer friction for DeFi interactions and batch payments.
Programmable Access Control. SCWs natively support the Partitioned Fund Contract model (§10.2), timelocked releases, spending limits, whitelisted destinations, and geofence restrictions — all architecturally impossible with a bare EOA.
8.2. EntryPoint Singleton (Versioned)
The EntryPoint is an immutable singleton contract deployed on the Aevum ESC that serves as the central orchestrator for all UserOperation processing. It is the only contract that Bundlers interact with directly.
8.2.1. Versioning
The EntryPoint carries a version field (uint16). At genesis, EntryPoint v1 is deployed. Future versions are deployed in parallel at new addresses without deprecating prior versions:
| Version | Status | Address | Notes |
|---|---|---|---|
| v1 | Active (genesis) | Deterministic CREATE2 address | Immutable post-deployment |
| v2 | (Future) | New CREATE2 address | Deployed when v1 limitation or vulnerability is identified |
Smart Contract Wallets declare their compatible EntryPoint version in an upgradeable binding pointer (§8.3.3), not in immutable base logic. Bundlers route UserOps to the correct EntryPoint based on the wallet's current declaration. Old versions remain functional indefinitely — a wallet deployed on EntryPoint v1 continues operating even after v2 is live, and is never force-migrated. This is consistent with the protocol-wide versioning philosophy (sig_version on Bond RSC, script_version in pUTXOs).
Migration path (security events). Because the binding is a mutable pointer, "old versions remain functional indefinitely" does not strand the installed base on a vulnerable singleton. If a live EntryPoint version is found to contain the class of bug enumerated in the §8.9 threat model (unauthorized execution or fund extraction), the wallet owner (sovereign key holder) can re-point the binding to a patched version via a signed, 48-hour-timelocked migrateEntryPoint(newEntryPointVersion) call — the same sovereign-key-gated, veto-windowed mechanism used for extension upgrades (§8.3.3). Migration preserves the wallet address and all storage state (funds, nonce, extension pointers); only the orchestrator binding changes. The DAO signals a critical fix via a RecommendedUpgrade advisory but — per Axiom 1 (Individual Sovereignty) — cannot force any wallet to migrate. This reconciles §8.2.1's "old versions functional indefinitely" (no forced deprecation) with §8.9's "migration to a patched version" (an owner-initiated, opt-in path always exists).
8.2.2. Processing Flow
The EntryPoint processes UserOps in a two-phase pipeline:
Phase 1 — Verification. For each UserOperation in a bundle, the EntryPoint calls the sender wallet's validateUserOp() method. The wallet verifies the signature (ML-DSA-44 or whatever logic it implements), checks the nonce, which the EntryPoint then consumes (anti-replay — the nonce is incremented here, during validation, before any execution and regardless of the later execution outcome), validates gas parameters, and returns a validation result. Consuming the nonce in Phase 1 is what lets a single sender bundle two operations: the op with nonce n validates and advances the sender to n+1, so that sender's second op (nonce n+1) validates correctly later in the same bundle rather than failing against a stale nonce. If a Paymaster is specified, the EntryPoint additionally calls the Paymaster's validatePaymasterOp() to confirm gas sponsorship. Any validation failure causes the individual UserOperation to be rejected (not the entire bundle).
Phase 2 — Execution. For each validated UserOperation, the EntryPoint calls the wallet's executeUserOp() method, which decodes and executes the calldata (transfers, contract interactions, batch operations). After execution, if a Paymaster was involved, the EntryPoint calls the Paymaster's postOp() method for accounting (debit gas cost from Paymaster balance, update rate limits).
The two-phase design ensures that validation is completed for all operations before any execution begins, preventing cross-operation state interference within a single bundle.
8.3. Smart Contract Wallet Standard
8.3.1. Minimum Obligatory Interface
Every Smart Contract Wallet on the Aevum ESC must implement the following base interface to be compatible with the EntryPoint and Bundler ecosystem:
| Method | Signature | Purpose |
|---|---|---|
validateUserOp |
(UserOperation calldata, bytes32 userOpHash, uint256 missingAccountFunds) → uint256 validationData |
Validates the UserOperation's signature and authorization. Returns a packed value containing the validation status and optional time-range validity (validAfter, validUntil). |
executeUserOp |
(UserOperation calldata, bytes32 userOpHash) → void |
Executes the validated operation. Decodes calldata and performs the requested actions (transfers, contract calls, batch operations). |
getOwner |
() → bytes |
Returns the current owner identifier (ML-DSA-44 public key hash, multisig configuration hash, or other ownership proof). Used by Bundlers and block explorers for transparency. |
getNonce |
() → uint256 |
Returns the current nonce for anti-replay protection. Consumed (incremented) atomically by the EntryPoint during Phase-1 validation — alongside the validateUserOp call, for anti-replay, before any execution and independent of the execution result. An included UserOp that reverts during execution still consumes its nonce, so the identical signed op cannot be re-validated or resubmitted, and a Paymaster cannot be drained by replaying a reverting op. |
Contracts that do not implement this interface are rejected by the EntryPoint during the verification phase. The interface is deliberately minimal — it defines the contract between wallets and the protocol, not the wallet's internal logic.
8.3.2. Extensions Registry
Beyond the obligatory interface, wallets can declare optional extension modules via an on-chain Extensions Registry. Extensions are composable modules that add functionality without modifying the base wallet logic:
| Extension ID | Name | Description | Primary Consumer |
|---|---|---|---|
0x01 |
Partitioned Fund Contract (PartFund) | Mobile Allowance system for NMW delegation (Section 10.2) | NMW mobile wallet |
0x02 |
Social Recovery | Guardian-based key recovery with M-of-N quorum and veto windows | Arca ceremony, Desktop Node |
0x03 |
Deadman's Switch | Automatic succession activation after configurable inactivity period | Inheritance planning |
0x04 |
Governance Module | Conviction Voting / Quadratic Voting participation interface for DAO Treasury | Governance participants |
0x05 |
Locked Stake Proxy | PoD staking interface with Dedication Decay tracking | Validators |
0x06 |
Paymaster Module | Enables the wallet to act as a Paymaster for third-party UserOps | Merchants |
0x07 |
Spending Limits | Configurable per-transaction and per-period spending caps | Risk management |
0x08 |
Whitelist Module | Restricts outgoing transfers to pre-approved destination addresses | Institutional custody |
Wallets register their active extensions by calling registerExtension(extensionId) on the Extensions Registry contract. Bundlers, Paymasters, and dApps can query the registry to discover a wallet's capabilities before interaction. Extensions are independently auditable — a bug in the PartFund extension does not compromise the base wallet's validateUserOp logic.
8.3.3. Wallet Upgradeability: Modular Proxy Architecture
Smart Contract Wallets on the Aevum ESC are upgradeable via a minimal proxy pattern with sovereign-key-gated migration. This is a deliberate design decision addressing the tension between immutability (security) and evolvability (bug fixes, feature additions):
Base Wallet Logic: Immutable. The core validateUserOp and executeUserOp logic is deployed as an immutable implementation contract. Once deployed, it cannot be modified. This guarantees that the fundamental authorization logic (ML-DSA-44 verification, nonce management, ownership checks) is auditable, formally verifiable, and tamper-proof. The immutable surface covers the authorization algorithm only; two pieces of wallet configuration are deliberately kept mutable as timelocked, sovereign-key-gated pointers rather than baked into the immutable code — the extension pointers (below) and the EntryPoint binding (next).
Extension Modules: Replaceable. Each extension (PartFund, Social Recovery, Paymaster, etc.) is deployed as an independent contract behind a proxy pointer stored in the wallet's extension registry. The wallet owner (sovereign key holder) can replace an extension pointer via a signed upgradeExtension(extensionId, newImplementation) call. This operation:
- Requires the sovereign key signature (ML-DSA-44 from Arca/Desktop) — the NMW cannot initiate upgrades
- Is subject to a mandatory 48-hour timelock — the upgrade is announced on-chain and takes effect only after the delay, providing a window for the owner to veto if the upgrade was unauthorized
- Preserves all storage state — the proxy delegates calls to the new implementation without migrating data, preventing fund loss during upgrade
- Emits an
ExtensionUpgradedevent, visible to all counterparties (Paymasters, Bundlers, dApps) for compatibility detection
EntryPoint Binding: Migratable Pointer. The wallet's compatible EntryPoint version (§8.2.1) is stored as an upgradeable binding pointer governed by the identical rule set as an extension pointer: a signed migrateEntryPoint(newEntryPointVersion) call from the sovereign key, subject to the mandatory 48-hour timelock and on-chain announcement, preserving the wallet address and all storage state. This is what makes the §8.9 EntryPoint migration mitigation real for the installed base: because the binding is a mutable pointer — not part of the immutable base logic — an existing wallet stuck on a vulnerable EntryPoint version can move to a patched version without redeploying or losing funds. Owners who want maximum immutability can invoke lockEntryPoint() to permanently freeze the binding (mirroring lockExtension), explicitly forgoing the migration path in exchange for a fully predictable orchestrator.
Formal-review pending (ADR-0005 counter-sign).
Protocol-Standard Extensions: DAO-Governed. The canonical implementations of standard extensions (PartFund v1, Social Recovery v1, etc.) are maintained by the DAO. When a bug is discovered in a standard extension, the DAO publishes a patched implementation and emits a RecommendedUpgrade advisory. Individual wallet owners then choose whether to apply the upgrade — the DAO cannot force upgrades on any wallet. This preserves Axiom 1 (Individual Sovereignty) while providing a coordinated response path for security events.
Immutability Option. Wallet owners who prefer maximum immutability can invoke lockExtension(extensionId), permanently freezing an extension pointer. A locked extension can never be upgraded — the wallet operates with that implementation forever. This is irreversible and intended for high-security vaults where predictability outweighs evolvability.
8.4. Bundler Architecture: Permissionless with Reputation
8.4.1. Permissionless Operation
Any Aevum full node can operate as a Bundler. There is no registration requirement, no minimum stake, and no governance approval. A Bundler collects UserOps from the public mempool (or via direct submission from wallets), aggregates them into bundles, and submits the bundle to the EntryPoint contract as a standard Aevum transaction.
The Bundler's incentive is the gas margin: the difference between the gas fees collected from UserOps (or their Paymasters) and the actual gas cost of the on-chain bundle transaction. Bundlers compete on efficiency — more operations per bundle, lower overhead, faster inclusion.
8.4.2. Reputation Score
While operation is permissionless, the protocol maintains an on-chain reputation score for each Bundler address, computed only from on-chain-observable facts — self- and user-reported inputs are excluded from the score because they are Sybil-gameable (fabricated acceptances would inflate one's own score; fake reports would tank a competitor's). The score is computed from three metrics:
Inclusion Rate. For UserOps a Bundler has committed to include — via a signed, timestamped acceptance receipt handed to the sender — the fraction actually included on-chain within the committed window (3 blocks, ~15 seconds). Both sides of the ratio are on-chain-verifiable: the signed receipt commits the Bundler, and block contents prove inclusion or its absence. A high inclusion rate signals reliability.
Inclusion Latency. Measured as (on-chain confirmation block time − the timestamp inside the Bundler's signed acceptance receipt), so latency is anchored to a commitment the Bundler actually signed rather than to self-report. Lower latency earns higher reputation.
Incident History. On-chain-attributable negatives only: consensus slashing events, and provable drops (a signed acceptance receipt whose op was not included within its committed window — an on-chain fraud proof of censorship/dropping). Unverifiable "user-reported censorship" does not feed the score directly; an aggrieved user presents the signed receipt as a fraud proof (which is scored) or routes it through a separate staked-attestation dispute, but a bare, unbacked claim never moves any Bundler's score. Each proven incident decays the reputation score.
The reputation score is publicly queryable. Wallets and Paymasters can include an optional preferred_bundler field in UserOps, routing to high-reputation Bundlers for time-sensitive transactions (e.g., POS payments where the customer is standing at the counter). The protocol never restricts low-reputation Bundlers from operating — the market simply routes around them.
8.5. UserOperation Anatomy
A UserOperation on the Aevum ESC contains the following fields:
| Field | Type | Description |
|---|---|---|
sender |
address | The Smart Contract Wallet initiating the operation |
nonce |
uint256 | Anti-replay counter, verified by the wallet and consumed (incremented) by the EntryPoint during Phase-1 validation — before execution and regardless of execution outcome (see §8.2.2, §8.3.1) |
calldata |
bytes | Encoded function call(s) to be executed by the wallet (transfers, contract interactions, batch ops) |
callGasLimit |
uint256 | Gas budget for the execution phase |
verificationGasLimit |
uint256 | Gas budget for the validation phase (wallet + Paymaster verification) |
preVerificationGas |
uint256 | Gas to compensate Bundler for off-chain computation (mempool management, bundle construction) |
maxFeePerGas |
uint256 | Maximum base fee the operation is willing to pay (in Vea) |
maxPriorityFeePerGas |
uint256 | Maximum priority fee (tip) for the Bundler/validator |
paymasterAndData |
bytes | Paymaster address + arbitrary data for Paymaster validation. Empty if the sender pays gas directly |
signature |
bytes | ML-DSA-44 signature (or other scheme per wallet logic) over the UserOperation hash |
Gas Denomination. Gas is exclusively denominated in AEV (internally computed in Vea for precision). There is no multi-token gas support at the protocol level. Paymasters that wish to accept payment in other tokens (wBND, stablecoins, or any ERC-20-equivalent on Aevum) perform the conversion internally — swapping the received token for AEV via the AMM before paying the EntryPoint. This design keeps the consensus layer free of price oracle dependencies. A merchant that ultimately wants non-AEV settlement therefore bears the AMM swap cost (fee + slippage) and AEV volatility on top of the gas cost — quantified in the all-in note in §8.6.3.
8.5.1. UserOperation Hash and Domain Separation
The userOpHash that validateUserOp/executeUserOp receive, and over which the signature field is produced, is computed with explicit domain separation so that a signed UserOp is bound to exactly one EntryPoint instance, one chain, and one EntryPoint version. This is the construction the §8.9 "Signature Replay Across EntryPoint Versions" mitigation depends on; it is defined here rather than assumed:
userOpHash = SHA3-256( pack(op) ∥ EntryPoint_address ∥ chain_id ∥ entrypoint_version )
where SHA3-256 is the protocol hash primitive (Constants §5, hash.primary) and pack(op) is the canonical, fixed-width concatenation of every UserOperation field except signature:
pack(op) = sender ∥ nonce ∥ SHA3-256(calldata) ∥ callGasLimit ∥ verificationGasLimit ∥ preVerificationGas ∥ maxFeePerGas ∥ maxPriorityFeePerGas ∥ SHA3-256(paymasterAndData)
The two variable-length fields (calldata, paymasterAndData) are hashed to fixed length before packing, so no field boundary is ambiguous and no length-extension across fields is possible. Coverage rules:
- Covered (committed by the signature): all nine content fields above, plus the three domain-separation tags (
EntryPoint_address,chain_id,entrypoint_version). Changing any of them — including re-submitting the same op against a different EntryPoint version — yields a differentuserOpHash, so the prior signature no longer verifies. - Excluded: only the
signaturefield itself (it signs the hash and cannot commit to itself). Theentrypoint_versiontag is read from the EntryPoint the op is submitted to, not from an attacker-chosen field, so a v1 signature presented to v2 recomputes a v2 hash and fails verification. Cross-version and cross-chain replay are therefore structurally impossible.
Formal-review pending (ADR-0005 counter-sign).
8.6. Paymaster System
8.6.1. Registry with Two Balances: Slashable Stake + Gas Deposit
Paymasters register in an on-chain Paymaster Registry that tracks two distinct, independently-accounted AEV balances (following the ERC-4337 stake/deposit separation, for the reasons below):
- Stake — a time-locked, slashable bond. It is the anti-DoS / reputation collateral and is never spent on gas. Withdrawal is subject to an unbonding delay (recommended: 7 days; pending ADR-0005 ratification) so a Paymaster cannot slash-dodge by withdrawing between misbehavior and challenge.
- Gas Deposit — a spendable balance from which the EntryPoint debits the actual gas cost of each sponsored operation via
postOp. Paying gas draws down only the deposit; it never touches the stake.
A Paymaster must maintain both a minimum stake (to remain registered/operational) and a positive gas deposit (to sponsor the next op); the two are topped up and accounted separately. Conflating them would mean either slashing erodes gas-paying capacity or gas payments erode the anti-spam bond — which is exactly why they are kept apart. (Where later sections say a Paymaster's "deposited balance," they mean the gas deposit.)
Initial Stake. New Paymasters post a calibrated minimum stake (target: equivalent to ~1,000 average transaction gas costs; recommended, pending ADR-0005 ratification).
What is — and is not — slashable. Stake is slashed only for provable, attributable Paymaster-side misbehavior: approving a UserOp that violates the Paymaster's own on-chain-declared sponsorship invariants (e.g., sponsoring past a self-declared per-window cap, or approving a token/amount its published policy forbids). Stake is not slashed for a sponsored op that merely reverts during execution. The Bundler is already compensated for that op from the gas deposit (postOp charges the actual gas consumed), so a generic revert wastes no honest party's gas and warrants no additional penalty. Slashing generic reverts would be double jeopardy and a griefing lever — an attacker could craft ops that pass validation and then revert (state can legitimately change between validate and execute, §8.9) purely to bleed an honest merchant's stake. Attribution therefore runs through a fraud proof: a permissionless challenger submits the offending UserOp together with the specific declared invariant it violated; the EntryPoint re-checks that invariant deterministically on-chain and, only if the violation holds, slashes a fixed fraction of stake. Slashed stake is routed to the DAO Treasury (not to the challenger, to avoid rewarding spurious challenges) minus a bounded challenger bounty; a challenge that fails forfeits the challenger's own posted bond.
Formal-review pending (ADR-0005 counter-sign).
Reputation-Based Stake Reduction. As a Paymaster accumulates a track record of successful sponsorships without a sustained fraud proof, its minimum required stake (never its gas deposit) decreases according to a decay curve:
| Paymaster Age | Successful Sponsorships | Minimum Stake Multiplier |
|---|---|---|
| 0-3 months | < 1,000 | 1.0× (full stake) |
| 3-6 months | 1,000 - 10,000 | 0.7× |
| 6-12 months | 10,000 - 100,000 | 0.4× |
| 12+ months | > 100,000 | 0.2× (floor multiplier) |
Tier-selection rule (both axes required). Age and sponsorship count are two independent axes; a tier applies only when both its age and its count thresholds are met. When the two disagree — a 2-month-old Paymaster that has already reached 100,000 sponsorships, or a 2-year-old Paymaster with only 500 sponsorships — the more conservative (higher) multiplier governs. New but high-throughput operators thus keep full collateral until they have also aged, and slow long-lived operators are not pushed below their earned tier by low volume.
Volume-scaled floor. The 0.2× value is a multiplier floor, not an absolute-collateral floor. Because an established Paymaster's abuse blast radius grows with its throughput, the absolute minimum stake is max(0.2× · base_stake, k · rolling_sponsorship_volume) (with k recommended, pending ADR-0005 ratification), so the slashable collateral never shrinks below a bond proportional to the value the Paymaster currently sponsors. A merchant Paymaster reliably sponsoring for a year thus operates at the 0.2× multiplier while still bonding in proportion to its current volume — rewarding established operators without letting the largest sponsors run under-collateralized.
Interface. Every Paymaster must implement:
| Method | Purpose |
|---|---|
validatePaymasterOp(UserOperation, bytes32 userOpHash, uint256 maxCost) |
Validates whether the Paymaster agrees to sponsor this operation. Checks internal rate limits, QR nonce, sender whitelist, etc. Returns validation data. |
postOp(PostOpMode mode, bytes context, uint256 actualGasCost) |
Called after execution. Debits the actual gas cost from the Paymaster's gas deposit. Updates internal accounting (rate limit counters, EWMA/EWMVar trackers). |
8.6.2. Merchant Paymaster: Gas Absorption for Commerce
The core commercial innovation of the Aevum ESC is the Merchant Paymaster — a Smart Contract Wallet extension (Extension 0x06) that transforms a merchant's wallet into a gas sponsor for customer transactions.
When a customer purchases goods at a POS terminal, the transaction flow is:
- The POS terminal displays a payment QR code containing the merchant address, the merchant's Paymaster contract address, and the terminal-signed presence token of §8.7.1 (terminal ID, payment amount in AEV, unique QR nonce, timestamp, and the ML-DSA-44 signature σ).
- The customer's NMW (or any compatible wallet) scans the QR code, constructs a UserOperation with
paymasterAndDatapointing to the merchant's Paymaster, and includes the full signed token (terminal ID, amount, nonce, timestamp, σ) in the Paymaster data field. - The Bundler receives the UserOperation, verifies that the Paymaster has a sufficient gas deposit (§8.6.1) and an acceptable reputation score, and includes it in the next bundle.
- The EntryPoint calls the merchant Paymaster's
validatePaymasterOp(). The Paymaster verifies the token signature σ against the registered terminal key and the QR nonce (unique, recent, not-replayed), checks internal rate limits (EWMA-based, §8.7.2), and approves the sponsorship. - The EntryPoint executes the payment — AEV is transferred from the customer's wallet to the merchant's wallet. Gas is charged to the Paymaster's gas deposit (§8.6.1).
- The Paymaster's
postOp()updates internal rate limit counters and EWMA/EWMVar state. The customer pays zero gas. The merchant's effective cost per transaction is the micro-gas fee (~1-100 Vea, equivalent to ~$0.0001-$0.01 at LRP, §4.6.1), depending on operation complexity. Simple POS payments occupy the lower end of the range; complex operations with geofence proofs or batch transfers occupy the upper end. For context:
8.6.3. Cost Comparison: Traditional Acquiring vs. Aevum Paymaster
| Transaction Scenario | Transaction Value | Visa/MC Fee (2.5% avg) | Aevum Gas Cost (Vea) | Aevum Gas Cost (USD at LRP) | Merchant Savings | Savings % |
|---|---|---|---|---|---|---|
| Coffee | $5.00 | $0.125 | ~1-10 Vea | ~$0.0001-$0.001 | $0.124 | 99.2% |
| Grocery run | $150.00 | $3.75 | ~1-10 Vea | ~$0.0001-$0.001 | $3.749 | 99.97% |
| Electronics purchase | $2,000.00 | $50.00 | ~1-10 Vea | ~$0.0001-$0.001 | $49.999 | 99.998% |
| B2B invoice | $50,000.00 | $1,250.00 | ~1-10 Vea | ~$0.0001-$0.001 | $1,249.999 | 99.999% |
| Geofence-verified payment | $50.00 | $1.25 | ~10-100 Vea | ~$0.001-$0.01 | ~$1.24 | 99.2-99.9% |
| Monthly volume ($100K) | $100,000.00 | $2,500.00 | ~6,000-60,000 Vea (6,000 tx) | ~$0.60-$6.00 | $2,494-$2,499 | 99.7-99.97% |
Scope and all-in cost. The gas figures span the canonical ~1–100 Vea band (§4.6.1): simple POS payments sit at the lower end (~1–10 Vea), while operations carrying geofence proofs or batch transfers sit at the upper end (~10–100 Vea), matching the §4.6.1 classification — the earlier "~2-11 Vea" geofence figure understated this and is corrected above. The table prices gas only and assumes the merchant settles natively in AEV. A merchant who instead wants stable or non-AEV settlement must swap the received AEV via the AMM (§8.5), which adds a per-transaction AMM fee + slippage, plus AEV price risk on both the gas float and the posted stake — none of which appear in the columns above and any of which can dominate the gas cost on small tickets. For those merchants the comparison against an all-in ~2.5% card fee is not apples-to-apples; an all-in figure (gas + AMM fee/slippage + stake opportunity cost) must be used, and the headline savings percentages here apply strictly to AEV-native settlement.
8.7. Paymaster Anti-Abuse: QR Nonce + Adaptive EWMA Rate Limiting
The Merchant Paymaster model creates a specific attack surface: an adversary can attempt to drain the Paymaster's deposited gas balance by generating a high volume of sponsored transactions. The defense is layered:
8.7.1. Layer 1 — QR Nonce (Physical Presence Proof)
Each payment QR code generated by the POS terminal encodes a terminal-signed presence token. The terminal holds an ML-DSA-44 private key sk_terminal in its secure element; the corresponding public key pk_terminal is registered on-chain — bound to the merchant address and terminal_id — in the Paymaster's terminal registry during setup. No secret ever resides in contract storage; only the public key does.
At payment time the terminal draws a fresh random nonce, reads the current timestamp, and signs the payment context:
token=terminal_id∥amount∥nonce∥timestamp
σ=ML-DSA-44.Sign(sk_terminal, token)
The QR code carries the tuple {terminal_id, amount, nonce, timestamp, σ}.
The Paymaster's validatePaymasterOp() verifies the token by checking the signature against the public key registered for the claimed terminal_id — ML-DSA-44.Verify(pk\_terminal, token, σ). Because verification consumes only public data, an on-chain observer gains nothing that would let them forge a token. The verification checks:
- Uniqueness: The nonce has not been previously consumed (stored in a consumed-nonce mapping).
- Freshness: The timestamp is within an acceptable window (e.g., ±60 seconds of the current block time).
- Terminal Authenticity & Value Binding: The signature σ verifies under the public key registered for terminal_id, and the signed
amountequals the UserOperation's payment amount — so a captured token cannot be replayed against a different terminal or for a different value. This layer eliminates remote attacks entirely. An attacker cannot generate valid tokens without the terminal's private key sk_terminal, which never leaves the terminal's secure element — forgery therefore requires compromising the physical terminal, not merely reading public ledger state. The attack surface is reduced from "anyone on the internet" to "someone standing at the cash register."
8.7.2. Layer 2 — Adaptive Rate Limiting via EWMA + EWMVar
Per-block statistics are unusable for this detector. With 5-second blocks (17,280 blocks/day) a low-volume merchant's per-block mean is far below one — a coffee shop at 200 tx/day averages ≈0.012 sponsored tx/block — so a single legitimate sponsored transaction in a block sits many σ above that mean and would trip any per-block anomaly test (a peak-hour self-DoS, not an attack). The rate limiter therefore operates over a wall-clock sliding window sized to merchant throughput, and tracks a mean and a variance so that σ is actually defined (the prior specification named an EMA of volume but never defined the σ its thresholds used).
Let V_win(t) be the sponsored-transaction count in the current fixed wall-clock bucket (default 60 s; the merchant may set the bucket length to its own cadence). Over the stream of consecutive buckets the Paymaster maintains an exponentially-weighted mean and an exponentially-weighted variance (EWMVar):
μ(t) = α · V_win(t) + (1 − α) · μ(t − 1)
σ²(t) = α · (V_win(t) − μ(t − 1))² + (1 − α) · σ²(t − 1), σ(t) = √σ²(t)
where α is calibrated for a 7-day memory over the chosen bucket size (≈10,080 one-minute buckets), and σ(t) — the EWMA of squared residuals — is the previously-undefined dispersion the thresholds below use. A variance floor σ_min and a minimum burst allowance B_min (a token-bucket count of freely-sponsored transactions per window, defaulting to well above one) remove the sub-unity degeneracy: the detector never fires until observed volume exceeds both μ(t) + kσ(t) and B_min.
The rate limit is enforced as a statistical anomaly detector on the current window:
Deviation of V_win(t) from EWMA |
Paymaster Response |
|---|---|
≤ 2σ (and ≤ B_min) |
Normal operation — all valid UserOps are sponsored |
| 2σ - 3σ | Warning threshold — Paymaster logs the anomaly, continues operating, sends an alert to the merchant's Dashboard |
> 3σ (and > B_min) |
Circuit breaker — Paymaster rejects new sponsorships for the remainder of the current window, then resumes automatically in the next window if volume normalizes |
Peak-hour exemption / manual override. Because a legitimate rush (lunch service, a promotion, Black Friday) is itself an anomaly relative to the trailing mean, a purely statistical breaker could self-DoS an honest merchant at exactly the wrong moment. The merchant can therefore pre-authorize a scheduled high-volume window — a signed, time-bounded raise of B_min and the σ multiplier — and can issue a signed real-time override that lifts the breaker for a bounded interval. Both controls require the merchant/sovereign key, are logged on-chain, and remain bounded by Layer 3's absolute per-transaction gas cap (§8.7.3) and by the finite gas deposit, so an override can never uncap total exposure.
The mechanism stays self-calibrating: a coffee shop at 200 tx/day and a supermarket at 5,000/day learn different μ/σ, and a merchant that gradually grows from 200 to 500 tx/day sees μ track upward with no reconfiguration. What changed from a naïve per-block test is that anomaly is now measured over a throughput-sized wall-clock window against a defined variance, with a burst floor and an owner override, so organic peaks no longer read as attacks.
8.7.3. Layer 3 — Configurable Per-Transaction Limits
The merchant can set a maximum gas expenditure per individual UserOperation in the Paymaster configuration. This caps the damage from a single oversized transaction that somehow passes nonce and rate limit checks. Typical configuration: maximum gas per sponsored transaction = 2× the average gas cost of a standard payment transfer.
8.8. Complete POS Payment Flow
The end-to-end payment experience at a physical point of sale:
Step 1 — Terminal Display (Merchant Side). The POS terminal calculates the total (e.g., 12.50 AEV), generates a QR nonce, signs the §8.7.1 presence token, and displays the payment QR code on the terminal screen. Time: instantaneous.
Step 2 — QR Scan (Customer Side). The customer opens the NMW app, authenticates via biometrics (Touch ID / Face ID), and scans the QR code with the rear camera. The NMW decodes: merchant address, Paymaster address, and the signed token (terminal ID, amount, nonce, timestamp, σ). Time: ~1-2 seconds.
Step 3 — UserOperation Construction (NMW). The NMW constructs a UserOperation with the payment details, attaches the active Session Auth Token (SAT, Section 10.3) as signature, sets the merchant's Paymaster in paymasterAndData, and includes the full signed token in the Paymaster data. The NMW submits the UserOperation to its preferred Bundler (or the merchant's designated Bundler endpoint). Time: ~0.5 seconds.
Step 4 — Bundle and Submit (Bundler). The Bundler validates the UserOperation locally (signature check, gas estimation, Paymaster balance verification), includes it in the next bundle, and submits to the Aevum network. Time: ~1-3 seconds (next block inclusion).
Step 5 — On-Chain Validation and Execution (EntryPoint). The EntryPoint calls the customer wallet's validateUserOp() (verifies SAT + allowance limits via PartFund), then the Paymaster's validatePaymasterOp() (verifies nonce + rate limits), then executes the transfer. AEV moves from customer wallet to merchant wallet. Gas is charged to Paymaster. Time: ~5 seconds (1 block confirmation).
Step 6 — Confirmation (Both Sides). The POS terminal observes the on-chain confirmation (via WebSocket subscription to the Aevum node) and displays a success screen. The NMW displays a payment receipt with the TXID. Time: ~1 second.
Total End-to-End Time: ~8-12 seconds. Comparable to a contactless card tap (which takes 3-5 seconds at the terminal but 1-3 business days for actual settlement). Aevum achieves cryptographic finality in the same time a card achieves mere authorization.
8.9. Account Abstraction Threat Model
| Threat Vector | Attack Description | Mitigation | Residual Risk |
|---|---|---|---|
| Bundler Censorship | A Bundler selectively drops or delays UserOps from specific wallets or Paymasters | Permissionless Bundler market — censored users switch to any other Bundler. preferred_bundler field enables explicit routing. Reputation scoring penalizes unreliable Bundlers |
Coordinated censorship by all Bundlers — requires cartel formation, which is unstable in a permissionless market |
| Paymaster Drain (DoS) | Attacker generates high volume of sponsored transactions to exhaust a merchant Paymaster's deposited balance | QR Nonce eliminates remote attacks. EWMA+EWMVar rate limiter (§8.7.2) triggers a circuit breaker above the defined 3σ band and the B_min burst floor. Per-transaction gas cap limits individual operation cost |
Attacker with physical access to POS terminal generating transactions below the 3σ threshold — limited by physical-world rate (one scan every few seconds) |
| Griefing via Invalid UserOp | Attacker submits UserOps that pass Bundler simulation but fail on-chain, wasting Bundler gas | Bundler gas for a failed-execution op is paid from the Paymaster's gas deposit via postOp (the Bundler is compensated), so a revert wastes no honest gas. Bundler local simulation rejects obviously invalid operations. Paymaster stake is slashed only for a provable violation of the Paymaster's own declared invariants (§8.6.1 fraud proof) — never for generic reverts, which would double-charge and enable stake-bleeding griefing. Reputation system deprioritizes wallets with high failure rates |
Sophisticated griefing where on-chain state changes between validation and execution — inherent to any AA system; the Paymaster is not slashed for it (only the gas deposit pays the already-consumed gas), and short block times (5s) reduce state staleness |
| EntryPoint Vulnerability | A bug in the EntryPoint singleton allows unauthorized execution or fund extraction | EntryPoint is immutable and formally verified prior to deployment. Versioned deployment plus a per-wallet, sovereign-key-gated, 48h-timelocked migrateEntryPoint binding pointer (§8.2.1, §8.3.3) lets existing wallets opt into a patched version without redeploying or losing funds; old versions are never force-deprecated |
Zero-day in formally verified code — mitigated by bug bounty program and ecosystem-wide monitoring. Versioned architecture limits blast radius, and the migration pointer bounds the duration a wallet is exposed to a disclosed bug to one owner-initiated timelock |
| Front-Running UserOps | An attacker observes a pending UserOperation in the mempool and submits a competing transaction that manipulates state before the original executes | For payment transfers (the primary Aevum use case), front-running has minimal economic value — the state change is a simple balance transfer. For DEX interactions, standard front-running risks apply and are mitigated at the application layer (slippage limits, private mempools) | MEV extraction on DeFi UserOps — consistent with industry-standard risks, not unique to this architecture |
| Signature Replay Across EntryPoint Versions | An attacker replays a valid UserOperation signature on a different EntryPoint version | The userOpHash is computed with explicit domain separation over the EntryPoint address, chain_id, and entrypoint_version, covering every non-signature field (§8.5.1). A signature valid for EntryPoint v1 is invalid for EntryPoint v2. Cross-version replay is structurally impossible |
None, contingent on the §8.5.1 preimage covering every non-signature field — domain separation in hash computation eliminates replay |
| Malicious Wallet Extension | A compromised extension module (e.g., PartFund) is used to drain funds | Extensions operate within the wallet's execution context but are independently auditable. The base wallet's validateUserOp() executes before any extension logic. Critical invariants (total balance, ownership) are enforced in the base interface, not delegated to extensions |
Subtle extension bugs that pass validation but execute unintended transfers — mitigated by formal verification of standard extensions (PartFund, Social Recovery) and open-source auditability |
Account model defined — hardware root of trust next. Section 8 specified the on-chain smart contract wallet architecture. Section 9 specifies the off-chain device — the Arca hardware wallet — that generates the keys those contracts depend on, closing the custody model from protocol layer to physical layer.