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

ERC20Default

The default wallet adapter. It reports plain ERC-20 and native-token balances held directly by an account, for every asset on its inclusion list.

The default wallet adapter. It reports plain ERC-20 and native-token balances held directly by an account, for every asset on its inclusion list. It is auto-deployed by NAVCalculator.initialize() and cannot be removed.

  • Type: Plain adapter

  • protocolSubId: keccak256("wallet")

  • Source: ERC20DefaultBalanceAdapter.sol

Positions returned

One position per inclusion-list asset with a non-zero wallet balance.

Leg
PositionKind
isDebt
Description

Wallet balance

Wallet

false

Plain ERC-20 balance, or native-token balance for the ERC-7528 sentinel 0xEeee…EeeE

Only assets on the adapter's inclusion list (_supportedAssets) are reported; zero balances are skipped. A token a meta-adapter claims is off that list, so its balance is reported by that meta-adapter instead (see Registration).

Balance calculation

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

For each supported asset:

balanceOf is read via a low-level staticcall, so a non-contract or reverting asset yields 0 rather than reverting the whole read. All entries are credit (isDebt = false).

Identity

  • positionId: abi.encode(address asset)

  • positionKind: Wallet

Constructor

Parameter
Description

navCalculator_

NAVCalculator address (must be non-zero); source of the asset registry

initialAssets

Assets pre-added to the inclusion list at construction (e.g. NATIVE_ADDRESS), so NAVCalculator.initialize need not call back into the proxy during init

Registration

This adapter is deployed automatically inside NAVCalculator.initialize() and cannot be removed. Its per-asset reporting is muted/unmuted through the NAV Calculator, which is the only caller permitted to change the inclusion list:

A token a meta-adapter claims as an instance coordinate is excluded automatically, in the same transaction as the claim, and includeAssetInDefaultAdapter reverts MetaInstanceClaimedByAnotherAdapter for it. Releasing the coordinate does not re-include the token. Manual exclusion is still the tool for a token a plain adapter already covers, which avoids double-counting without unregistering it. addSupportedAsset requires the asset to be registered in NAVCalculator.

Last updated