import { DataService } from '../services/DataService/data-service'; import { UserLending } from '../services/UserLending/user-lending'; import { DepositLimits, PlatformStats, Strategy, StrategyTranche } from './types'; /** * High-level facade for browsing Kasu lending strategies (pools). * * Handles epoch fetching internally so callers never need to know about epochs. */ export declare class StrategiesFacade { private _dataService; private _userLending; constructor(_dataService: DataService, _userLending: UserLending); /** * Fetch all active lending strategies. * * ```ts * const strategies = await kasu.strategies.getAll(); * ``` */ getAll(poolIds?: string[]): Promise; /** * The strategies a lender should actually see: active, not oversubscribed, * with the ones that still have capacity first and the highest max APY * next. `getAll` returns everything the subgraph knows about, including * pools that are wound down. * * The filter runs on the raw `PoolOverview[]` BEFORE mapping, so `_raw` on * every returned `Strategy` is the untouched pool object. */ getVisible(poolIds?: string[]): Promise; /** * The chain's performance fee. * * ⚠️ A PERCENTAGE IN 0..100 (`10` means ten percent), NOT a fraction — * feed it to `netEffectiveApy` as-is. Treating it as `0.10` computes a * nonsense negative rate that still renders as a plausible-looking * percentage, which is why the units are stated here and in * `netEffectiveApy`'s own JSDoc. * * ```ts * const feePercent = await kasu.strategies.getPerformanceFeePercent(); * const net = netEffectiveApy(strategy.tranches[0].apy, feePercent); * ``` */ getPerformanceFeePercent(): Promise; /** * Fetch a single strategy by pool ID. Returns `null` if not found. */ getById(poolId: string): Promise; /** * Aggregate platform statistics (TVL, loans, yield, loss rate). */ getPlatformStats(): Promise; /** * Calculate deposit limits for a specific tranche. * * @param tranche - A `StrategyTranche` from `getAll()` or `getById()`. * @returns min/max/capacity in ether-formatted USDC strings. */ calculateDepositLimits(tranche: StrategyTranche): DepositLimits; private mapPoolToStrategy; }