import { GenericCurrency } from '../../types/general';
import type { VaultClassificationFields } from '../classification';
/**
 * Parsed Aave Earn vault entry.
 *
 * Aave Earn ("stable") vaults are curator-run, standard ERC-4626
 * yield-bearing wrappers over an Aave v3 supply position (the vault
 * supplies its assets into an Aave reserve and skims a performance fee
 * on the yield). Shares are minted 1:1 in decimals with the underlying,
 * so `decimals === assetDecimals` for every entry today — but we still
 * carry `assetDecimals` explicitly to stay uniform with the other
 * providers and survive a future divergent vault.
 *
 * Data provenance is hybrid:
 *  - The Aave public GraphQL API (`https://api.v3.aave.com/graphql`)
 *    supplies discovery, identity, the underlying reserve, `vaultApr`
 *    and `totalAssets` (the reserve `balance`).
 *  - A light on-chain multicall supplies `totalSupply`, the share
 *    `decimals`, and `convertToAssets` (share price) — none of which the
 *    API exposes on the generic `Vault` type.
 *
 * Mirrors the cross-provider load-bearing fields (`address`,
 * `underlying`, `symbol`, `name`, `decimals`, `totalAssets`,
 * `totalSupply`) so `buildVaultLookup` picks it up without branching.
 */
export interface AaveEarnVault extends VaultClassificationFields {
    /** Vault (share token) contract address, lowercased. */
    address: string;
    /** Underlying ERC-20 address, lowercased (the reserve's `underlyingToken`). */
    underlying: string;
    /** Share-token symbol, e.g. `steakUSDC`. */
    symbol: string;
    /** Share-token name as returned by the API (`shareName`). */
    name: string;
    /** Cross-provider UI label — `${curatorName ?? 'Aave'} ${symbol}`. */
    displayName: string;
    /** Curator display name, when resolvable from the vault owner. */
    curatorName?: string;
    /** Vault owner (curator) address, lowercased. */
    owner: string;
    /** Share-token decimals (equals `assetDecimals` for aToken vaults). */
    decimals: number;
    /** Underlying asset decimals. */
    assetDecimals: number;
    /** Total underlying held by the vault, raw integer as string
     *  (asset-decimal scaled). From the reserve `balance` (`totalAssets`). */
    totalAssets: string;
    /** Total shares minted, raw integer as string. From on-chain
     *  `totalSupply()`. */
    totalSupply: string;
    /** Raw `convertToAssets(10**shareDecimals)` — 1 share → X underlying,
     *  asset-decimal scaled. From on-chain `convertToAssets`. Folded into the
     *  uniform `sharePrice*` fields by `stampVaultClassification`. */
    convertToAssets: string;
    /** Raw `convertToShares(10**underlyingDecimals)` — 1 underlying → X shares. */
    convertToShares: string;
    /** Supply APR in percent (e.g. `4.25` = 4.25 %). Aave `vaultApr`
     *  (already net of the vault fee). */
    supplyRate: number;
    /** Extra rewards APR in percent. 0 for v1. */
    rewardsRate: number;
    /** Sum of `supplyRate + rewardsRate` — what a depositor earns. */
    depositRate: number;
    /** Vault performance fee, fraction (e.g. `0.1` = 10 %). From `fee`. */
    fee: number;
    /** True — Aave Earn vaults are standard synchronous ERC-4626 vaults. */
    isErc4626: true;
    /** Hydrated asset metadata from the provided token list, if any. */
    asset?: GenericCurrency;
    /** USD price of one underlying unit (API `usdPerToken`, else prices map). */
    priceUsd?: number;
    /** Human-formatted total assets (`totalAssets / 10**assetDecimals`). */
    totalAssetsFormatted: number;
    /** Human-formatted total assets in USD. */
    totalAssetsUsd: number;
}
/**
 * Full parsed payload: per-vault-address map (parity with the other
 * providers). Keyed by lowercased vault address.
 */
export type AaveEarnVaults = {
    [vaultAddress: string]: AaveEarnVault;
};
//# sourceMappingURL=types.d.ts.map