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

# Template catalog

> How Molpha Data templates work, and every template the gateway serves: what it reads and what it signs.

A template is a named, versioned recipe for one source. Its parameters are typed (a chain, an address, an enum, a
date), validated and normalized before anything is read, and the source it builds is fixed by the template's
version. The catalog below lists the templates `https://gateway.molpha.io` served on 2026-11-30. The live list is
`GET /v1/data/catalog`; each template's page in the API reference has its parameters, return type and caveats, and
lets you try the free `/source` route.

## Reading a catalog entry

`GET /v1/data/catalog/token.supply` returns:

| Field | Meaning |
| - | - |
| `id`, `version`, `ref` | `token.supply`, `1`, and the two together: `token.supply@1` |
| `class`, `title`, `summary` | Where the template sits in the catalog and what it reads |
| `kinds` | What it reads: `evm`, `starknet`, `svm` (Solana), or `http` (a public web API) |
| `chains` | The chains of this gateway whose kind the template reads. Some templates run on fewer: see the template's summary and caveats |
| `params` | Each parameter's `name`, `type`, `required`, `default`, `enum` and `doc` |
| `returns` | The signed value's unit, decimals and output type |
| `caveats` | What the value does not tell you, and when a read fails |
| `notices` | The publisher's terms. Carry them when you show or pass the value on |
| `example` | Parameters that derive on this gateway |

## Parameters

* **`chain`** takes an alias (`ethereum`, `base`, `solana`) or a CAIP-2 ID (`eip155:1`). The source always names the
  CAIP-2 ID, so both give the same `sourceId`.
