# Liquidity Flows block

> Lending pool liquidity chart with asset-stacked supply, withdrawals below zero and a TVL lane

Lending pool supply stacked by asset over withdrawals below zero, with TVL in a lane above, 30D, 90D or 1Y ranges, an asset filter and a menu for layers, CSV and copy. ReUI Frame, Badge, IconTile; shadcn Chart, Dropdown Menu.

- Type: Pro block
- Category: [Composed Chart](https://web.dev.reui.io/blocks/chart/composed-chart.md)
- Page: https://web.dev.reui.io/blocks/chart/composed-chart/chart-19
- MCP: `get_block("chart-19")`
- Built with: Badge, Button, Button Group, Chart, Dropdown Menu, Frame, Icon Tile, Spinner, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Daily, weekly or monthly supply stacked by asset over withdrawals below zero, with the TVL those flows add up to drawn in a lane above

## Agent notes

- Replace `buildYear` in data.ts with real daily `supplied` and `withdrawn` per asset in USD millions; `balance` must keep adding each day's net to `opening`
- Assets live in `ASSETS` with a light and dark `color` and a matching `swatch`; a new one needs its key in `AssetKey` and its daily values in `buildYear`
- `actions.refresh` only replays the reveal and restamps Synced; `downloadCsv`, `copyData` and `copySummary` export the plotted assets of the current range

## When not to use

- One cashflow series whose total sums the months a range picker keeps: use [Cashflow Trend](https://web.dev.reui.io/blocks/chart/composed-chart/chart-21.md) (`get_block("chart-21")`)
- One tall balance line that marks only its peaks, troughs and a dated event: use [Balance Tracker](https://web.dev.reui.io/blocks/chart/line-chart/chart-4.md) (`get_block("chart-4")`)

## Third-party libraries

- Recharts v3: [API reference](https://recharts.github.io/en-US/api/), [docs](https://recharts.github.io/en-US/guide/getting-started/)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/chart-19
```

## About Composed Chart blocks

### When to use

- Bars and a line on one time axis, such as revenue and opex columns under an operating margin line
- A measure against its goal or limit, such as closed sales against a dashed goal or latency past a limit
- Cash or liquidity flowing in and out by period, over the balance those flows add up to

### When not to use

- One volume series alone, with no goal or baseline to compare against: use the [Area Chart blocks](https://web.dev.reui.io/blocks/chart/area-chart.md)
- Two or more series drawn only as strokes across shared time buckets: use the [Line Chart blocks](https://web.dev.reui.io/blocks/chart/line-chart.md)

### Agent notes

- Every block plots in a recharts `ComposedChart` in the shadcn `ChartContainer`; a new series is one more `Bar`, `Area` or `Line` child with a `dataKey`

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
