Asset classification
How a registered asset is classified on two orthogonal axes, what its price tracks, and how its value accrues.
Every registered asset is classified on two orthogonal axes, kept separate because no single category answers both questions:
PegKind: what the price tracks.PeggedorFloating.AccrualKind: how value accrues.None,Rebasing, orAppreciating.
Source: AssetKindRegistry.sol · AssetKind.sol
The two axes
PegKind means pegged to the quote asset, USD for the default quoteAsset == address(0) read, not "pegged to something in general". So USDC, USDT, DAI and GHO are Pegged, while wstETH is Floating even though it is rigidly related to stETH: it does not track USD.
AccrualKind
What grows
Examples
None
Neither balance nor rate
WETH, USDC, AAVE, WBTC
Rebasing
The balance grows; unit price stays put
stETH, eETH, aTokens
Appreciating
The rate grows; balance stays static
wstETH, sDAI, sGHO, sUSDe, ERC-4626 shares
Every registered asset carries an accrual classification, across the eight chains that configure assets. The live breakdown is not reproduced here. Read it from the chain (getAssetKinds(assets) on the registry).
A copied figure is true only of the commit it was copied from, and this one was wrong across four consecutive merges before anyone noticed: every asset registered moves it, and nothing fails when it goes stale.
Why two axes rather than one category
A single flat enum forces a wrong answer on assets already registered here, because the two properties genuinely cross:
None
Rebasing
Appreciating
Pegged
USDC
(an aToken; none registered; see below)
(cannot be asserted; see below)
Floating
WETH
stETH
wstETH, sDAI, sGHO, sUSDe, sUSDS
stETH and wstETH differ on the accrual axis only; both are Floating. Collapse the axes and that distinction is unexpressible.
The peg axis is derived, not stored
PegKind is not stored anywhere. It is computed on read from the NAV's per-asset pegToleranceBps, the switch that enables the $1 peg guard:
There is exactly one authority for whether an asset is pegged, so there is no second copy to fall out of step and no cross-check needed to police one. Whether any given asset reads Pegged follows from its own pegToleranceBps; read that per asset rather than from a count here.
Because the value is read live rather than snapshotted at classification time, retuning a tolerance is immediately reflected.
The two empty cells are empty for different reasons
Pegged + Rebasingis real and reachable. An aToken for USDC has a growing balance at a$1price. No registered asset occupies the cell, which makes it a forward-compatibility slot rather than a contradiction.Pegged + Appreciatingcannot be asserted. Nothing writes a peg kind, so it cannot be declared for an asset. It remains reachable as a read: set a non-zero peg tolerance on an asset stored asAppreciatingand the pair reads backPegged + Appreciating, because the peg is computed from that tolerance. That is a true report of the configuration, not an inconsistency to be caught.
Reading an asset's description
One call on the NAV Calculator returns everything public about an asset, both classification axes and its display labels. A consumer needs only the NAV address it already holds, and never has to learn that a registry exists:
It returns the enums rather than raw uint8s, so callers get a typed ABI rather than two integers to interpret.
The narrower reads, the batch form and the probe live on the registry, which the NAV names via assetKindRegistry():
What a caller actually receives
The two halves of getAssetInfo fail differently, and the difference is deliberate:
The classification half fails closed. An unclassified asset reverts
AssetNotClassifiedrather than reporting a default. The zero value ofAccrualKindisNone, which is a real classification and the one most registered assets hold, so a defaulting reply would be indistinguishable from a configured one. Probe withisClassifiedwhen an unclassified asset is an expected state.The labels half never fails.
getAssetLabelsdoes not revert; an unlabelled asset returns an empty array, which is a real answer rather than a gap.
That asymmetry is the whole rule: there is no defensible default classification, but "no labels" is the honest answer.
Display labels
Alongside the two axes, an asset carries an ordered list of display labels; free text for presentation, which nothing onchain parses.
Order is significant, and the list is not a set. Index 0 is the protocol or issuer; later indices narrow to the product or kind:
That broad-to-narrow order is the same one protocolName() and positionLabels() compose in: but the content differs, and the difference matters when you are writing the array. Asset labels carry the protocol at index 0. Position labels never do: there, protocolName() supplies the protocol separately and positionLabels() starts at the product (["Market", "wstETH/USDC"], ["Withdrawal Queue", "stETH"]).
So the two are alike in ordering and opposite in what index 0 holds. Reading either array as an unordered set discards the only structure it has.
At most 4 labels, each at most 32 bytes, none empty, TooManyAssetLabels, AssetLabelTooLong and EmptyAssetLabel reject the rest at write time. Zero labels is legitimate, not a misconfiguration.
A wrong label can be corrected in place, without touching the asset's registration or its price feeds:
It replaces the whole array rather than editing an element, and it can revert six ways. An integrator decoding errors needs to handle all six, the role gate, two of its own, and three content bounds it shares with registerAsset:
NotAuthorized
the caller does not hold the NAV's MANAGER role; checked first, so the likeliest one in practice
AssetNotRegisteredForLabels
the asset is not registered on the NAV
EmptyAssetLabelSet
the array is empty
TooManyAssetLabels
more than 4 labels
AssetLabelTooLong
an element exceeds 32 bytes
EmptyAssetLabel
an element is the empty string
Adapter label overrides
Adapter labels are produced by adapter code, protocolName() for the protocol, positionLabels(positionId) for the breadcrumb beneath it, so a wrong one is wrong for every position that adapter serves, not for one row. Redeploying the adapter is one way to fix that. It is no longer the only way.
Two per-adapter overrides are stored on the registry and applied at read time. All four calls are gated on the NAV's MANAGER role; the two setters additionally require the adapter to be registered, while the two clearers deliberately do not, so an override can still be removed after its adapter has been deregistered:
An override that is unset falls through to whatever the adapter itself returns, so this changes presentation without touching the adapter. Setting one on an unregistered adapter reverts AdapterNotRegistered; an empty string reverts EmptyAdapterOverride, use the matching clear… call to remove one, and an over-long value reverts AdapterOverrideTooLong. The clearers are not idempotent: clearing an override that was never set reverts AdapterOverrideNotSet, so a cleanup batch run over several adapters fails on the first one that carried nothing.
What the two overrides do not reach is any segment beneath index 0. The category override replaces index 0 and nothing else; the computed leaf below it, which many adapters derive live from onchain state, per position, is left untouched and still read live on every call. Correcting a leaf still means changing whatever produces it, the adapter code or its constructor argument, and redeploying that adapter. That is a current limitation of the override surface, stated as such: it is not a claim about what the surface was intended to be.
The facade's unregisterAsset drops an asset's labels; clearAssetKind keeps them. The two look interchangeable and are not:
clearAssetKindends the classification while the asset stays registered on the NAV; its labels still describe a live asset, so they are kept.AssetKindRegistry.unregisterAssetends the registration, so it deletes the labels outright, after this call, and only this one, a later re-registration starts from none.
Governance
Registering an asset, classifying it and labelling it are one operation:
AssetKindRegistry.registerAsset stores the accrual kind and the labels, then forwards to the NAV's own registerAsset in the same transaction, so if either half reverts the whole transaction reverts and neither takes effect. An asset therefore cannot become registered-but-unclassified through a partly-applied change. Unregistration works the same way, and additionally drops the labels.
Mutations, registerAsset, unregisterAsset, setAssetKind, setAssetKinds, clearAssetKind, setAssetLabels, are gated on the NAV's MANAGER role:
The registry holds no roles of its own and has no separate admin. Authority is exactly the NAV's MANAGER set, one set of humans for the whole system, rather than a second contract with its own governance to keep in step. The NAV address is set in the registry's constructor and immutable.
The pointer in the other direction is not immutable: a MANAGER aims the NAV at a registry with setAssetKindRegistry, which rejects address(0). It is re-settable on purpose; the registry is a plain contract rather than a proxy, so replacing it means deploying a new one and re-pointing the NAV.
The stored axis is written from per-asset configuration, where the accepted values are None, Rebasing and Appreciating, case-exact. A pre-deploy check rejects an absent, empty, mis-cased or unrecognised value, but it validates the value, not the field set: a misspelled key (accrualkind, accrual_kind) is silently ignored and reaches the deploy as if the field were absent.
Last updated