/** * @dev Holding fees calculation utilities for v10+ markets * @dev Combines funding fees and borrowing v2 fees */ import { FundingFeeParams, PairFundingFeeData, PairOiAfterV10 } from "../../trade/fees/fundingFees/types"; import { BorrowingFeeParams, PairBorrowingFeeData } from "../../trade/fees/borrowingV2/types"; export type HoldingFeeRates = { longHourlyRate: number; shortHourlyRate: number; fundingFeeLongHourlyRate: number; fundingFeeShortHourlyRate: number; borrowingFeeHourlyRate: number; currentFundingRatePerSecondP: number; currentBorrowingRatePerSecondP: number; }; export type GetPairHoldingFeeRatesInput = { fundingParams: FundingFeeParams; fundingData: PairFundingFeeData; pairOiToken: PairOiAfterV10; netExposureToken: number; netExposureUsd: number; borrowingParams: BorrowingFeeParams | null; borrowingData: PairBorrowingFeeData | null; currentPairPrice: number; currentTimestamp: number; }; /** * @dev Calculates current holding fee rates per hour for display * @param input Input parameters for calculation * @returns Holding fee rates per hour with breakdown */ export declare const getPairHoldingFeeRates: (input: GetPairHoldingFeeRatesInput) => HoldingFeeRates; /** * @dev Converts a per-second rate to annual percentage rate (APR) * @param ratePerSecond Rate per second * @returns Annual percentage rate */ export declare const convertRatePerSecondToAPR: (ratePerSecond: number) => number; /** * @dev Formats a holding fee rate for display * @param rate Hourly rate (can be negative) * @param decimals Number of decimal places * @returns Formatted string with sign */ export declare const formatHoldingFeeRate: (rate: number, decimals?: number) => string; export * as HoldingFees from "./types";