# EarnShares.minimumOutput

Lowers an expected output by a basis-point slippage tolerance, flooring to `1n`.

Suitable for lower bounds such as a deposit's minimum shares or a redeem's minimum assets; not for upper bounds such as an exact withdrawal's maximum shares.

## Imports

:::code-group
```ts [Named]
import { EarnShares } from 'ox/tempo'
```

```ts [Entrypoint]
import * as EarnShares from 'ox/tempo/EarnShares'
```
:::

## Examples

```ts twoslash
import { EarnShares } from 'ox/tempo'

const minimumShares = EarnShares.minimumOutput(
  1_000_000n,
  50
)
// @log: 995_000n
```

## Definition

```ts
function minimumOutput(
  expectedAmount: bigint,
  slippageBps: number,
): bigint
```

**Source:** [src/tempo/EarnShares.ts](https://github.com/wevm/ox/blob/main/src/tempo/EarnShares.ts#L236)

## Parameters

### expectedAmount

* **Type:** `bigint`

Expected output in base units.

### slippageBps

* **Type:** `number`

Allowed slippage in basis points from `0` through `9_999`.

## Return Type

The minimum accepted output, floored to `1n`.

`bigint`