* **`finality`** is `final` (default), `fast`, or a raw mode. It is part of the source: see
  [Chains and finality](https://docs.molpha.io/data/overview.md#chains-and-finality).
* **`mode`**, where a template offers it, picks `exact` (every node must read the same 32 bytes) or `tolerance`
  (nodes sign the median of their reads within a band). Where a value moves between the nodes' reads, such as a
  Solana mint's supply, the template defaults to tolerance. A tolerance round needs `signaturesRequired` of at least
  3\. See [Exact and tolerance mode](https://docs.molpha.io/concepts/feeds.md#exact-and-tolerance-mode).
* Templates check what they can when the source is derived (`422 PARAM_INVALID`: an unknown market, a pool of the
  wrong kind, a chain the template does not run on) and write assertions into the source for the rest, so a wrong
  address fails the round instead of signing zero.
* Each choice of parameters is its own feed. Two values of `access`, `field` or `unit` are two `sourceId`s.

## Snapshots

`token.snapshot` and `dex.pool.snapshot` sign several fields under one signature. Their output is `keccak256`: the
signed value is the hash of a fixed-length preimage, the round's response carries the preimage as
`data.valuePreimage`, and `/source` returns its `layout` (each field's name, offset, length and type). Hash the
preimage, compare it with the signed value, then decode the fields with the layout. On Solana, pass the preimage as
the raw value when you submit, as for any `keccak256` source.

## Web API templates

Templates of kind `http` read a public publisher (central banks, U.S. statistics agencies, GLEIF, drand,
Hyperliquid). They take no `chain` or `finality`. Some publishers need a key: there the template's source names a
secret placeholder that the gateway fills with Molpha's own key inside the round, so you need none. Such a source
is private: `/dry-run` cannot run it, since the key travels only inside a round. The template's caveats say so, and
name the publisher's request budget the gateway keeps under.

## Catalog

### Token

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Bridged supply against its lockbox](https://docs.molpha.io/data/api/supply-reconcile.md) | `supply.reconcile@1` | EVM | A canonical token's balance locked in a bridge, less the total supply of its bridged copies on up to three other chains. |
| [Token control flags](https://docs.molpha.io/data/api/token-controls.md) | `token.controls@1` | EVM | An EVM token's pause flag, owner, and EIP-1967 implementation and admin, under one signature. |
| [Token snapshot](https://docs.molpha.io/data/api/token-snapshot.md) | `token.snapshot@1` | EVM, Starknet, Solana | A token's supply and decimals (EVM, Starknet) or its whole SPL mint (supply, decimals, mint and freeze authorities) under one signature. |
| [Token total supply](https://docs.molpha.io/data/api/token-supply.md) | `token.supply@1` | EVM, Starknet, Solana | The total supply of a token, in whole tokens, read from the token contract or the SPL mint. |

### Wallet

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Account balance](https://docs.molpha.io/data/api/account-balance.md) | `account.balance@1` | EVM, Starknet, Solana | A wallet's native balance (EVM, Solana) or token balance (ERC-20, Starknet token, or the wallet's associated SPL token account). |

### DEX

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Curve EMA price oracle](https://docs.molpha.io/data/api/curve-price-oracle.md) | `curve.priceOracle@1` | EVM | A Curve pool's exponential moving average price (price\_oracle) of coin i+1 in coin 0. |
| [Ekubo pool spot price](https://docs.molpha.io/data/api/dex-ekubo-price.md) | `dex.ekubo.price@1` | Starknet | An Ekubo pool's current price from its square-root price, adjusted for both tokens' decimals. Ekubo pools have no address: the pool is named by its key. |
| [Pool spot price](https://docs.molpha.io/data/api/dex-pool-price.md) | `dex.pool.price@2` | EVM, Solana | A pool's current price: from a concentrated-liquidity pool's square-root price (Uniswap v3 and v4, Slipstream, Whirlpool, Raydium CLMM), a Meteora DLMM pair's active bin, or a v2-style pool's reserves, adjusted for both tokens' decimals. |
| [Pool reserve](https://docs.molpha.io/data/api/dex-pool-reserves.md) | `dex.pool.reserves@1` | EVM, Solana | One side of a pool's reserves: getReserves of a Uniswap v2-style pair, the token balance of a v3-style pool, or a Whirlpool's token vault. |
| [Pool state snapshot](https://docs.molpha.io/data/api/dex-pool-snapshot.md) | `dex.pool.snapshot@1` | EVM, Solana | A concentrated-liquidity pool's state under one signature: square-root price, tick, active liquidity and fee (Uniswap v3 family), or the Whirlpool account up to its fee growth. |
| [Pool TWAP price](https://docs.molpha.io/data/api/dex-pool-twap.md) | `dex.pool.twap@2` | EVM, Solana | The time-weighted average price over a window, from the pool's own oracle: 1.0001 raised to the mean tick (observe on EVM, rounded as Uniswap's OracleLibrary rounds it; a Raydium CLMM observation ring on Solana), or a Meteora DLMM pair's mean active bin, adjusted for both tokens' decimals. |
| [Median price across pools](https://docs.molpha.io/data/api/price-median.md) | `price.median@1` | EVM, Solana | The median price of a token in a quote token across two to four concentrated-liquidity pools of that pair, optionally refusing pools below a liquidity floor. |

### Lending

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Aave v3 reserve rate or index](https://docs.molpha.io/data/api/lending-aave-reserve.md) | `lending.aave.reserve@1` | EVM | One of an Aave v3 (or Spark) reserve's current rates or indexes, from Pool.getReserveData. |
| [Aave v3 reserve totals](https://docs.molpha.io/data/api/lending-aave-totals.md) | `lending.aave.totals@1` | EVM | An Aave v3 (or Spark) reserve's total supplied (aToken supply) or borrowed (variable debt token supply), or its utilization. |
| [Aave v4 Hub asset totals and rates](https://docs.molpha.io/data/api/lending-aave4-hub.md) | `lending.aave4.hub@1` | EVM | An Aave v4 Liquidity Hub asset's total added (supplied through every Spoke) or owed, its utilization, its drawn (base borrow) rate or the rate its suppliers earn. |
| [Aave v4 Spoke reserve totals](https://docs.molpha.io/data/api/lending-aave4-spoke.md) | `lending.aave4.spoke@1` | EVM | An Aave v4 Spoke reserve's total supplied or borrowed (drawn plus premium), or its utilization: the part of a Hub asset that flows through one Spoke. |
| [Compound v3 market totals and rates](https://docs.molpha.io/data/api/lending-compound-market.md) | `lending.compound.market@1` | EVM | A Compound v3 (Comet) market's total supplied or borrowed base asset, its utilization, or its supply or borrow rate, computed from totalsBasic() as Comet computes getUtilization, getSupplyRate and getBorrowRate. |
| [Euler v2 vault totals and rates](https://docs.molpha.io/data/api/lending-euler-vault.md) | `lending.euler.vault@1` | EVM | An Euler v2 (EVK) vault's total assets or borrows, its utilization, or its supply or borrow rate, from the vault's own views. |
| [Fluid Liquidity layer totals and rates](https://docs.molpha.io/data/api/lending-fluid-token.md) | `lending.fluid.token@1` | EVM | A token's total supplied or borrowed on Fluid's Liquidity layer (shared by every Fluid lending, vault and DEX protocol), its utilization, or its supply or borrow rate. |
| [Kamino Lending reserve totals and rates](https://docs.molpha.io/data/api/lending-kamino-reserve.md) | `lending.kamino.reserve@1` | Solana | A Kamino Lending reserve's total supplied or borrowed liquidity, its utilization, or its supply or borrow rate, from the reserve account and its borrow-rate curve. |
| [marginfi bank totals and rates](https://docs.molpha.io/data/api/lending-marginfi-bank.md) | `lending.marginfi.bank@1` | Solana | A marginfi v2 bank's total deposits or borrows, its utilization, or its lending or borrowing rate, from the bank's shares, share values and rate cache. |
| [Morpho Blue market totals and rates](https://docs.molpha.io/data/api/lending-morpho-market.md) | `lending.morpho.market@1` | EVM | A Morpho Blue market's total supplied or borrowed assets, its utilization, or its supply or borrow rate, from market(id) and the AdaptiveCurveIRM's rateAtTarget(id). |
| [Vesu market totals and rates](https://docs.molpha.io/data/api/lending-vesu-market.md) | `lending.vesu.market@1` | Starknet | A Vesu v2 pool's total supplied or borrowed amount of one asset, its utilization, or its supply or borrow rate, from asset\_config(asset), utilization(asset) and interest\_rate\_config(asset). |

### Position

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Aave v3 health factor](https://docs.molpha.io/data/api/position-aave-health.md) | `position.aave.health@1` | EVM | An account's health factor on an Aave v3 (or Spark) market, from Pool.getUserAccountData. |
| [Aave v3 distance to liquidation](https://docs.molpha.io/data/api/position-aave-liquidation-distance.md) | `position.aave.liquidationDistance@1` | EVM | How far an account's collateral value can fall, debt unchanged, before the position can be liquidated: 1 - 1/healthFactor. |
| [Aave v4 health factor](https://docs.molpha.io/data/api/position-aave4-health.md) | `position.aave4.health@1` | EVM | A user's health factor on an Aave v4 Spoke, from the Spoke's getUserAccountData. |
| [Morpho Blue health factor](https://docs.molpha.io/data/api/position-morpho-health.md) | `position.morpho.health@1` | EVM | A borrower's health on a Morpho Blue market, computed as Morpho computes it: collateral at the market's oracle price times LLTV, over the borrow assets of the borrower's shares. |

### Yield

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Vault share price](https://docs.molpha.io/data/api/erc4626-share-price.md) | `erc4626.sharePrice@1` | EVM, Starknet | Assets per vault share, from the vault's own convertToAssets. |
| [Liquid staking token exchange rate](https://docs.molpha.io/data/api/lst-rate.md) | `lst.rate@1` | EVM, Solana | How much of the base asset one liquid staking token is worth, read from the token's own contract or stake pool. |
| [Sky savings rate](https://docs.molpha.io/data/api/savings-sky.md) | `savings.sky@1` | EVM | The Sky Savings Rate (sUSDS) or the DAI Savings Rate (sDAI): as a simple APR, as the compounded APY, or as the vault's share price. |

### Oracle

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Two oracle prices compared](https://docs.molpha.io/data/api/oracle-compare.md) | `oracle.compare@1` | EVM, Starknet, Solana | The deviation between two prices on one chain (Chainlink, Pyth, RedStone, Chronicle or a pool's spot price on EVM; Pragma or an Ekubo pool on Starknet; Pyth or a pool on Solana), refusing a feed older than maxAge; or whether they agree within a bound. |

### Derived

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Pool spot against its TWAP](https://docs.molpha.io/data/api/dex-pool-twap-deviation.md) | `dex.pool.twapDeviation@1` | EVM | How many ticks a pool's current tick is from its own mean tick over a window, both read at one block; or whether it is within a bound. |
| [LST market price against its exchange rate](https://docs.molpha.io/data/api/lst-market-deviation.md) | `lst.marketDeviation@1` | EVM | How far a liquid staking token's pool price is from its own exchange rate, in basis points; negative when it trades at a discount. Or whether it is outside a band. |
| [Price feed age](https://docs.molpha.io/data/api/oracle-staleness.md) | `oracle.staleness@1` | EVM, Starknet, Solana | How long ago a price feed was last updated (Chainlink or Pyth on EVM, Pragma on Starknet, Pyth on Solana), at the round time; or, off Solana, whether it is within a maximum age. |
| [Stablecoin peg deviation](https://docs.molpha.io/data/api/stable-depeg.md) | `stable.depeg@1` | EVM, Solana | How far a stablecoin's price is from its peg, from a pool's spot price, a Chainlink feed (EVM) or a Pyth feed (Solana); or, on EVM, whether it is outside a band. |

### Perps

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [GMX v2 funding rate](https://docs.molpha.io/data/api/perp-gmx-funding.md) | `perp.gmx.funding@1` | EVM | The live funding rate of one GMX v2 market on Arbitrum, as the paying side pays it. Positive means longs pay shorts. |
| [GMX v2 open interest](https://docs.molpha.io/data/api/perp-gmx-open-interest.md) | `perp.gmx.openInterest@1` | EVM | The open interest of one GMX v2 market on Arbitrum, long, short or both, in units of the index token. |
| [Hyperliquid funding rate](https://docs.molpha.io/data/api/perp-hyperliquid-funding.md) | `perp.hyperliquid.funding@1` | Web API | The funding rate of one Hyperliquid perpetual: the running hour's estimate, or the rate an earlier hour settled at. Positive means longs pay shorts. |
| [Hyperliquid open interest](https://docs.molpha.io/data/api/perp-hyperliquid-open-interest.md) | `perp.hyperliquid.openInterest@1` | Web API | The open interest of one Hyperliquid perpetual, in units of the coin. |
| [Hyperliquid position health](https://docs.molpha.io/data/api/perp-hyperliquid-position-health.md) | `perp.hyperliquid.positionHealth@1` | Web API | One Hyperliquid account's cross margin ratio, or the liquidation price of its position in one coin. |
| [Hyperliquid perp price](https://docs.molpha.io/data/api/perp-hyperliquid-price.md) | `perp.hyperliquid.price@1` | Web API | The mark, oracle or mid price of one Hyperliquid perpetual, in USDC per unit of the coin. |

### Reference data

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [EIA energy series](https://docs.molpha.io/data/api/energy-eia.md) | `energy.eia@1` | Web API | One observation of an EIA series: WTI and Brent spot, Henry Hub spot, weekly U.S. crude stocks, weekly natural gas storage, weekly retail gasoline. |
| [Central bank reference exchange rate](https://docs.molpha.io/data/api/fx-reference.md) | `fx.reference@1` | Web API | A central bank's published exchange rate for one business day: the ECB's euro reference rates (about 16:00 CET) or the Bank of Canada's daily averages (by 16:30 ET). |
| [LEI status](https://docs.molpha.io/data/api/lei-status.md) | `lei.status@1` | Web API | Whether a Legal Entity Identifier is issued to an active entity, or its registration or entity status, from GLEIF's LEI records. |
| [BEA national accounts series](https://docs.molpha.io/data/api/macro-bea.md) | `macro.bea@1` | Web API | One period of a U.S. Bureau of Economic Analysis NIPA series as currently published: real GDP growth, final sales, PCE growth, and the PCE and core PCE price indexes and their monthly change. |
| [BLS series value](https://docs.molpha.io/data/api/macro-bls.md) | `macro.bls@1` | Web API | One period of a U.S. Bureau of Labor Statistics series as currently published: CPI-U (CUUR0000SA0), the unemployment rate (LNS14000000), nonfarm payrolls (CES0000000001), or any other BLS series ID. |
| [drand quicknet randomness](https://docs.molpha.io/data/api/random-drand.md) | `random.drand@1` | Web API | The randomness of one drand quicknet round (League of Entropy), delivered with a Molpha attestation on every chain Molpha verifies on. |
| [FOMC federal funds target range](https://docs.molpha.io/data/api/rates-fomc-target.md) | `rates.fomcTarget@1` | Web API | The lower or upper bound of the FOMC's federal funds target range in effect on one business day, as the New York Fed publishes it with the EFFR. |
| [Overnight reference rate](https://docs.molpha.io/data/api/rates-reference.md) | `rates.reference@1` | Web API | An official overnight rate for one business day, from its administrator: SOFR, EFFR, OBFR, TGCR, BGCR and the SOFR Averages and Index (New York Fed), €STR (ECB), CORRA (Bank of Canada). |
| [Average interest rate on Treasury securities](https://docs.molpha.io/data/api/treasury-avg-rate.md) | `treasury.avgRate@1` | Web API | The average interest rate on outstanding U.S. Treasury securities of one kind for one month (Fiscal Data, Average Interest Rates on U.S. Treasury Securities). |
| [Debt to the Penny](https://docs.molpha.io/data/api/treasury-debt.md) | `treasury.debt@1` | Web API | U.S. total public debt outstanding, or its debt held by the public or intragovernmental holdings, for one business day (Fiscal Data, Debt to the Penny). |
| [Treasury par yield curve](https://docs.molpha.io/data/api/treasury-par-yield.md) | `treasury.parYield@1` | Web API | The daily U.S. Treasury par yield for one tenor, 1 month to 30 years, as the Federal Reserve Board publishes it in H.15 (Treasury constant maturities). |

### Chain

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Pinned block](https://docs.molpha.io/data/api/chain-head.md) | `chain.head@1` | EVM, Starknet, Solana | The block (EVM, Starknet) or slot (Solana) a source of this chain and finality reads at, from the source format's \$block. |

### Raw state

| Template | ID | Reads | What it signs |
| - | - | - | - |
| [Storage slot](https://docs.molpha.io/data/api/evm-storage.md) | `evm.storage@1` | EVM | The 32 bytes of one storage slot of a contract at the pinned block. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.