/** * Sentiment Engine — tracks buy/sell pressure via EMA and adjusts DBC fees. * * The engine computes a signed sentiment score in [-1e9, +1e9]. * Bullish sentiment → lower fees (to incentivise more buying). * Bearish sentiment → higher fees (to slow down selling pressure). * * Fee adjustment is symmetric and bounded by sentimentFeeRangeBps. */ import type { Connection, PublicKey } from "@solana/web3.js"; import type { SentimentState, AdaptiveCurveConfig } from "../types/index.js"; export interface SentimentUpdate { recentBuyVolume: bigint; recentSellVolume: bigint; windowSlots: number; } export interface FeeAdjustment { baseFeeNumerator: bigint; adjustedFeeNumerator: bigint; sentimentScore: bigint; adjustmentBps: number; } /** * Apply sentiment score to compute an adjusted fee numerator. * * Logic: * - score > 0 (bullish): reduce fee by up to sentimentFeeRangeBps * - score < 0 (bearish): increase fee by up to sentimentFeeRangeBps * - Linear interpolation within the range */ export declare function computeSentimentAdjustedFee(baseFeeNumerator: bigint, sentimentScore: bigint, sentimentFeeRangeBps: number, feeDenominator?: bigint): FeeAdjustment; /** * Update EMA-based sentiment state with new buy/sell volumes. * Returns the updated state — caller should pass this to update_curve_sentiment. */ export declare function updateSentimentState(current: SentimentState, update: SentimentUpdate, currentSlot: bigint): { updatedState: SentimentState; feeAdjustment: FeeAdjustment; curveConfig: AdaptiveCurveConfig; }; /** * Derive the sentiment state PDA and fetch on-chain data. */ export declare function fetchSentimentState(connection: Connection, dbcPool: PublicKey): Promise; /** Human-readable sentiment label */ export declare function sentimentLabel(score: bigint): string; //# sourceMappingURL=sentiment-engine.d.ts.map