> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spire.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

> How DA Builder combines EIP-7702 account code, offchain aggregation, ProposerMulticall, and GasTank accounting.

## Summary

DA Builder combines offchain transaction aggregation with onchain EIP-7702 proposer execution so multiple participants can share Ethereum execution overhead.

## System Architecture

<Frame>
  <img src="https://mintcdn.com/spire/BLVLXOQXhMRTJ8nz/images/Da-builder/DA_Builder_System_Architecture.avif?fit=max&auto=format&n=BLVLXOQXhMRTJ8nz&q=85&s=a8dcaae90923f4d10973cf50c7953dd5" alt="" width="1536" height="1168" data-path="images/Da-builder/DA_Builder_System_Architecture.avif" />
</Frame>

## Component Responsibilities

### User EOA With EIP-7702 Proposer Code

The user EOA contains delegated EIP-7702 account code. The proposer code can be Spire's `TrustedProposer` or a `TrustlessProposer` implementation.

`TrustedProposer` is best for dedicated EOAs where trusting Spire's DA Builder service is acceptable. `TrustlessProposer` is best for applications that require account-owner authorization for each delegated call.

### DA Builder Service

The DA Builder service accepts transaction submissions, validates account setup and GasTank funding, groups compatible transactions, returns transaction hashes, and manages status tracking.

DA Builder is not a full Ethereum RPC provider. Use a standard RPC provider for reads, archive queries, event logs, and direct fallback.

### ProposerMulticall Contract

`ProposerMulticall` executes aggregated onchain transactions. It calls each participant's proposer account code in sequence so multiple user operations can share duplicated execution overhead.

### GasTank Contract

GasTank stores user deposits and provides the accounting source for DA Builder transaction costs. `dab_accountInfo` returns GasTank `balance` and `outstanding_charge` for an account.

## Data Flow

1. The user deposits ETH into GasTank.
2. The user delegates a dedicated EOA to `TrustedProposer` or `TrustlessProposer`.
3. The application sends a signed transaction to the DA Builder RPC endpoint.
4. DA Builder validates the account, funding, and transaction.
5. DA Builder aggregates compatible transactions.
6. `ProposerMulticall` executes proposer calls onchain.
7. DA Builder calculates costs and updates GasTank charges.
8. The application polls `eth_getTransactionReceipt` or `dab_transactionStatus`.

## Trust Boundaries

| Boundary                    | TrustedProposer                                                  | TrustlessProposer                                                                   |
| :-------------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------------------- |
| Delegated execution         | Spire's DA Builder service can execute through the delegated EOA | Proposer code verifies account-owner authorization before execution using ecrecover |
| Application signing changes | Not required after delegation                                    | Required for EIP-712 proposer payloads                                              |
| Best account type           | Dedicated hot-wallet EOA with limited permissions                | EOA that needs explicit authorization for delegated calls                           |
| Main risk                   | Overbroad delegated authority                                    | Incorrect signing, nonce, deadline, or storage-layout implementation                |

## Failure Modes

| Failure mode                  | Effect                                             | Handling                                                 |
| :---------------------------- | :------------------------------------------------- | :------------------------------------------------------- |
| GasTank not funded            | Submission will be unable to aggregate             | Deposit ETH and poll `dab_accountInfo`                   |
| DA Builder unavailable        | DA Builder submission path fails                   | Submit directly through standard RPC                     |
| Unsupported RPC method        | Request fails or is not appropriate for DA Builder | Use a standard Ethereum RPC provider                     |
| Bad TrustlessProposer payload | Delegated call reverts                             | Validate EIP-712 signing, nonce, deadline, and gas limit |

## Unsupported Uses

Do not use DA Builder as an archive node, indexer, read-heavy RPC provider, general-purpose wallet backend, or blob compression system. DA Builder's architecture is for transaction aggregation and GasTank-based cost accounting.

## Internal Links

* [Full Integration Guide](/da-builder/integrate) - Choose proposer path.
* [Monitor Account](/da-builder/monitor-account) - Monitor GasTank and status.
* [Quick Reference](/da-builder/quick-reference) - Endpoints and methods.
* [Compare Alternatives](/da-builder/compare-alternatives) - Decide whether DA Builder fits.
