import { GenericCurrency } from './general';
export interface BaseYields {
    variableBorrowRate: number;
    stableBorrowRate: number;
    depositRate: number;
}
export type RewardsMap = {
    [rewardId: string]: BaseYields;
};
export interface RewardEntry extends BaseYields {
    asset: string;
}
export type RewardsList = RewardEntry[];
export interface ConfigEntry {
    category: number;
    borrowCollateralFactor: number;
    collateralFactor: number;
    borrowFactor: number;
    /**
     * Liquidation penalty for this mode, as a fraction of the repaid debt that
     * the liquidator receives on top of par (e.g. `0.05` = 5% bonus). Mode-/
     * e-mode-specific where the protocol supports it (Aave e-modes, Dolomite
     * categories, Euler vaults). `0` when the asset cannot be liquidated in this
     * mode or the protocol does not expose a penalty.
     */
    liquidationPenalty: number;
    /**
     * Max fraction of debt repayable in a single liquidation (0..1). Mirrors the
     * pool-level {@link PoolData.closeFactor}; not e-mode-specific in any
     * supported protocol, so this is the same value across every mode of a
     * market — duplicated here for per-mode consumer convenience.
     */
    closeFactor: number;
    /**
     * Liquidation target health factor (e.g. 1.05). Set only by protocols whose
     * liquidation engine repays just enough debt to restore a position to a
     * target HF instead of using a fixed close factor (Aave V4, spoke-level).
     * Mirrors {@link PoolData.targetHealthFactor}; `undefined` where the protocol
     * has no such parameter.
     */
    targetHealthFactor?: number;
    collateralDisabled?: boolean;
    debtDisabled?: boolean;
}
interface PoolConfig {
    [category: string]: ConfigEntry;
}
export interface PoolData {
    poolId: string;
    underlying: string;
    asset: GenericCurrency;
    totalDeposits: string;
    totalDebtStable: string;
    totalDebt: string;
    totalLiquidity: number;
    /**
     * Cap-adjusted borrow liquidity in token units.
     * `min(totalLiquidity, max(0, borrowCap - totalDebt))` when `borrowCap > 0`.
     * Equals `totalLiquidity` when no borrow cap is active (`borrowCap === 0`).
     */
    borrowLiquidity: number;
    totalDepositsUSD: number;
    totalDebtStableUSD: number;
    totalDebtUSD: number;
    totalLiquidityUSD: number;
    borrowLiquidityUSD: number;
    /**
     * Borrow utilization as a 0..1 fraction — the IRM input for this market.
     * Pool protocols: `totalDebt / totalDeposits` of the market itself.
     * Shared-liquidity protocols (Fluid): the Liquidity-layer utilization of
     * this row's token, since rates are set at that layer — never a
     * vault-level ratio.
     */
    utilization: number;
    /**
     * Fluid collateral rows only: share of the vault's collateral currently
     * locked below the Liquidity-layer withdrawal limit
     * (`withdrawLimit / totalSupplyVault`, 0..1).
     */
    lockupRatio?: number;
    /**
     * Totals in the IRM's own utilization basis (token units), for protocols
     * where the rate curve is defined over a larger pool than this row:
     * Aave V4 hub (`liquidity + drawn + swept` / `drawn`), Fluid Liquidity
     * layer, Gearbox pool. `irmTotalDebt / irmTotalDeposits == utilization`.
     * Rate-impact simulations must shift these, not the row totals.
     */
    irmTotalDeposits?: number;
    irmTotalDebt?: number;
    depositRate: number;
    variableBorrowRate: number;
    stableBorrowRate: number;
    intrinsicYield: number;
    rewards: RewardsList;
    decimals: number;
    config: PoolConfig;
    collateralActive: boolean;
    borrowingEnabled: boolean;
    depositsEnabled: boolean;
    hasStable: boolean;
    isActive: boolean;
    isFrozen: boolean;
    borrowCap: number;
    supplyCap: number;
    debtCeiling: string;
    /**
     * Max fraction of a borrower's debt that can be repaid in a single
     * liquidation (0..1). Protocol-level constant for most lenders:
     * `0.5` for Aave (rises to `1` once health factor drops below the
     * close-factor threshold) and Compound V2's `closeFactorMantissa`.
     * `1` (full liquidation) for isolated / credit-account protocols
     * (Compound V3, Morpho, Euler, Fluid, Gearbox, Dolomite, Silo).
     */
    closeFactor: number;
    /**
     * Liquidation target health factor (e.g. 1.05) for protocols that liquidate
     * to a target HF rather than by a fixed close factor (Aave V4, spoke-level).
     * `undefined` where the protocol has no such parameter.
     */
    targetHealthFactor?: number;
}
export type LenderData = {
    [chainId: string]: {
        data: {
            [lender: string]: {
                data: {
                    [poolId: string]: PoolData;
                };
                chainId: string;
            };
        };
        lastFetched: number;
    };
};
export {};
//# sourceMappingURL=apiReturnType.d.ts.map