This document catalogs all output types generated by Kong's timeseries hooks. Outputs are stored in the output table and represent time-series data for indexed contracts.
All outputs share a common schema:
{
chainId: number // EVM chain ID
address: `0x${string}` // Contract address
blockNumber: bigint // Block height
blockTime: bigint // Block timestamp
label: string // Output type identifier
component: string // Component/field name
value: number // Calculated value
}Status: Legacy output, migrate to tvl-c
Available for: ERC4626, Yearn v2, Yearn v3
Components:
tvl: Total Value Locked in USD
Description:
Single-component TVL calculation. For Yearn v2 vaults, this historically subtracted delegated assets from total assets. Delegated assets are no longer subtracted from the total. This output is replaced by the more detailed tvl-c output. If you're using tvl, migrate to tvl-c.
Deprecation Notice:
The GraphQL API has migrated to use tvl-c. The legacy tvl hooks remain for backward compatibility during the transition period.
Status: Active (current standard)
Available for: ERC4626, Yearn v2, Yearn v3
Components:
tvl: Total Value Locked in USD (vault assets only)delegated: Delegated assets TVL in USD (Yearn v2 only, 0 for others)totalAssets: Raw total assets (token units)delegatedAssets: Raw delegated assets (token units, Yearn v2 only)priceUsd: Asset price in USD
Description: Componentized TVL calculation that separates vault TVL from delegated assets. This provides more granular data for analysis and reporting.
Migration Guide:
-- Old query (tvl)
SELECT value FROM output
WHERE label = 'tvl'
-- New query (tvl-c)
SELECT value FROM output
WHERE label = 'tvl-c' AND component = 'tvl'
-- Get total including delegated (Yearn v2)
SELECT
SUM(value) as total_tvl
FROM output
WHERE label = 'tvl-c'
AND component IN ('tvl', 'delegated')Status: Active
Available for: ERC4626, Yearn v2, Yearn v3
Components:
net: Selected net APY (best available from weekly/monthly/inception)grossApr: Gross APR before feespricePerShare: Current price per shareweeklyNet: Net APY based on 7-day price changeweeklyPricePerShare: Price per share 7 days agoweeklyBlockNumber: Block number from 7 days agomonthlyNet: Net APY based on 30-day price changemonthlyPricePerShare: Price per share 30 days agomonthlyBlockNumber: Block number from 30 days agoinceptionNet: Net APY since vault inceptioninceptionPricePerShare: Price per share at inceptioninceptionBlockNumber: Vault inception block number
Description:
Backward-looking APY calculation based on price per share (PPS) delta over various time periods. The net component selects the most appropriate APY based on chain and data availability:
- Mainnet: Prefers monthly → weekly → inception
- Other chains: Prefers weekly → monthly → inception
Calculation Method:
- Compare current PPS with historical PPS (7d, 30d, or inception)
- Calculate delta:
(currentPPS - historicalPPS) / historicalPPS - Annualize:
(1 + delta)^(365.2425 / period) - 1 - Convert net APY to gross APR using compounding periods
Status: Active
Available for: ERC4626, Yearn v2, Yearn v3
Components:
raw: Raw price per share (in token decimals)humanized: Human-readable price per share (decimal adjusted)
Description: Price per share tracking over time. This represents the value of one vault share in terms of the underlying asset.
Implementation Differences:
- ERC4626: Uses
convertToAssets(10^decimals)function - Yearn v2/v3: Uses
pricePerShare()function (v2) orconvertToAssets()(v3) - yTranche:
authoritativeAssets × 10^decimals / totalSupply, where authoritative assets come fromtrancheController.liveAssets(tranche)
Status: Active
Available for: yTranche tranches
Address: the tranche
Components:
baselineAssets: principal plus accrued target plus realized excesspendingExcess: profit assigned but not yet realized through a reportliveAssets: authoritative tranche assets, excludingpendingExcessclaim: what the tranche claimscovered: how much of that claim the system's backing coverscoverageRatio:covered / claim, NULL when there is no claim (such days are absent from the REST timeseries)targetRatePerSecondWad: target accrual rate, raw WADexcessShareBps: share of surplus, basis pointsaccrualPaused: 1 when accrual is paused (the tranche absorbed a loss), else 0
Description:
Daily per-tranche accounting read from the tranche controller — not from the
tranche's own ERC-4626 view, which does not know what the tranche has accrued or
what losses it has absorbed. Asset amounts are normalized to the asset's
decimals. coverageRatio is accounting coverage and is not a statement about
withdrawal capacity.
Status: Active
Available for: yTranche controllers
Address: the controller
Components:
totalClaims: what the tranches collectively claimvaultAssets: main vault assets held for the systemreserveAssets: reserve vault assetsbackingAssets: what actually stands behind the claimscoverageRatio:backingAssets / totalClaims, NULL when there are no claims (such days are absent from the REST timeseries)
Description: Daily system-wide backing, read at the controller. Each observation reads at a single historical block. See ytranche for accounting semantics.
Status: Active
Available for: Yearn v3 (full contract), Yearn v2 (legacy read path only, see below)
Reserved components (promoted out of components, see docs/estimated-apr.md):
netAPR: promoted toapr, net of all feesnetAPY: promoted toapy, net of all feesgrossAPR: promoted togrossAPR, before feesgrossAPY: promoted togrossAPY, before feescompoundingPeriodsPerYear: stays incomponents, not an APRisStrategy: stays incomponents, scope marker. A non-zero value marks the emission strategy-scoped. If absent or null, Kong falls back to the legacydebtRatioheuristic.
Description:
An external publisher sends one row per component, under a label ending in
-estimated-apr. Kong promotes the reserved components above; the rest stay in
components. Full promotion rules, scope resolution, and the frozen legacy v2 read path
are documented in docs/estimated-apr.md.
| Output Type | ERC4626 | Yearn v2 | Yearn v3 | yTranche |
|---|---|---|---|---|
tvl (legacy) |
✓ | ✓ | ✓ | — |
tvl-c |
✓ | ✓ | ✓ | ✓ |
apy-bwd-delta-pps |
✓ | ✓ | ✓ | ✓ |
pps |
✓ | ✓ | ✓ | ✓ |
tranche-accounting |
— | — | — | ✓ |
tranche-system |
— | — | — | controller |
*-estimated-apr |
— | legacy path only | ✓ | — |
Tranches deliberately emit no legacy tvl: tranche TVL is a claim on the main
vault's backing rather than additional protocol assets, and tvl is the label
naive aggregates sum. Their tvl-c and pps come from controller-backed assets.
The GraphQL API at /api/gql provides access to outputs through its timeseries resolver. Here's how to get a vault's tvl timerseries,
query Timeseries {
timeseries(label: "tvl-c", component: "tvl", chainId: 1, address: "0xdA816459F1AB5631232FE5e97a05BBBb94970c95", limit: 1000) {
chainId
address
label
component
value
time
period
}
}Note: The tvls resolver now uses tvl-c with component = 'tvl' filter.
- Create timeseries hook at
packages/ingest/abis/{protocol}/{version}/{contract}/timeseries/{label}/hook.ts - Export
outputLabelconstant - Implement
process()function returningOutput[] - Test using graphql explorer
- Document in this file