> For the complete documentation index, see [llms.txt](https://docs.kpk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kpk.io/funds/infrastructure/architecture/onchain-accounting/meta-balance-adapters/fluid-ftokens.md).

# Fluid fTokens

One immutable meta-adapter that reports an account's supply position in any Fluid fToken (an ERC-4626 lending vault).

One immutable meta-adapter that reports an account's supply position in any Fluid fToken (an ERC-4626 lending vault). Each configured fToken contributes a single `Supplied` leg denominated in the fToken's underlying asset.

* **Type:** Meta-adapter
* **protocolSubId:** `keccak256("fluid-ftokens")`
* **Instance key:** the fToken (ERC-4626 vault) address, widened to `bytes32`.
* **Source:** `FluidFTokensMetaBalanceAdapter.sol`

## Positions returned

One leg per configured fToken:

| Leg    | PositionKind | isDebt  | Description                                                |
| ------ | ------------ | ------- | ---------------------------------------------------------- |
| Supply | `Supplied`   | `false` | The fToken share balance converted to the underlying asset |

A leg is dropped when the underlying asset is not registered in NAVCalculator, when the computed amount is zero, or when filtered out by `assetFilter`.

## Balance calculation

<figure><picture><source srcset="/files/ZRc7a20iRzaGcrTXHz4K" media="(prefers-color-scheme: dark)"><img src="https://1699303810-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUsQM4bzcmOPSgkWddkeN%2Fuploads%2FiyitMLdPSH074WX2XBCY%2Fmeta-fluid-ftokens.png?alt=media&amp;token=dbf87b0a-a6a1-4052-9177-7eed9d19ec81" alt="Flowchart of the Fluid fTokens balance adapter: read calls derive position legs into PositionBalance entries."></picture><figcaption><p>Fluid fTokens adapter: how the underlying balances reported to the NAV Calculator are derived.</p></figcaption></figure>

For the fToken at the instance coordinate:

```
asset  = fToken.asset()
amount = fToken.convertToAssets(fToken.balanceOf(account))
```

The amount is reported in the underlying asset (`asset`).

## Identity

* **positionId:** `abi.encode(address fToken)`
* **positionKind:** `Supplied`

There is no `labels` field on the position. The adapter implements `positionLabels(positionId)`, which returns `["Lending", "<fToken symbol()>"]` from the fToken's onchain symbol; surfaced only by the verbose reads (`getAccountPositionsVerbose` / `getAccountNavVerbose`); the full breadcrumb is `[protocolName, ...labels]`.

## Constructor

```solidity
constructor(address navCalculator_)
```

| Parameter        | Description                                                                       |
| ---------------- | --------------------------------------------------------------------------------- |
| `navCalculator_` | NAVCalculator address, used for the registered-asset registry. Must be a contract |

## Registration

Register the adapter with `addMetaBalanceAdapter(adapter, instances)`, then add or remove fTokens with `addMetaInstances(adapter, instances)` / `removeMetaInstances(adapter, instances)`. The instance coordinate is the fToken (ERC-4626 vault) address widened to `bytes32`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kpk.io/funds/infrastructure/architecture/onchain-accounting/meta-balance-adapters/fluid-ftokens.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
