Slippage Hallucination
Agent swaps into illiquid pool, suffers 94% loss on single trade
Slippage hallucination occurs when an AI agent miscalculates the expected price slippage on a DEX trade — typically due to stale oracle data, overly optimistic liquidity assumptions, or hallucinated market conditions. 73% of agentic trading failures involve slippage miscalculation. AgentSentry prevents this via real-time slippage validation and minimum liquidity thresholds.
Attack Flow — Without AgentSentry
Agent Reads Stale Data
elizaOS agent queries price from cached oracle. SOL shows $142.50 but actual market is $138.20.
LLM Calculates Expected Output
Agent calculates expected 5,000 USDC for 35 SOL swap based on stale price. Expects 2% slippage max.
Swap Routed to Illiquid Pool
Jupiter routes to low-liquidity pool with $50K TVL. Actual slippage: 94%.
Transaction Executes
Without AgentSentry: swap completes. Agent receives $297 instead of $5,000. Treasury loses $4,700 on single trade.
AgentSentry Intervention Points
Policy maxSlippage: 2% — actual: 94% — exceeds limit by 47x
Single trade $5K > epoch single-tx limit $2K
Target pool TVL $50K < minimum $500K threshold
Oracle data 45 seconds stale — refresh required
AgentSentry intercepts the transaction before execution. Circuit remains CLOSED. Treasury protected.
Prevention Configuration
// AgentSentry Policy — Slippage Prevention
const policy: SentryPolicy = {
name: "slippage-guard",
rules: [
{
action: "SWAP",
maxSlippage: 0.02, // 2% max slippage
maxSingleTx: 2000, // $2K max per transaction
minPoolTvl: 500000, // Minimum $500K pool TVL
priceMaxAge: 15000, // Oracle data max 15 seconds old
},
],
onViolation: {
action: "BLOCK",
escalate: true, // Alert human operator
logLevel: "CRITICAL",
},
};Prevent Slippage Hallucination
Deploy AgentSentry in under 10 minutes