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
Named
import { EarnShares } from 'ox/tempo'Examples
import { EarnShares } from 'ox/tempo'
const minimumShares = EarnShares.minimumOutput(1_000_000n, 50)
995_000nDefinition
function minimumOutput(
expectedAmount: bigint,
slippageBps: number,
): bigintSource: src/tempo/EarnShares.ts
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

