import { GenericCurrency } from '../../types/general';
import type { VaultClassificationFields } from '../classification';
/**
 * Withdrawal mode for a savings vault. Drives UX: instant for plain
 * ERC-4626 wrappers, fixed-cooldown for Ethena-style sUSDe, queued for
 * Maple syrup pools, etc.
 *
 * Identical enumeration to `LstWithdrawalMode` from `vaults/lst/` —
 * kept separate so the two providers can evolve independently without
 * one provider's withdrawal taxonomy creep affecting the other.
 */
export type SavingsWithdrawalMode = 'instant' | 'fixed-cooldown' | 'queued' | 'request-based' | 'fee-or-queued';
/**
 * Parsed savings-vault entry.
 *
 * Models ERC-4626 yield wrappers — sUSDe, sUSDS, sDAI, stUSD, sUSDF,
 * siUSD, savUSD, syrupUSDC/USDT, wstUSR, yUSD, yoETH, … — under a
 * uniform shape. Structurally compatible with
 * [`buildVaultLookup`](../lookup.ts) (same load-bearing fields as
 * `LstShareToken`, `FluidFToken`, `EulerEarnVault`).
 *
 * Most entries are real ERC-4626 (asset-keyed share token with
 * `convertToAssets` / `totalAssets`). A few wrap a rebasing
 * underlying (wstUSR, wsrUSD); those are still 4626 on the wrapper
 * but their `asset()` returns a rebasing token, which downstream
 * `priceUsd` math should be aware of.
 */
export interface SavingsVault extends VaultClassificationFields {
    /** Share-token contract address, lowercased. */
    address: string;
    /** Underlying ERC-20 address, lowercased. */
    underlying: string;
    /** Share-token symbol, e.g. `sUSDe`, `sUSDS`, `sDAI`. */
    symbol: string;
    /** Share-token name as returned by `name()`, or a falsy-safe
     *  fallback `${brand} ${symbol}`. */
    name: string;
    /** Cross-provider UI label — `${brand} ${symbol}`
     *  (e.g. `Ethena sUSDe`, `Sky sUSDS`). Always non-empty. */
    displayName: string;
    /** Brand label — `Ethena`, `Sky`, `Maker`, `Angle`, `Falcon`, … */
    brand: string;
    /** Alias for `brand` to match `curatorName` on the other providers'
     *  vault types — keeps cross-provider UI code uniform. */
    curatorName: string;
    /** Share decimals (most are 18; Maple syrup* are 6). */
    decimals: number;
    /** Underlying asset decimals. Equals `decimals` for nearly every entry;
     *  diverges for e.g. yUSD (18-dec shares over 6-dec USDC). Load-bearing
     *  for share→asset formatting and the cross-provider `sharePrice`
     *  (parity with the LST/Lagoon/Yearn providers). */
    assetDecimals: number;
    /** Total underlying held, raw integer (wei-like) as string. From
     *  `totalAssets()`. */
    totalAssets: string;
    /** Total shares minted, raw integer as string. */
    totalSupply: string;
    /** Raw `convertToShares(10**decimals)` — 1 underlying → X shares. */
    convertToShares: string;
    /** Raw `convertToAssets(10**decimals)` — 1 share → X underlying. */
    convertToAssets: string;
    /** 1e18-scaled exchange rate: 1 share → X underlying. Derived from
     *  `convertToAssets(10**decimals)` regardless of share decimals. */
    exchangeRate: string;
    /** Supply APR in percent (e.g. `7.42` = 7.42 %). Sourced from the
     *  matching intrinsic-yield fetcher. */
    supplyRate: number;
    /** Extra rewards APR in percent — usually 0; populated when the
     *  protocol layers a separate reward stream on top. */
    rewardsRate: number;
    /** Sum of `supplyRate + rewardsRate` — what a depositor actually
     *  earns. */
    depositRate: number;
    /** Always true for this provider — every entry is ERC-4626. Kept
     *  for API parity with `LstShareToken.isErc4626`. */
    isErc4626: true;
    /** Whether the share token itself rebases. False for nearly every
     *  savings vault (they're the non-rebasing wrapper); rebasing
     *  surfaces sit on the underlying (e.g. USDe inside sUSDe). */
    isRebasing: boolean;
    /** Whether deposits are permissionless on-chain. False for entries
     *  whose mint surface is allowlist-gated. */
    isMintable: boolean;
    /** Mint entry — usually equals `address` (deposit on the share
     *  token directly via ERC-4626 `deposit`/`mint`). May differ for
     *  protocols with a dedicated minter / zap contract. */
    mintContract?: string;
    /** Withdrawal mechanism. */
    withdrawalMode: SavingsWithdrawalMode;
    /** Fixed cooldown in seconds for `fixed-cooldown` mode. Some
     *  protocols (Ethena, Avant) expose this on-chain via
     *  `cooldownDuration()`. Static value here pinned in the registry —
     *  re-read on-chain if you need the precise governance-current
     *  value. */
    withdrawalCooldownSeconds?: number;
    /** Hydrated asset metadata from the provided token list, if any. */
    asset?: GenericCurrency;
    /** USD price of one underlying unit, if prices were supplied. */
    priceUsd?: number;
    /** Human-formatted total assets (`totalAssets / 10**decimals`). */
    totalAssetsFormatted: number;
    /** Human-formatted total assets in USD. */
    totalAssetsUsd: number;
    /** Instantly-withdrawable underlying right now, raw integer string,
     *  derived from `withdrawalMode`: `instant` vaults are fully liquid
     *  (`= totalAssets`); `fixed-cooldown` / `queued` / `request-based` /
     *  `fee-or-queued` vaults require a waiting period, so their
     *  instantaneous withdrawable is `0`. (A cooldown vault's underlying
     *  may still be redeemable after the wait — this field is the *right
     *  now* figure, matching the cross-provider `liquidity` semantic.) */
    liquidity: string;
    /** Human-formatted withdrawable liquidity. */
    liquidityFormatted: number;
    /** Withdrawable liquidity in USD. */
    liquidityUsd: number;
}
/**
 * Full parsed payload: per-share-token-address map.
 *
 * Keyed by lowercased share-token address (parity with Morpho / Silo
 * / Euler-Earn / LST). Many savings vaults share the same underlying
 * (sUSDS and sDAI both wrap stable-ish ERC-20s, syrupUSDC wraps USDC,
 * etc.) so per-share-address keying is the only sensible choice.
 */
export type SavingsVaults = {
    [shareAddress: string]: SavingsVault;
};
//# sourceMappingURL=types.d.ts.map