> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vaults.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# TVL Attribution

> Track the deposits, withdrawals, and current TVL your app, wallet, or frontend drives into DeFi vaults.

TVL tracking lets wallets, apps, protocol frontends, and other transaction builders measure the vault flows they generate.

By adding a Vaults.fyi tracking suffix to vault transactions, your integration can see which deposits and withdrawals came from your product, how much attributed TVL remains in each vault, and how that traffic changes over time in [portal.vaults.fyi](https://portal.vaults.fyi). The same attribution layer can also support monetization through fee rebate programs where available.

The tracking layer does not change the user's transaction path. Users still interact directly with the target vault or protocol contract. Vaults.fyi only adds attribution metadata to the calldata so confirmed onchain activity can be connected back to your integration.

## What you can track

Once your transactions are tagged, portal.vaults.fyi gives you a live view of the traffic and TVL your integration drives.

You can track:

* Deposits, withdrawals, redeems, claims, and other supported vault actions created by your integration.
* Current attributed TVL by vault, protocol, curator, and network.
* Daily TVL changes over time.
* User-level balances and transaction history for tracked vault interactions.
* Which flows are sticky and how much value remains in vaults after users enter.
* Which attributed flows may be eligible for fee rebate programs where available.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-vaults-list.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=d0c539cd492bdfa794b1cd1e88c24387" alt="TVL Tracking vault list showing attributed vault TVL, AVO, and network breakdown" width="1280" height="626" data-path="images/tvl-tracking-vaults-list.jpg" />
</Frame>

## Why integrators use it

<CardGroup cols={3}>
  <Card title="Prove your distribution" icon="chart-line" href="#what-you-can-track">
    Show the vault TVL your wallet, app, or frontend is driving instead of relying on off-chain estimates or partner-side reporting.
  </Card>

  <Card title="Analyze retained TVL" icon="database" href="#what-you-see-in-the-portal">
    Measure not only transaction volume, but how much value remains in vaults over time after users deposit.
  </Card>

  <Card title="Track and monetize" icon="circle-dollar-sign" href="#integration-paths">
    Use the free suffix endpoint to track attributed TVL for free in portal.vaults.fyi and support fee rebate programs where available.
  </Card>
</CardGroup>

## Integration paths

There are two ways to enable TVL tracking.

### Option 1: Use the Vaults.fyi Transactions API

Every transaction created with the Vaults.fyi Transactions API automatically has TVL tracking enabled.

If you use Vaults.fyi to generate deposit, redeem, claim, or other supported vault transaction payloads, no additional integration work is required. The returned transaction data already includes the tracking suffix, so deposits and withdrawals can be attributed and reported in portal.vaults.fyi.

For apps and wallets that want Vaults.fyi to prepare the full vault transaction, this is the simplest path: request the transaction payload, pass it to the user's wallet, and tracking is included automatically.

### Option 2: Use your own transaction builder with the free suffix endpoint

If you already build vault transactions yourself, use the free suffix endpoint. It returns a short calldata suffix that you append to your existing transaction data.

This is the recommended path for wallets, apps, and protocol frontends that already build vault transactions themselves but want to track their deposits and withdrawals so they can analyze the flows and see their traffic.

## Generating attribution suffixes for existing transaction flows

This section is designed for integrators who already have their own transaction-building flow.

### What you need

* A free Vaults.fyi account. Accounts are currently invite-only.
* An API key created from that account.
* Access to [portal.vaults.fyi](https://portal.vaults.fyi), **where attributed TVL can be tracked for free**.
* The user wallet address and vault ID for each transaction being tagged.

### Endpoint

```http theme={null}
GET https://api.vaults.fyi/v2/transactions/suffix/{userAddress}/{vaultId}
x-api-key: YOUR_API_KEY
```

**The endpoint is free to use.** The returned suffix identifies your integration for TVL attribution.

The suffix is generated from both the user wallet address and the vault ID. Vaults.fyi uses these values to correctly attribute transactions even when the submitted transaction path is more complex than a simple EOA-to-vault call, including account abstraction, smart wallets, relayers, and other flows where the transaction sender may not be the same as the end user whose vault position should be tracked.

Example response:

```json theme={null}
{
  "suffix": "d9d16d34ffb15ba3263708f3dcff6ee7535a2a0fffc69deb"
}
```

### Append the suffix to calldata

Append the returned suffix to your existing calldata without adding another `0x` prefix:

```ts theme={null}
const tx = buildVaultTransaction(...)

const { suffix } = await fetch(
  `https://api.vaults.fyi/v2/transactions/suffix/${userAddress}/${vaultId}`,
  {
    headers: {
      "x-api-key": process.env.VAULTS_FYI_API_KEY,
    },
  }
).then((response) => response.json())

const trackedTransaction = {
  ...tx,
  data: `${tx.data}${suffix}`,
}
```

Append the suffix to every vault transaction you want attributed, including deposits, withdrawals, redeems, claims, and any other supported vault action. Attribution is transaction-level: if a transaction is sent without the suffix, Vaults.fyi cannot attribute that flow to your integration.

Send `trackedTransaction` through your normal wallet or transaction pipeline. Once confirmed onchain, the transaction can be attributed and analyzed for free in [portal.vaults.fyi](https://portal.vaults.fyi).

<Note>
  The transaction recipient, value, chain, and function arguments do not change. Only the calldata string is extended with the tracking suffix.
</Note>

## What you see in the portal

Portal views are organized as a drill-down from your aggregate attributed TVL to individual user-vault activity.

### 1. Overview: total attributed TVL

Start with the overview to see total attributed value, asset allocation, and daily TVL over time.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-overview.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=b70d7a263b1959d2b14a36afb9f8396d" alt="TVL Tracking overview showing total net TVL, asset allocation, and daily TVL chart" width="1280" height="713" data-path="images/tvl-tracking-overview.jpg" />
</Frame>

### 2. Breakdown: protocol or curator source

Drill into attributed TVL by protocol or curator to understand where your tracked flows are landing and how those balances change over time.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-by-protocol.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=d3bf2d97c7e221f66ff43636f33acbc9" alt="TVL Tracking protocol breakdown showing daily TVL by protocol and protocol table" width="1280" height="841" data-path="images/tvl-tracking-by-protocol.jpg" />
</Frame>

### 3. Vaults: attributed TVL by vault

Open a source to see the vaults receiving tracked flows, including network, APY, average value outstanding, and net TVL.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-vaults-list.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=d0c539cd492bdfa794b1cd1e88c24387" alt="TVL Tracking vault list showing vaults, networks, APY, AVO, and net TVL" width="1280" height="626" data-path="images/tvl-tracking-vaults-list.jpg" />
</Frame>

### 4. Vault detail: users in a specific vault

Select a vault to inspect its daily attributed TVL and the users contributing to that balance.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-vault-detail.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=62bea1ca1536ed87120056361141e116" alt="TVL Tracking vault detail showing Smokehouse USDC daily TVL and users table" width="1280" height="805" data-path="images/tvl-tracking-vault-detail.jpg" />
</Frame>

### 5. User detail: transaction-level history

Open a user to review the attributed balance and transaction history for that user-vault relationship.

<Frame>
  <img src="https://mintcdn.com/vaultsfyi/zKbxeugRJRheH6u0/images/tvl-tracking-user-detail.jpg?fit=max&auto=format&n=zKbxeugRJRheH6u0&q=85&s=81849a7535ba6b679295311bf62a7440" alt="TVL Tracking user detail showing daily TVL and transaction history" width="1280" height="853" data-path="images/tvl-tracking-user-detail.jpg" />
</Frame>

## For curators and protocols

Curators and protocols can use this page as an integration guide for wallets, apps, and other distribution partners.

Send integrators the [attribution suffix guide](#generating-attribution-suffixes-for-existing-transaction-flows) so they can create an API key, append the suffix to their existing vault transactions, and make their flows visible in portal.vaults.fyi.

Once integrators tag transactions, curators and protocols can use the portal to understand which partners are routing users into their vaults and how much TVL remains attributable to those flows.

## API reference

See the full endpoint reference at [/api-reference/transactions](/api-reference/transactions), or explore the live OpenAPI spec at `https://api.vaults.fyi/v2/documentation/json`.
