# SperaxOS Yield Optimizer – Compare DeFi Pool vs HODL

> SperaxOS Yield Optimizer – Compare DeFi Pool vs HODL is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-21).

Compares the historical returns of a DeFi liquidity pool against a simple HODL strategy for a given investment amount and date range.

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/yield-optimizer/compareToHodl?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-yield-optimizer-compare-defi-pool-vs-hodl-feeed427
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__a9G8nMM68QKbZr3gLt6k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability speraxos-yield-optimizer-compare-defi-pool-vs-hodl-feeed427 -d '<json body>'
```

Example prompt: Using SperaxOS, compare how a $10,000 investment in DefiLlama pool '747c1d2a-c668-4682-b9f7-997d4a610121' would have performed from 2024-01-01 to 2024-06-30 versus simply holding the tokens.

## When to prefer this

Use this endpoint when you need to quantitatively answer whether providing liquidity in a specific DeFi pool was more profitable than simply holding the underlying assets over a historical time window. It is ideal for backtesting LP decisions, justifying or challenging yield farming strategies, or generating evidence-based portfolio insights. Prefer this over generic portfolio trackers when the specific question is yield-vs-HODL comparison anchored to a DefiLlama pool.

## Known failure modes

- Invalid or unrecognized pool UUID returns an error or empty result
- Start date after end date causes a validation error
- Future dates or date ranges with no historical data may return null or incomplete results
- Very small investment amounts may produce negligible or zero differences
- Pool data gaps in DefiLlama for the requested period may cause incomplete calculations

## How this service works

SperaxOS is an AI-powered DeFi operating system — track portfolios, execute swaps, analyze on-chain data, and collaborate with intelligent agents that manage your crypto workflow.

## Output

Returns a structured comparison showing the DeFi pool's historical yield versus the equivalent HODL return for the specified investment amount and date range, including absolute and/or percentage performance figures for each strategy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "amount": {
   "type": "number",
   "description": "Investment amount in USD."
  },
  "poolId": {
   "type": "string",
   "description": "DefiLlama pool UUID."
  },
  "endDate": {
   "type": "string",
   "description": "End date ISO string."
  },
  "startDate": {
   "type": "string",
   "description": "Start date ISO string."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-yield-optimizer-compare-defi-pool-vs-hodl-feeed427/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
