use anchor_lang::prelude::Pubkey;
use fix::prelude::*;
use hylo_core::borrow_rate::BorrowRateConfig;
use hylo_core::yields::{HarvestCache, YieldHarvestConfig};
#[derive(Debug, Clone, Copy)]
pub struct RealizedHarvest {
pub epoch: u64,
pub hyusd_to_pool: UFix64<N6>,
pub is_stale: bool,
}
#[derive(Debug, Clone, Copy)]
pub struct LstPosition {
pub sol_value: UFix64<N9>,
pub epoch_growth: UFix64<N9>,
}
#[derive(Debug, Clone, Copy)]
pub struct ExoSnapshot {
pub collateral_mint: Pubkey,
pub harvest_cache: HarvestCache,
pub borrow_rate_config: BorrowRateConfig,
pub levercoin_market_cap: UFix64<N9>,
}
#[derive(Debug, Clone)]
pub struct StatsInputs {
pub current_epoch: u64,
pub pool_balance: UFix64<N6>,
pub shyusd_supply: UFix64<N6>,
pub lst_harvest_cache: HarvestCache,
pub harvest_config: YieldHarvestConfig,
pub lst_positions: Vec<LstPosition>,
pub exo_snapshots: Vec<ExoSnapshot>,
pub sol_usd_spot: UFix64<N9>,
pub outstanding_drawdown: UFix64<N6>,
pub epochs_per_year: f64,
}
#[derive(Debug, Clone, Copy)]
pub struct ExoStats {
pub collateral_mint: Pubkey,
pub harvest: RealizedHarvest,
pub projected_inflow: UFix64<N6>,
}
#[derive(Debug, Clone)]
pub struct EarnPoolStats {
pub nav: UFix64<N6>,
pub pool_balance: UFix64<N6>,
pub shyusd_supply: UFix64<N6>,
pub current_epoch: u64,
pub epochs_per_year: f64,
pub lst_harvest: RealizedHarvest,
pub exo_stats: Vec<ExoStats>,
pub last_epoch_yield_rate: UFix64<N9>,
pub naive_apy: f64,
pub projected_lst_inflow: UFix64<N6>,
pub projected_exo_inflow: UFix64<N6>,
pub outstanding_drawdown: UFix64<N6>,
pub projected_epoch_rate: UFix64<N9>,
pub projected_apy: f64,
}