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

# Hourly Soroban Fee Agg Contract

> Hourly Soroban fee aggregation by contract. Strictly per-contract — operations whose footprint resolves to no contract address are excluded (`upload_wasm`, plus `extend_footprint_ttl` and `restore_footprint` operations whose footprint contains only `ContractCode` entries with no `ContractData`). Totals here therefore do not represent total network-wide Soroban fees.

## Table Metadata

| Property | Configuration |
| - | - |
| Natural Key(s) | hour\_agg, contract\_id |
| Partition Field(s) | hour\_agg (DAY partition) |
| Clustered Field(s) | hour\_agg, contract\_id |
| Documentation | [dbt docs](http://www.stellar-dbt-docs.com/#!/model/model.stellar_dbt_public.hourly_soroban_fee_agg_contract) |

## Column Details

| Name | Description | Data Type | Domain Values | Required? | Notes |
| - | - | - | - | - | - |
| hour\_agg | Hour-truncated UTC timestamp of the aggregation window. Derived from `timestamp_trunc(closed_at, hour)`. | TIMESTAMP | | Yes | |
| contract\_id | The Soroban smart contract address (strkey `C...`) attributed to the transaction. Derived from the operation's `details.type`: `invoke_contract` (the invoked contract), `create_contract` / `create_contract_v2` (the deployed contract), or `extend_footprint_ttl` / `restore_footprint` (the contract whose `ContractData` entry was in the footprint). Never NULL or empty — rows without a resolvable contract\_id are filtered out upstream. | STRING | | Yes | |
| txn\_count | Total number of Soroban transactions invoking this contract in the hour. | INTEGER | | Yes | |
| failed\_txn\_count | Number of failed Soroban transactions for this contract in the hour. Failed transactions are still charged inclusion\_fee\_charged and non\_refundable\_resource\_fee\_charged. | INTEGER | | No | |
| unique\_fee\_source\_accounts | Count of distinct fee-paying accounts for this contract in the hour. For fee-bump transactions this is the fee sponsor; for regular transactions this is the transaction originator. Useful for distinguishing between a single account driving a contract's fee volume vs. broad usage. | INTEGER | | Yes | |
| total\_fee\_charged | Sum of fee\_charged across all transactions invoking this contract in the hour. | INTEGER | | Yes | |
| avg\_fee\_charged | Average fee\_charged per transaction invoking this contract in the hour. | FLOAT | | No | |
| max\_fee\_charged | Maximum fee\_charged across transactions invoking this contract in the hour. | INTEGER | | No | |
| total\_max\_fee | Sum of the effective fee ceiling -- coalesce(new\_max\_fee, max\_fee) -- across transactions invoking this contract. For fee-bump transactions, new\_max\_fee is the actual ceiling used by the network; max\_fee is the inner transaction's original max. Represents total willingness-to-pay. | INTEGER | | No | |
| fee\_efficiency | Ratio of total\_fee\_charged to total\_max\_fee. Bounded (0, 1]. Values closer to 1.0 indicate callers are bidding close to what they actually pay; lower values indicate overbidding. | FLOAT | | No | |
| total\_inclusion\_fee\_charged | Sum of inclusion\_fee\_charged across transactions invoking this contract. | INTEGER | | No | |
| avg\_inclusion\_fee\_charged | Average inclusion\_fee\_charged per transaction invoking this contract. | FLOAT | | No | |
| total\_inclusion\_fee\_bid | Sum of inclusion\_fee\_bid across transactions invoking this contract. Represents total willingness-to-pay for inclusion. | INTEGER | | No | |
| total\_resource\_fee | Sum of resource\_fee (pre-execution budget) across transactions invoking this contract. | INTEGER | | No | |
| avg\_resource\_fee | Average resource\_fee per transaction invoking this contract. | FLOAT | | No | |
| total\_non\_refundable\_resource\_fee | Sum of non\_refundable\_resource\_fee\_charged across transactions. Covers CPU instructions, read bytes, write bytes, and bandwidth. Charged regardless of tx success/failure. | INTEGER | | No | |
| total\_refundable\_resource\_fee | Sum of refundable\_resource\_fee\_charged across transactions. Covers rent, events, and return value. Based on actual usage; 0 for failed transactions. | INTEGER | | No | |
| total\_rent\_fee | Sum of rent\_fee\_charged across transactions. The portion of refundable\_resource\_fee\_charged that went to ledger entry TTL extensions. | INTEGER | | No | |
| total\_resource\_fee\_refund | Sum of resource\_fee\_refund across transactions. Represents the unused portion of resource\_fee returned to the account after execution. | INTEGER | | No | |
| surge\_txn\_count | Number of Soroban transactions for this contract where inclusion\_fee\_charged exceeded the base fee (effective\_operation\_count \* 100 stroops), indicating surge pricing. | INTEGER | | No | |
| airflow\_start\_ts | Timestamp when the Airflow DAG run started. Used for pipeline metadata and debugging. | STRING | | No | |
