export declare const WAD = 1000000000000000000n;
export declare const LN_ONE_PLUS_DELTA = 4987541511039073n;
export declare const LN_2 = 693147180559945309n;
export declare const EXP_OFFSET = 322611214989459870n;
export declare const MAX_TICK = 6744n;
export declare const PRICE_ROUNDING_STEP = 100000000000n;
export declare const SECONDS_PER_YEAR = 31536000n;
/** WAD-scaled exponential approximation used by the Midnight tick curve. */
export declare function wExp(x: bigint): bigint;
/** Convert a Midnight tick into a WAD zero-coupon price (rounded to the step). */
export declare function tickToPrice(tick: bigint): bigint;
/** Convert a Midnight tick into a WAD fixed *period* rate (`1/price - 1`). */
export declare function tickToRate(tick: bigint): bigint;
/**
 * Convert a Midnight tick into a WAD simple APR, annualizing the period rate
 * over `timeToMaturity` seconds. Returns 0 for non-positive time-to-maturity
 * (matured / mispriced markets) rather than throwing.
 */
export declare function tickToApr(tick: bigint, timeToMaturity: bigint): bigint;
/** APR as a plain fraction (e.g. `0.0512` for 5.12%). Convenience for display. */
export declare function tickToAprNumber(tick: bigint, timeToMaturity: bigint): number;
/**
 * Midnight max liquidation-incentive factor (LIF), WAD-scaled, mirroring the
 * on-chain `ConstantsLib.maxLif`:
 *   `LIF = WAD² / (WAD − liquidationCursor·(WAD − lltv)/WAD)`
 * i.e. `1 / (1 − cursor·(1 − lltv))`. Unlike Morpho Blue, Midnight makes the
 * `liquidationCursor` a per-collateral market parameter and applies NO fixed
 * cap (Morpho hardcodes cursor = 0.3 and caps LIF at 1.15). Inputs are WAD.
 */
export declare function midnightMaxLif(lltv: bigint, liquidationCursor: bigint): bigint;
/**
 * Midnight liquidation penalty as a plain fraction (`LIF − 1`, e.g. `0.0438`
 * for a 4.38% liquidator bonus) — the value surfaced as `liquidationPenalty` in
 * the public store. Derived from the market's own `liquidationCursor`, so it
 * stays correct if a market deviates from the 0.3 cursor the Morpho
 * approximation assumes. Returns 0 when either input is non-positive.
 */
export declare function midnightLiquidationPenaltyNumber(lltv: bigint, liquidationCursor: bigint): number;
/**
 * Effective Midnight settlement fee as a plain fraction (e.g. `0.005` = 50 bps)
 * for a given time-to-maturity, mirroring the on-chain piecewise-linear curve
 * over the 7 cbp breakpoints. Post-maturity (ttm ≤ 0) uses the 0d breakpoint;
 * ttm ≥ 360d uses the 360d breakpoint; in between it linearly interpolates.
 * Returns 0 when the fee array is missing/short.
 */
export declare function midnightSettlementFeeForTtm(settlementFeeCbp: number[] | undefined, ttmSecs: number): number;
/**
 * Annualized Midnight continuous fee as a PERCENT (e.g. `1` = 1%/yr). The raw
 * value is a per-second WAD rate (uint32); annual fraction =
 * raw·SECONDS_PER_YEAR/1e18. Returns 0 for missing/zero input.
 */
export declare function midnightContinuousFeeAprPercent(continuousFeeRaw: string | bigint | undefined): number;
//# sourceMappingURL=math.d.ts.map