For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cap

Reports an account's Cap Finance position as two USDC-denominated legs — liquid cUSD (Supplied) and staked stcUSD (Staking).

Reports an account's Cap Finance position as two structurally distinct legs, each valued in USDC: the base synthetic dollar cUSD (held directly) and the staked, yield-bearing savings token stcUSD. Splitting them lets a consumer tell held cUSD apart from staked stcUSD. The adapter wraps one fixed Cap deployment, so it is a plain adapter.

  • Type: Plain adapter

  • protocolSubId: keccak256("cap")

  • Source: CapBalanceAdapter.sol


Positions returned

Up to two positions per account — each leg is skipped when its balance is zero:

Leg
PositionKind
isDebt
Description

cUSD

Supplied

false

Directly-held cUSD, valued in USDC via the burn quote

stcUSD

Staking

false

Staked cUSD (stcUSD shares), redeemed to cUSD then valued in USDC


Balance calculation

Flowchart of the Cap balance adapter: read calls derive position legs into PositionBalance entries.
Cap adapter — how the underlying balances reported to the NAV Calculator are derived.

The NAV path (getAdapterPositions) values each leg independently:

getBurnAmount also returns a protocol fee, which is discarded — only amountOut is reported.

The no-arg balance getters (getAdapterBalances / getAdapterBalanceForAsset) still report the combined USDC total for the USDC asset (quoting the burn on cUSD + stcUSD→cUSD in one call). Only the NAV getAdapterPositions path splits the two legs; the split figures may differ from the combined one by at most burn-quote rounding.


Identity

  • positionId: abi.encode(address token)cUSD for the supplied leg, stcUSD for the staking leg

  • positionKind: Supplied (cUSD) · Staking (stcUSD)

  • labels: ["Stablecoin", "cUSD"] · ["Savings", "stcUSD"]

  • shape enumeration: the adapter implements IPositionEnumerable, advertised via ERC-165. Both shapes are pinned at construction, so positionIds() returns the cUSD and stcUSD ids — byte-identical to the ones the legs emit — letting a configuration view list and label the pair with no account. This adapter is why the interface exists: it derives labels per positionId, so it answers the account-less positionLabels("") probe with an empty array and was otherwise indistinguishable from a broken adapter.


Constructor

Parameter
Description

cUsd_

Cap cUSD token (ERC-20 + getBurnAmount quote interface)

stcUsd_

Cap stcUSD token (ERC-4626-like, redeems to cUSD)

usdc_

USDC address — the underlying asset reported, and the getBurnAmount target

navCalculator_

NAV Calculator contract

The three token addresses and navCalculator_ must each be deployed contracts; a zero address reverts with InvalidArguments.


Registration

Plain adapter — registered with addBalanceAdapters([adapter]) and removed with removeBalanceAdapters([adapter]) (MANAGER-gated). No instance set.

Last updated