---
title: floorValueDown
description: USDC value of an AVM amount at the floor, rounded down.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

`wadToRaw(avm × floorPrice / WAD)`, both steps floored. Used for redeem payouts and borrow capacity so the quoted USDC still fits on-chain.

The matching ceil path is used for liabilities (`floorValueUp`, not exported as a branded helper — see [floorLiability](/developers/math/floor-liability)).

## Import

```ts
import { floorValueDown } from "@repo/contract-client/math";
```

## Usage

```ts
const gross = floorValueDown(parseAvm("1000"), snapshot.floorPriceWad);
```

## Return Value

`bigint` (USDC raw, 6 decimals).

## Parameters

### avmAtoms

- **Type:** `bigint` (`AvmAtoms`)

Token amount, 18 decimals.

```ts
floorValueDown(position.collateralAvm, snapshot.floorPriceWad);
```

### floorPriceWad

- **Type:** `bigint` (`Wad`)

```ts
floorValueDown(amount, snapshot.floorPriceWad);
```

## Error

`InvalidAmountError` if either input is negative.
