---
id: TIP-1107
title: Configurable Accounts
description: Configurable accounts whose weighted owners and approval threshold can change while the address stays the same.
authors: Tanishk Goyal (@legion2002), Jake Moxey (@jxom)
status: Draft
related: TIP-1113, TIP-1111, TIP-1154, TIP-1000, TIP-1020
protocolVersion: T14
---

# TIP-1107: Configurable Accounts

## Abstract

This TIP adds configurable accounts, a new account type that separates ownership from account identity. A configurable account is a native account with a fixed address, up to 48 owners, and configurable keys and signing policies. This flexible account model enables shared ownership, multi-party approvals, account recovery, key rotation, and, in the future, post-quantum account security.


## Motivation

Today a Tempo account is controlled by one permanent root key. The root key can authorise access keys that spend on its behalf, which enables limited forms of delegation and account recovery. However, if the root key itself is lost, the account can't be recovered. If it leaks, the owner has to migrate to a new address, move assets, re-approve applications and reissue access keys.

Configurable accounts separate account ownership from account identity, so that the private keys that control an account can change, while its address, balances, token approvals, roles and access keys are preserved.

Beyond recovery and migration for single-owner accounts, there are meaningful use cases for shared ownership of a single account with multiple approvers. For example, a company might require two of three executives to approve payments from a treasury wallet. A common tool for this is a "multisig" smart contract wallet like Safe, but smart contract wallets can't use native Tempo account features like access keys. Configurable accounts bring flexible weighted signing policies and multi-party approvals to native Tempo accounts.

Finally, this TIP also enables migration to new key types, laying a foundation for Tempo accounts to adopt post-quantum signing. 

This TIP is the entry point for the feature. [TIP-1113](./tip-1113.md) lets existing accounts migrate in place, and [TIP-1111](./tip-1111.md) covers access keys. The three activate together at T14.

---

# Specification

## Overview

**Terms.** These terms have the same meaning in all three TIPs.

| Term | Meaning |
|---|---|
| Owner | A key that can sign an approval for the account, subject to its configured ownership threshold. |
| Approval | One owner's signature over a transaction or message for the account. |
| Configuration | The account's salt, version, threshold and owner list. |
| Quorum | A set of approvals whose owners' weights add up to at least the configuration threshold. |
| Configurable-account signature | The signature format for these accounts, type byte `0x05`. It includes the account, the full configuration and the quorum's approvals. |
| Commitment | The 32-byte hash of the current configuration, stored in the account leaf. Zero means the account is not registered. |
| Registration | The first write of the commitment to the account trie, made during the account's first included transaction. |
| Owner update | A configuration update that changes the owners or threshold. It writes a new commitment and increases the version by one. |
| Derived address | A new account's address, computed by hashing its first configuration. |
| Original key | The private key that controlled an existing account before it became configurable under TIP-1113. |

**Lifecycle**

Alice configures her account with three owners and a threshold of 2:

| Owner | Weight |
|---|---|
| Alice's passkey | 2 |
| Her wallet provider | 1 |
| An independent recovery provider | 1 |

Alice can approve anything alone, using her passkey. Neither provider can act alone. Together, the providers can replace her passkey, and they can also spend her funds.

