ERC-7579 Modular Wallets for AI Agents: Validators, Hooks and Safe Module Removal. This article develops an original, practical test and cost framework for a specific AI/Web3 or data-economy decision. It distinguishes what an official specification says from assumptions that a business must supply itself. The worked examples are hypothetical, not observed market prices, published experiments or guarantees. Each section explains the decision, the evidence to collect and the reason an apparently successful implementation might still fail a real buyer or user.

Distinguish installed modules from permissions

ERC-7579 describes modular account components such as validators, executors and hooks. Installing a module can change wallet attack surface, but the advertised capability is not proof of safe authorization. An evaluation needs a testable boundary and the exact version of the component under review. Record who can authorize the operation, what observable result counts as success, and which information must not be collected. A demonstration with ideal inputs is useful for finding basic defects but cannot establish production safety. Compare a legitimate request with a deliberately invalid one, and treat the rejection path as part of the feature.

In a concrete review, Map each module’s callable functions and their consequences before activation. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Audit validator assumptions

A validator checks authorization under its own rules; a new signature scheme or policy can change security boundaries. Test both expected and deliberately malformed signatures. Keep terms, units and claims aligned. A protocol standard defines a vocabulary or mechanism; it does not guarantee an implementation’s correctness, a business outcome or legal rights. The acceptance evidence should include an example that succeeds, an edge case that fails, and a record of how the operator knows the difference. Design the test so a reviewer who did not build the system can repeat it.

In a concrete review, Reject invalid signer domains, expired authorizations and mismatched chain identifiers. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Control executor reach

An AI agent may suggest transactions, but an executor should not inherit unlimited spending rights from a text instruction. Model limits at the wallet and contract level. Reconcile evidence across layers instead of relying on a single status message. For money, compare initiation and settlement. For datasets, compare records delivered and records accepted. For credentials, compare authorization intent and executable permissions. Privacy-sensitive evidence can often be stored as metadata, timestamps and limited identifiers rather than whole payloads. Note residual uncertainty explicitly.

In a concrete review, Test per-action allowance and irreversible approval changes under an injected instruction. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Consider hook behavior on failure

Hooks can run around wallet actions and introduce dependencies or failure paths. Safety expectations should include what happens if a hook reverts or consumes excessive gas. Failure testing is valuable because production systems include partial operations, lost connections, stale caches and user withdrawal. In each case decide whether to retry, compensate, halt or seek human approval. Maintain a state machine that prevents the same irreversible action from being performed twice. Where an earlier decision is later reversed, preserve an understandable audit trail and notify affected parties appropriately.

In a concrete review, Create fixtures that fail before and after an external call. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Design module uninstall and recovery

A risky module must be removable without losing the ability to sign safe recovery operations. Uninstall sequence and account lockouts deserve their own tests. An economic calculation is only meaningful if its assumptions are visible. Write quantities and units beside every input: currency, number of users, accepted records, time, or computing events. Distinguish measured figures from assumed scenario parameters and run a high-cost as well as a low-cost case. A number cannot be represented as an official industry benchmark merely because it comes from a spreadsheet.

In a concrete review, Walk through a lost-key recovery and check that old permissions are revoked. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Use an operational security gate

Before deploying modular accounts, record code identifiers, audit scope, security owner, recovery plan and a test report. A specification cannot replace code-specific review. At the release gate, require an owner to sign off the observed behavior, known gaps, rollback process and user-facing explanation. Track unintended effects as well as the preferred metric. In particular, a protocol-compliant transaction may still be economically unfavorable or misleading about intellectual-property permissions. Retest after a policy, contract or implementation change; do not silently inherit earlier approval.

In a concrete review, Reconcile call traces and events from both normal and attacker-controlled inputs. Keep the decision criteria in a dated, version-controlled worksheet and test an adverse input as well as the expected path. This is where the choice becomes inspectable rather than rhetorical: the measured outcome, the assumptions, and the unanswered questions should be separately identifiable. When evidence is missing, describe the uncertainty rather than fill it with an invented number.

Sources and scope

Technical and methodological foundations: ERC-7579 Modular Smart Accounts and ERC-4337 Account Abstraction. These directly relevant primary specifications were checked on 21 November 2026; when a continuously updated page does not show a publication date, none is inferred. The pricing figures and test conditions in this article are explicitly illustrative, and any production use requires validation against the specific contract and implementation.

Sources: ERC-7579 Modular Smart Accounts; ERC-4337 Account Abstraction.