Skip to main content
A market is a HubAssetKey:
HubAssetKey {
  hub_id: u32,
  asset: Address,
}
The controller uses that coordinate for user-facing market operations. The pool uses the same coordinate for Params(HubAssetKey) and State(HubAssetKey). There is one central pool contract. Listing an asset creates rows in that pool; it does not deploy a per-asset pool.

Activation Model

There is no separate market-status enum. Price activation is controlled by the token-rooted AssetOracle(asset) entry:
StateOn-chain shapeEffect
Listed without oraclePool rows exist, AssetOracle(asset) missingOracle-dependent flows fail.
Price-activePool rows exist, AssetOracle(asset) exists and source validatesUser flows proceed, subject to spoke flags and caps.
Price-disabledAssetOracle(asset) removedPrice reads fail until governance configures a valid source again.
Spokes decide whether an account can use a hub asset as collateral or debt. SpokeAsset(spoke_id, HubAssetKey) stores collateral flags, borrow flags, caps, liquidation parameters, and optional oracle override.

Listing Sequence

Listing is governance-controlled:
  1. Approve the token for listing.
  2. Deploy the central pool once if it does not exist.
  3. Create the hub-asset pool rows.
  4. Configure AssetOracle(asset) through governance.
  5. Add or edit SpokeAsset(spoke_id, HubAssetKey) rows for the spokes that can use the asset.
deploy_pool() is protocol-wide. It is not called for each market.

Pool Parameters

MarketParamsRaw lives in pool Params(HubAssetKey) storage.
FieldUnitMeaning
base_borrow_rate_rayRAYRate at zero utilization.
slope1_rayRAYSlope below the first kink.
slope2_rayRAYSlope between first and optimal utilization.
slope3_rayRAYSlope above optimal utilization.
max_borrow_rate_rayRAYBorrow-rate cap.
mid_utilization_rayRAYFirst utilization kink.
optimal_utilization_rayRAYTarget utilization kink.
max_utilization_rayRAYHard utilization cap.
reserve_factor_bpsBPSShare of borrower interest routed to protocol revenue.
supply_captoken unitsHub-level supply cap; zero or i128::MAX disables.
borrow_captoken unitsHub-level borrow cap; zero or i128::MAX disables.
is_flashloanableboolWhether flash loans can use this hub asset.
flashloan_feeBPSFlash-loan fee.
asset_idaddressToken contract.
asset_decimalsintegerToken decimals used for conversions.
Governance updates pool parameters through the timelock. The pool syncs accrued interest under the old parameters before applying new values.

Spoke Parameters

SpokeAssetConfig lives in controller SpokeAsset(spoke_id, HubAssetKey) storage.
FieldUnitMeaning
is_collateralizableboolWhether supply can count as collateral.
is_borrowableboolWhether accounts on the spoke can borrow it.
pausedboolBlocks risk-increasing use for that spoke asset.
frozenboolBlocks position increases while allowing exits.
loan_to_valueBPSBorrow admission weight.
liquidation_thresholdBPSHealth-factor collateral weight.
liquidation_bonusBPSLiquidator bonus.
liquidation_feesBPSProtocol fee from seized collateral.
supply_captoken unitsSpoke-level supply cap.
borrow_captoken unitsSpoke-level borrow cap.
oracle_overrideoptional configPer-spoke price source override.

Configured Values

Configured market and spoke values live in this repository’s configs/ folder. Do not treat those files as network state unless deployment evidence for the target network has been published.

Next

Risk parameters

Units, ranges, and configured values for market and spoke risk parameters.

Accounts and risk

Account storage, spoke binding, health factor, and position limits.

Oracles

Reflector and RedStone sources, tolerance bands, and flow policies.

Controller ABI

Controller entrypoints for listing, configuration, and user flows.