Back to Scenarios
Attack Scenario

Slippage Hallucination

Agent swaps into illiquid pool, suffers 94% loss on single trade

$340K Lost
73% of failures
~4 seconds to drain

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

1

Agent Reads Stale Data

elizaOS agent queries price from cached oracle. SOL shows $142.50 but actual market is $138.20.

2

LLM Calculates Expected Output

Agent calculates expected 5,000 USDC for 35 SOL swap based on stale price. Expects 2% slippage max.

3

Swap Routed to Illiquid Pool

Jupiter routes to low-liquidity pool with $50K TVL. Actual slippage: 94%.

4

Transaction Executes

Without AgentSentry: swap completes. Agent receives $297 instead of $5,000. Treasury loses $4,700 on single trade.

AgentSentry Intervention Points

Slippage ThresholdBLOCKED

Policy maxSlippage: 2% — actual: 94% — exceeds limit by 47x

Volume GuardBLOCKED

Single trade $5K > epoch single-tx limit $2K

Pool Liquidity CheckBLOCKED

Target pool TVL $50K < minimum $500K threshold

Price FreshnessWARNING

Oracle data 45 seconds stale — refresh required

Result: Transaction BLOCKED

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

Shield Your Agent