1. **Create.** The wallet hashes the configuration and uses it to derive Alice's address. Derivation needs no transaction. The address can receive funds before it is registered. Until then, it's only safe to send small amounts ([Counterfactual funding](#counterfactual-funding)).
2. **First transaction.** Alice registers the account using a fee-sponsored transaction. Her wallet sends a configurable-account signature containing the configuration and her passkey's signature. The protocol checks that the configuration hashes to her address and that her weight meets the threshold. It then writes the commitment and installs the account's code marker. Alice verifies the committed owners, weights and threshold onchain before sharing the address for deposits.
3. **Later transactions.** Alice receives funds and pays a merchant. The protocol checks the configuration in each signature against the stored commitment to authorize each transaction.
4. **Recovery.** Alice loses her phone and makes a new passkey. Both providers sign a transaction calling `updateConfig` to replace the old passkey. Their combined weight, 2, meets the threshold. The version goes from 0 to 1, so nothing signed for version 0 works any more, including signatures from the lost passkey. Alice's address, balances and approvals don't change.

## Mechanics

### Configuration

A configuration has four fields: `salt` (32 bytes), `version` (uint64), `threshold` (uint8) and `owners`, a list of (address, weight) pairs.

A configuration MUST satisfy all of these rules:

- It has 1 to 48 owners.
- Owner addresses are nonzero, unique and in ascending order.
- Each weight is at least 1, and all weights together add up to at most 255.
- The threshold is 1 to 255.
- The eight largest weights add up to at least the threshold, i.e., a quorum can be reached with eight signatures.

Each owner update increases the `version` by exactly one.

### Address derivation

A new account's address is the last 20 bytes of a hash of its version-0 configuration:

```text
account = last20(keccak256(
  "tempo:configurable-account:account" || salt || uint8(threshold) || uint8(owner_count) ||
  owner[0].address || uint8(owner[0].weight) || ...
))
```

Every hash in this TIP concatenates raw bytes, with no RLP, ABI padding or added chain ID: domain strings are raw ASCII, the salt and `inner_digest` are 32 bytes, each address 20 bytes, each `uint8` one byte, each `uint64` eight bytes big-endian, and owners are in sorted order.

Binding the address to the version-0 configuration means only the initial owners can register it. The configuration an address is derived from MUST NOT list that address as an owner.

A derived address MUST be rejected if it is zero, a virtual address, an active precompile, a TIP-20 token or a ZonePortal contract.

#### Counterfactual funding

Use counterfactual multisigs only for low-value funds, where skipping the registration transaction saves gas. Whoever chose the salt can search, in roughly 2^80 work, for an EOA key whose address matches the multisig's. They do this before any funds arrive, so keeping the window short doesn't help: the key can take whatever reaches the address before registration.

For high-value funds, register the account before funding it and verify its owners, weights and threshold onchain. Registration stops the colliding key from acting on Tempo from then on, but not what it did before: access-key grants and token allowances it created survive registration. No onchain check proves the key never acted, since 2D and expiring nonces leave the account nonce at 0. Don't put high-value funds in a counterfactual multisig whose salt or configuration someone else chose.

Registration covers Tempo at once. Zones follow Tempo with a delay: a zone applies a Tempo change only after it processes the Tempo block with that change ([TIP-1154](./tip-1154.md)). Registration covers a zone from then on. The colliding key still controls the address on other EVM chains, and applications that use `ecrecover` without checking for code can still accept it; see [TIP-1113](./tip-1113.md).

The same 2^80 collision bound applies to every Ethereum address, and Ethereum has the same risk when funds are sent to a CREATE2 contract before it is deployed ([EIP-3607](https://eips.ethereum.org/EIPS/eip-3607)). EIP-3607 estimated the attack at about $10 billion of compute in 2021. That puts it out of reach except against very large targets, though it gets cheaper every year.

### Signature format

A configurable-account signature is `0x05` followed by an RLP list:

```text
signature = 0x05 || rlp([account, config, approvals])
config    = [salt, version, threshold, owners]
owner     = [address, weight]
```

`approvals` consists of 1 to 8 primitive Tempo signatures: secp256k1, P256 or WebAuthn. Each signature is at most 2,049 bytes. Each owner signs:

```text
configurable_account_digest(inner_digest, account, version) =
  keccak256("tempo:configurable-account:signature" || inner_digest || account || uint64(version))
```

For a direct transaction, `inner_digest` is the transaction's existing signing hash. TIP-1111 defines `inner_digest` for access-key use. Including the account and version means an approval can't be replayed on another account, or on the same account after an owner update.

Decoding rules:

- RLP MUST be canonical, with no trailing fields. A signature that exceeds the approval count or size limits is rejected before any approval is verified.
- A 65-byte approval is decoded as secp256k1, whatever its first byte.
- An approval MUST NOT itself be a configurable-account signature or an access-key signature.
- Before T14, signature type `0x05` MUST be rejected in every context.

### Registration

Registration writes an initial configuration commitment to the account trie, installs the [account code marker](#account-code), and makes the configurable-account precompile emit [`ConfigurableAccountConfigUpdated`](#interfaces) with the version-0 configuration. It runs after validation and fee collection succeed, but before any call runs. It covers every configurable account that signed the transaction and still has a zero commitment. That includes accounts granting or using access keys under TIP-1111.

The write and the event happen outside the transaction's rollback checkpoint, like `KeyAuthorized` for an inline key authorization, so the event stays in the receipt when the calls revert or halt. Calls see the write from their first step.

Logs from an inline `key_authorization`, such as `KeyAuthorized`, come first. Registration events follow in role order: the transaction signer (the sender, or the access-key delegate whose signature authorizes the transaction), then the key-authorization signer. An account in several roles registers and emits once, at its first role.

| Outcome | Registration and its event | Call changes |
|---|---|---|
| Transaction invalid | Not written | Not run |
| Included, calls succeed | Kept | Kept |
| Included, calls revert or halt | Kept, with its event | Rolled back, including owner updates and their events |

Rolling back an owner update MUST preserve registration from the same transaction. The commitment returns to the version-0 hash, never to zero, and the code marker stays.

Receiving funds, computing an address, or verifying its signatures does not register the account. An account can be registered even if it has an existing balance, storage or a nonzero nonce. Registration during RPC simulation affects only the simulation's temporary state.

### Authorization

The protocol checks every configurable-account signature in a transaction separately, in two steps. A transaction can include up to two such signatures: one authorizing the transaction itself and one authorizing an access key grant under TIP-1111. 

**1. Validate the quorum.** This step requires no account state. Nodes MAY run it during sender recovery and cache the result, as they already do for access-key signatures:

1. Recover each approval's signer from the digest.
2. Require the signers to appear in strictly ascending address order.
3. Require every signer to be an owner in the signature's configuration.
4. Add up their weights in approval order:
   - The sum of approval weights at the last approval MUST equal or exceed the threshold.
   - Reject a total below the threshold.
   - Reject the quorum if the total minus the smallest approval weight still equals or exceeds the threshold, so that every approval is needed and none can be removed from a valid signature.

**2. Validate the configuration.** This step reads the account state at the transaction's position in the block, and checks that the provided configuration matches the onchain commitment:

1. Check the leaf's `codeHash`. With a zero commitment it MUST be `keccak256("")`. With a nonzero commitment it MUST be `keccak256(0xef)`, the [account code marker](#account-code). Reject any other code hash, including an EIP-7702 delegation. This check loads no code bytes.
2. If the account commitment is zero:
   - require version 0
   - require the configuration's derived address to equal `account`
   - require the configuration's hash, which registration stores as the commitment ([Commitment storage](#commitment-storage)), to be nonzero.
3. If the commitment is nonzero, require the configuration's hash to exactly equal the commitment.

Passing the quorum check in step 1 alone does not establish authority over the account, since the stateful validation in step 2 must also succeed. Software outside consensus that authenticates users, such as an RPC login, MUST perform the stateful checks in step 2 too, and the access-key checks in TIP-1111 when the signature uses an access key. When accepting an ordinary signature as account authority, they MUST also apply [TIP-1113's retirement check](./tip-1113.md#retirement-check).

### Commitment storage

The commitment is:

```text
commitment = keccak256(
  "tempo:configurable-account:config" || salt || uint64(version) ||
  uint8(threshold) || uint8(owner_count) ||
  owner[0].address || uint8(owner[0].weight) || ...
)
```

The commitment is stored in the account trie leaf. The leaf is the per-account record in Tempo's state, so the commitment is available whenever the account is loaded:

```text
not registered: rlp([nonce, balance, storageRoot, codeHash])
registered:     rlp([nonce, balance, storageRoot, codeHash, 0x00 || commitment])
```

The fifth field is exactly 33 bytes: a layout tag `0x00`, then the 32 byte hash, which MUST be nonzero. Unregistered accounts keep the existing four-field encoding byte for byte; a zero commitment is never encoded as a fifth field. Decoders MUST reject any other tag, a zero hash, malformed fields and extra fields. They MUST reject the five-field form before T14.

Only registration, owner updates and migration (TIP-1113) may write the commitment. Ordinary storage writes, contract creation, delegation and account clearing MUST NOT change or clear it.

A registered account MUST NOT be deleted as empty, even if its other fields would allow it. EVM execution treats it as existing:

- Registration and migration install the [account code marker](#account-code), so its `codeHash` is `keccak256(0xef)`.
- `CALL` or `SELFDESTRUCT` naming it as recipient charges no new-account cost.

State roots, account proofs, execution witnesses and snapshots MUST preserve the commitment. Historical replay, rollback and reorgs MUST restore its value for the selected state.

JSON-RPC request parameters and existing response fields don't change. Responses use the request's selected state, including historical reads, and the encoding active at that block. A nonzero commitment makes an account present even if its balance and nonce are zero.

- `eth_getAccount` and `eth_getAccountInfo` return an optional `extension` field: `0x00 || commitment` as 33 bytes of `DATA`, omitted when the commitment is zero.
- `debug_accountAt` and `debug_accountInfoAt` follow the same rule where they are exposed.
- `eth_getProof` and `eth_getMultiProof` include the fifth field in their leaf proof nodes. Their summary fields don't change.

### Owner updates

To change the configuration of an account, its owners may call `updateConfig(current, threshold, owners)` on a new configurable-account precompile to replace the caller's owners and threshold.

The transaction MUST be signed directly by the current quorum. The call MUST be one of the transaction's own top-level calls, not a call made by a contract, with `msg.sender == tx.origin`. Access keys, contract callbacks and fee-payer signatures cannot authorise an update.

The precompile:

1. Checks `current` against the commitment at call time.
2. Keeps the salt and sets the version to `current.version + 1`, rejecting overflow.
3. Validates the new configuration, computes its hash and rejects zero.
4. Stores the hash and emits `ConfigurableAccountConfigUpdated`.

A batch may contain several updates. Each one checks the configuration left by the one before, so versions stay consecutive, and the original quorum's signature covers the whole batch. If any top-level call in the batch reverts or halts, every update and its event roll back. Registration from the same transaction stays.

Rotation MUST preserve the address, balances, nonce state and access-key grants. Revoking grants is a separate step under TIP-1111.

Errors:

- An unauthorized caller gets `UnauthorizedConfigurableAccountCaller`, before anything else is checked.
- A stale `current`, a zero hash or a version overflow gets `InvalidConfig`.
- An invalid new configuration fails on the first rule it breaks, in this order:

| Invalid input | Error |
|---|---|
| Empty owner list | `InvalidConfigurableAccountOwner` |
| More than 48 owners | `TooManyOwners` |
| Threshold outside 1–255 | `InvalidThreshold` |
| Zero owner address | `InvalidConfigurableAccountOwner` |
| Zero weight | `InvalidWeight` |
| Duplicate owner | `DuplicateOwner` |
| Owners out of order | `InvalidOwnerOrder` |
| Weights add up to more than 255 | `InvalidWeight` |
| Threshold not reachable with eight owners | `InvalidThreshold` |

### Verification from contracts

TIP-1020's `SignatureVerifier` precompile adds `verifyConfigurableAccount(account, hash, signature)`. Registered accounts also implement ERC-1271 `isValidSignature` through their [account code marker](#account-code), which calls this function. It runs both authorization steps against state at call time, with owners signing `configurable_account_digest(hash, account, version)`. It never writes state or registers an account, and it works under `STATICCALL`.

| Outcome | Result |
|---|---|
| Account mismatch, commitment mismatch, address-derivation failure, or account code other than empty (unregistered) or the account code marker (registered), including EIP-7702 delegation | Returns `false` |
| Encoding or configuration error | Reverts with `InvalidFormat()` |
| Quorum error | Reverts with `InvalidSignature()` |
| Valid | Returns `true` |

The caller supplies `hash`. The verifier proves only that the current owners approved it. As with `ecrecover`, the application is responsible for domain separation, chain scope and replay protection. The stateless `recover` and `verify` functions do not accept `0x05`.

### Account code

Many contracts decide how to check a signature by looking for code. An address without code is checked with `ecrecover`, and an address with code invokes ERC-1271 `isValidSignature`. Permit2 and common `SignatureChecker` libraries accept arbitrary-length signatures only through ERC-1271. So a registered configurable account carries one byte of code:

```text
code     = 0xef
codeHash = keccak256(0xef)
```

`0xef` is the marker Tempo already installs at its precompile addresses. [EIP-3541](https://eips.ethereum.org/EIPS/eip-3541) prevents ordinary contract creation from deploying code that starts with `0xef`, so only the protocol can install it. The commitment in the account leaf stays the source of the account's type and authority. Every configurable account shares the same code hash, so code entries stay deduplicated and authorization never fetches code.

Installation:

- Registration and TIP-1113 migration install the marker in the same step as the commitment write, with the same rollback boundary. Registration's marker persists through execution failure. A failed migration rolls back both.
- Owner updates change only the commitment. The marker and code hash stay the same.
- The marker MUST NOT be installed, changed or cleared any other way. Contract creation, EIP-7702 delegation, `SELFDESTRUCT` and account clearing cannot modify it.
- Installation stores the shared one-byte code entry and charges no code-deposit cost beyond the commitment write.
- Unregistered derived accounts have empty code until their first included transaction registers them.

A nonzero commitment and the marker always appear together. Precompiles use the same code marker, so nodes identify a configurable account from its commitment, not from its code.

A call to a registered configurable account runs the configurable-account precompile in the account's context. `address(this)` is the account, and the call cannot write state:

| Calldata | Result |
|---|---|
| `isValidSignature(bytes32 hash, bytes signature)` | Run `verifyConfigurableAccount(address(this), hash, signature)`. Return `0x1626ba7e` for `true` and `0xffffffff` for `false`, and propagate its reverts. |
| `onERC721Received(address, address, uint256, bytes)` | Return `0x150b7a02`. |
| Empty | Succeed with empty return data. |
| Anything else, including malformed arguments | Revert with empty data. |

- `isValidSignature` charges `verifyConfigurableAccount`'s costs. Other paths charge only ordinary call costs.
- The account has no other functions, fallback handler, storage or upgrade path. Adding a hook or interface requires a protocol upgrade. Because the marker carries no logic, an upgrade can change account behaviour without rewriting accounts.
- `DELEGATECALL` and `CALLCODE` to the account run the same table in the caller's context, so `isValidSignature` checks the caller's address and fails unless the caller is that registered account.
- ERC-721 safe transfers call `onERC721Received` on any address with code. On Tempo that covers ERC-8004 agent registration, name registries and Uniswap v4 position transfers, so the receiver is included. ERC-1155 receivers and ERC-165 are left out so the protocol doesn't enshrine more token standards. A protocol upgrade can add them later.

Other code-dependent rules:

- `EXTCODESIZE` returns 1, `EXTCODEHASH` returns `keccak256(0xef)` and `EXTCODECOPY` copies `0xef`.
- `CREATE` and `CREATE2` to a registered account fail under [EIP-684](https://eips.ethereum.org/EIPS/eip-684)'s collision rule.
- EIP-7702 authorization-list entries for a registered account are skipped, as for any account with non-delegation code. TIP-1113's retirement checks still apply.
- The [EIP-3607](https://eips.ethereum.org/EIPS/eip-3607) rejection of senders with code doesn't apply to a registered account authorised by its configurable-account signature, or by TIP-1111 access as the parent. An ordinary signature naming the account remains subject to TIP-1113's retirement check.

### Gas

Hashing `n` bytes costs `K(n) = 30 + 6 × ceil(n / 32)`, and `calldata_gas` uses the active calldata schedule. Checking a configurable-account signature costs:

```text
V = calldata_gas(rlp(account) || rlp(config))
  + configuration_proof_cost
  + K(96)
  + Σ approval_cost
```

- **`configuration_proof_cost`** is `K(75 + 21 × owner_count)` for a registered account. For an unregistered account it is `K(68 + 21 × owner_count)` for the address plus `K(75 + 21 × owner_count)` for the commitment. The fixed lengths include the 36-, 34- and 33-byte domain strings, and each owner adds 21 bytes.
- **`approval_cost`** is 3,000 for secp256k1 and 8,000 for P256 or WebAuthn. WebAuthn also pays its existing data calldata charge.
- A transaction adds `V − 3,000` to intrinsic gas. Ordinary intrinsic gas already includes one 3,000 base signature, so it is subtracted exactly once.
- Reading the commitment of an already loaded account costs nothing extra. Direct authorization adds no separate precompile storage read and no keychain processing charge.
- The [retirement check](./tip-1113.md#retirement-check) loads each distinct authority account other than the sender (separate fee payer, key-authorization signer, access key) and charges one EIP-2929 account access for it: 2,600 gas cold, 100 warm.
- **Registration** adds TIP-1000's cost for a new state element, 250,000 gas, to intrinsic gas, once per account across all roles. It also adds the registration event's log cost, once per account across all roles. The event has two topics (its signature and `account`) and `160 + 64 × owner_count` bytes of ABI data, so it costs `375 + 2 × 375 + 8 × (160 + 64 × owner_count) = 2,405 + 512 × owner_count`. If registration creates the account (zero nonce, zero balance, no code), it also adds TIP-1000's new-account cost.
  - The sender skips that cost only when another TIP-1000 charge already pays for creating it.
  - With `nonce_key == 0`, the `nonce == 0` charge creates it.
  - With a 2D or expiring nonce, a first-call `CREATE` from an account with nonce zero creates it.
  - A 2D-nonce `nonce == 0` charge pays for the new nonce-key slot, not the account, so it doesn't count.
- **An owner update's write** costs 5,000 gas. Commitment writes neither use nor create TIP-1060 storage credits, have no clearing refund, and carry no extra storage-slot charge.
- **`verifyConfigurableAccount`** charges precompile input and account-access costs plus `V`, without the 3,000 subtraction or any registration cost.

Intrinsic gas and fee affordability are computed before any signature is checked. Invalid transactions pay no fees, so unpaid verification work is limited to eight approvals per configurable-account signature, at most two such signatures per transaction, and an optional secp256k1 fee-payer signature.

For example, eight P256 approvals cost 64,000 gas for signature checks alone, or 69,600 with a cold secp256k1 fee payer (3,000 for its signature, 2,600 for its account access). Configuration hashing, calldata and WebAuthn data come on top. A transaction that also grants and uses an access key under TIP-1111 can carry two quorums and a fee payer: with a cold delegate and a cold fee payer, 16 × 8,000 + 3,000 + 2 × 2,600 = 136,200 gas.

### Supported contexts

From T14, a configurable-account signature is accepted in three places:

- **As a transaction's outer signature.** The account is `tx.from`, `tx.origin` and the top-level `msg.sender`. The quorum authorises every call in the batch, and existing nonce, fee-token and sponsorship rules apply.
- **Inside access-key signatures and access-key grants**, under TIP-1111.
- **In `verifyConfigurableAccount`.**

It is rejected everywhere else:

- **Fee payers.** A separate fee payer still signs with secp256k1. Sponsoring gives it no authority over the account. A configurable account can pay its own fees or be sponsored, but it can't sponsor others.
- **Authorization lists.** An EIP-7702 or Tempo authorization-list entry signed with `0x05`, directly or inside an access-key envelope, makes the transaction invalid. This holds before and after T14. Entries with ordinary signatures keep their existing rules, plus TIP-1113's retirement check.
- **Permits and vouchers.** There is no `0x05` format for TIP-20 `permit` or payment-channel vouchers. A configurable account can fund a channel, but it must name an ordinary `authorizedSigner` for vouchers when opening it. Owner updates don't change that signer; changing it means closing and reopening the channel. Configurable-account approvals stop being valid after an owner update, so they can't back vouchers until a timelock exists.
- **Zones.** Zones accept `0x05` under [TIP-1154](./tip-1154.md), checked against the account's commitment in the latest Tempo block the zone has processed. They reject `updateConfig` and TIP-1113's `upgradeAccount`: owners update and migrate only on Tempo.

The transaction format gains no fields. Transactions without `0x05` signatures are unchanged.

### Transaction pool

A pending transaction stays valid only while every configurable account it depends on keeps the commitment it was validated against. After each block, and when a reorg changes the canonical chain, clients MUST:

- Find every account whose commitment changed, by comparing commitments in the resulting state with the previous state, including commitments a reorg restores. Events aren't enough, because a reorg can restore an earlier commitment without emitting one.
- Revalidate or evict every pending transaction in which a changed account is the sender, the fee payer, the signer of an attached `key_authorization`, or the access-key delegate (`key_id`) whose signature authorizes it.

## Interfaces

The configurable-account precompile is at `0xAACC000000000000000000000000000000000000` from T14. TIP-1113 adds `upgradeAccount` to it.

```solidity
interface IConfigurableAccount {
    struct ConfigurableAccountOwner {
        address owner;
        uint8 weight;
    }

    struct ConfigurableAccountConfig {
        bytes32 salt;
        uint64 version;
        uint8 threshold;
        ConfigurableAccountOwner[] owners;
    }

    /// @notice Computes a new account's address from its version-0 configuration.
    /// @dev Charges ordinary precompile and input costs plus the address hash.
    /// @return account The derived address.
    /// Reverts with the Owner updates configuration errors for an invalid configuration,
    /// or InvalidAccount for a reserved address.
    function deriveAccount(bytes32 salt, uint8 threshold, ConfigurableAccountOwner[] calldata owners)
        external pure returns (address account);

    /// @notice Returns an account's commitment.
    /// @dev Charges ordinary precompile and input costs plus normal account access. Zero means the account is not registered.
    function getConfigCommitment(address account) external view returns (bytes32 commitment);

    /// @notice Replaces msg.sender's owners and threshold.
    /// @param current The configuration matching the current commitment.
    /// @param threshold The new threshold.
    /// @param owners The new owners, sorted by address.
    /// Reverts per the Owner updates errors.
    function updateConfig(
        ConfigurableAccountConfig calldata current,
        uint8 threshold,
        ConfigurableAccountOwner[] calldata owners
    ) external;

    /// Emitted at registration (version 0) and on every owner update.
    event ConfigurableAccountConfigUpdated(
        address indexed account,
        bytes32 salt,
        uint64 version,
        uint8 threshold,
        ConfigurableAccountOwner[] owners
    );

    error InvalidAccount();
    error InvalidConfig();
    error InvalidThreshold();
    error InvalidConfigurableAccountOwner();
    error InvalidWeight();
    error TooManyOwners();
    error DuplicateOwner();
    error InvalidOwnerOrder();
    error UnauthorizedConfigurableAccountCaller();
}
```

Added to TIP-1020's `SignatureVerifier`:

```solidity
/// @notice Returns true if the account's current owners approved `hash`.
/// Reverts with InvalidFormat() or InvalidSignature(); returns false per the verification table.
function verifyConfigurableAccount(address account, bytes32 hash, bytes calldata signature)
    external view returns (bool);
```

`updateConfig` charges ordinary precompile, input and event costs, the two configuration hashes, and the commitment write.

A registered configurable account behaves as this contract (see [Account code](#account-code)):

```solidity
interface IConfigurableAccountCode {
    /// ERC-1271. Returns 0x1626ba7e when verifyConfigurableAccount(address(this), hash, signature)
    /// returns true and 0xffffffff when it returns false; propagates its reverts.
    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4);

    /// ERC-721 receiver. Always returns 0x150b7a02.
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data)
        external view returns (bytes4);
}
```

# Compatibility

| Integration | What changes |
|---|---|
| Wallets and SDKs | The chain stores only the commitment, so the wallet must keep the full configuration. Wallets must support collecting approvals independently and combining them in owner-address order, leaving out any approval the quorum does not need. Changing any signed value, including an owner update's version, needs fresh approvals. Before submitting, recheck the commitment, nonce and validity window. Before creating an account or approving an update, check that the owners can actually reach the threshold. |
| Deposit flows | Register derived accounts and verify their committed owners, weights and threshold before they receive high-value deposits. |
| Gas estimation | Cost depends on which owners sign and with which key type, so simulation needs the configuration and the planned signers. Simulation applies the same authorization rules and reports the state it used. |
| Transaction pools | Revalidate pooled transactions when any signer's commitment changes, including on registration and after reorgs (see [Transaction pool](#transaction-pool)). Reorgs restore commitments without events, so pools must watch state, not events. |
| TIP-20 approvals | Use a quorum-signed `approve`. There is no configurable-account `permit`. Permit2 signature transfers work for registered accounts through ERC-1271. |
| Contracts checking signatures | Registered accounts answer ERC-1271 `isValidSignature`, so Permit2 and `SignatureChecker`-style verifiers work unchanged. Owners sign `configurable_account_digest(hash, account, version)`, not the bare application `hash`. An unregistered derived account has no code, so verifiers fall back to `ecrecover` and reject the `0x05` signature; it must send a registering transaction first. Contracts can also call `verifyConfigurableAccount` directly. |
| Contracts that check for code | Registered accounts look like contracts to code-size checks. Contracts that reject callers or recipients with code, or send them ERC-1155 tokens with safe transfers, reject or revert for these accounts. |
| Payment channels | Name an ordinary `authorizedSigner` at opening. Owner updates don't change it; to change it, close and reopen the channel. |
| Zones | A zone applies an owner update once it processes the Tempo block with the update ([TIP-1154](./tip-1154.md)). Wait for that before using the new configuration there. |
| Other chains | Warn users that funds sent to a derived address on another chain are lost. For accounts that need recovery, use TIP-1113's recovery flow. Contracts on Tempo should not treat a message signed for the same address on another chain as approval by the Tempo account. |
| Proof consumers | Decode the optional fifth leaf field. `getConfigCommitment` returns the hash without proof decoding. Historical reads use the encoding active at the requested block. |

# Observability

| Event | Fields | Question it answers |
|---|---|---|
| `ConfigurableAccountConfigUpdated` (MUST be emitted at registration with version 0 and on each owner update) | `account` (indexed), `salt`, `version`, `threshold`, `owners` | What is the account's configuration after registration or this update? |

Registration emits `ConfigurableAccountConfigUpdated` with version 0. Three things show it happened, and all survive a failed transaction: that event, the configuration inside the first included transaction's signature, and the nonzero commitment in state. A reverted transaction can still register an account, so execution status alone doesn't show registration.

To find the current configuration:

1. Take the configuration from the version-0 `ConfigurableAccountConfigUpdated` event or the first transaction's signature, or from `AccountUpgraded` under TIP-1113.
2. Apply each later `ConfigurableAccountConfigUpdated` event.
3. Check the result against `getConfigCommitment` at the chosen block. A later update may have superseded an event.

A failed batch leaves no update events beyond registration's. `verifyConfigurableAccount` leaves no evidence beyond its return value.

# Threat Model

This threat model covers who can act for a configurable account and what checking its signatures costs. Planned follow-ups, out of scope for T14: post-quantum safety, recovery operators with limited roles, and timelocks or dead-man switches. Until then, a recovery provider is an ordinary owner with full authority.

Some risks come from no actor and are accepted by the design. An account whose owners can no longer reach the threshold, or whose configuration is lost before registration, is locked for good.

On zones ([TIP-1154](./tip-1154.md)), a removed owner keeps authority until the zone processes the Tempo block with the owner update. The zone's sequencer can delay this by not processing new Tempo blocks.

| Actor | Capability and trust | Boundary check and failure consequence |
|---|---|---|
| Current quorum | Controls all actions and owner updates. Fully trusted. | [Authorization](#authorization) at the transaction's position in the block. Owners whose weights don't reach the threshold can do nothing. A compromised quorum can take over the account. |
| Holder of an old approval (removed owner, voucher or order receiver) | Holds signatures collected before an owner update. | Every digest includes the version, so any owner update invalidates earlier approvals. That's why there's no quorum voucher or permit format until a timelock exists. |
| Wallet | Holds the configuration and shows owners what they sign. Trusted to display operations accurately and to keep the configuration until registration. | Phishing can still get owners to sign something unintended. If the configuration is lost before registration, the funds are stuck. |
| Malicious setup coordinator | Chooses the salt or configuration and can search for a colliding EOA key in roughly 2^80 work, the same collision bound as any Ethereum address. | Can take deposits made before registration, use grants or allowances the key made before registration, and control the address on other chains, and on each zone until it processes the Tempo block with the registration. Before registration, the key can also migrate the address under [TIP-1113](./tip-1113.md) with owners of its choosing, which locks the real owners out for good. Use counterfactual multisigs only for low value; for high value, don't fund a multisig whose salt or configuration someone else chose, register before funding and verify the committed owners, weights and threshold. |
| Infrastructure (fee payer, relayer, RPC) | Submits transactions and serves state. No authority over the account. Not trusted to be timely or current. | Can delay or withhold a transaction until its validity window ends or its nonce is used. Can serve an old commitment, so readers verify the proof against a recent header they trust. |
| Spammer | Sends transactions that fail validation and pay nothing. | Work is capped at 8 approvals per signature and 16 plus a fee payer per transaction, whatever the owner count, but repeated attempts aren't bounded. Owners can't be configurable accounts, because nesting would multiply that work. |

# Invariants

These hold in every state reachable from T14 activation through valid transactions.

## Address

- For every account registered at a derived address, its address equals the address derived from its version-0 configuration, before and after registration and every owner update. Accounts migrated under TIP-1113 keep their existing address.
- For every version-0 configuration, the derived address is the same on every chain and is never the zero address, a virtual address, an active precompile, a TIP-20 token or a ZonePortal contract.

## Registration and commitment

- For every included transaction, each configurable account that signed it has a nonzero commitment afterwards, whether its calls succeeded, reverted or halted.
- For every invalid transaction, no account's commitment changes.
- For every registration, exactly one `ConfigurableAccountConfigUpdated` with version 0 is emitted for that account, and it stays in the receipt whether the calls succeeded, reverted or halted.
- For every registered account, the commitment is nonzero in every later state, and only registration, owner updates and migration change it.
- For every nonzero commitment, the stored hash equals the hash of a configuration that passes the [Configuration](#configuration) rules.
- For every transaction that registers an account, an owner update in that transaction reads the version-0 commitment, and rolling back that update leaves the version-0 commitment.
- For every account that registration creates, TIP-1000's new-account cost is charged exactly once.
- For every account without a commitment, the account leaf is byte-identical to its four-field encoding.
- For every account with a nonzero commitment, the account's code is exactly the `0xef` marker, whether its first transaction succeeded or failed. The marker alone doesn't imply a commitment, because precompiles carry the same code.
- Only registration and migration install the marker, and nothing changes or clears it.
- For every block, the commitment read from live state, a proof, a snapshot, replay, rollback or a reorg to that block is the same.

## Authorization

- For every valid transaction signed by a configurable account, the approvals come from owners of the configuration whose hash equals the commitment at that transaction's position in the block, or, when that commitment is zero, of the version-0 configuration the account's address is derived from, and the total weight reaches the threshold but falls below it without any one approval.
- For every approval, the account and configuration version it counts for are the ones in its signed digest.
- For every accepted signature, there are 1 to 8 approvals and each is at most 2,049 bytes.
- For every accepted configuration, the eight largest weights add up to at least the threshold.

## Owner updates

- For every successful `updateConfig`, the call is top-level in a transaction signed directly by the current quorum.
- For every successful `updateConfig`, the new version equals the previous commitment's version plus one.
- For every top-level call that reverts or halts, no owner update or update event from that batch remains, and any registration from the same transaction, with its event, does.
- For every owner update, the account's balances and nonce state are unchanged.

## Verification from contracts

- For every `verifyConfigurableAccount` call, state is unchanged, including for unregistered accounts and under `STATICCALL`.
- For every `verifyConfigurableAccount` call that returns `true`, [Authorization](#authorization) accepts the same approvals against the commitment at call time.
- For every call to a registered configurable account, state is unchanged, and `isValidSignature` returns `0x1626ba7e` only when `verifyConfigurableAccount` returns `true` for that account.
