import memoize from 'memoizee'; import { FluidMarketData, FluidMerklRewardMap, MerklOpportunity, NetworkNumber } from '../types'; /** * Merkl tags Fluid vault-scoped reward campaigns via the opportunity `type` field: * - FLUIDVAULT_COLLATERAL → reward for supplying collateral to the vault * - FLUIDVAULT_BORROW → reward for borrowing from the vault * (ERC20LOGPROCESSOR campaigns target fToken earn positions rather than vaults, so they don't * belong on vault market data.) * * A campaign identifies its vault via `identifier` — the vault address. Conditional campaigns * append a marker to it (e.g. `0x5668…eeaBORROW_BL`, excluding holders who borrow the reward * asset elsewhere); those are still attached, with the full identifier passed through as * `eligibilityId` so a curated check in EligibilityMapping can gate them in net APY — unknown * ids apply unconditionally, mirroring Aave V3. Whitelist-gated campaigns only accrue to * whitelisted addresses, so they are skipped rather than advertised to every user. */ export declare enum FluidMerklOpportunityType { Collateral = "FLUIDVAULT_COLLATERAL", Borrow = "FLUIDVAULT_BORROW" } export declare const buildFluidMerklRewardMap: (opportunities: MerklOpportunity[], chainId: NetworkNumber) => FluidMerklRewardMap; /** * Fetches live vault-scoped Fluid campaigns for the chain, keyed by vault address. Never throws — * on any failure it returns an empty map, so Merkl being down can't break market data. */ export declare const getFluidMerklCampaigns: ((chainId: NetworkNumber) => Promise) & memoize.Memoized<(chainId: NetworkNumber) => Promise>; /** * Appends the vault's Merkl campaigns to its assets' incentive arrays — supply rewards on every * suppliable asset and borrow rewards on every borrowable one. Smart collateral/debt vaults hold * the position across both pair tokens, so the pro-rata reward APY applies to each side's value. */ export declare const attachFluidMerklIncentives: (marketData: FluidMarketData, campaigns: FluidMerklRewardMap) => FluidMarketData;