# Straelo DeFi Route Decision

> Straelo DeFi Route Decision is a paid API for AI agents from relay.straelo.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-12-02).

Compares Base swap quotes from 1inch and KyberSwap across multiple economic dimensions and returns a deterministic routing decision (EXECUTE_BEST, WAIT, or INSUFFICIENT_DATA)

## Facts

- Endpoint: POST https://relay.straelo.com/defi-route-decision?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/straelo-defi-route-decision-05242ba3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-gdDx80lWlvbQnw5nEI_t

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 straelo-defi-route-decision-05242ba3 -d '<json body>'
```

Example prompt: Compare swap quotes on Base for converting 500 USDC to ETH using 1inch and KyberSwap — with 50 bps slippage tolerance — and tell me whether to execute the best one or wait.

## When to prefer this

Use this endpoint when an AI agent or automated system needs a trusted, vendor-neutral go/no-go decision before executing a token swap on Base — particularly when comparing 1inch vs KyberSwap output matters, when price impact or divergence awareness is critical, or when you want a single structured verdict rather than raw quotes. Prefer this over querying each DEX aggregator separately when you need consensus scoring and a deterministic action recommendation baked in.

## Known failure modes

- One or both providers (1inch, KyberSwap) are unavailable, resulting in INSUFFICIENT_DATA or partial result
- Invalid or mismatched token_in/token_out pair (e.g. same token on both sides) returns a validation error
- amount_in is zero, negative, or non-numeric
- Requested chain is not Base (only Base mainnet is supported in this MVP)
- Extreme market volatility causes quotes to shift between provider fetch and response, reducing reliability
- slippage_bps outside 0–10000 range rejected
- Network latency to external providers causes timeout

## How this service works

Compare read-only Base swap quotes obtained from 1inch and KyberSwap, evaluating output, minimum output, fees/gas, price impact, consensus, and divergence to return a deterministic economic route decision (EXECUTE_BEST, WAIT, or INSUFFICIENT_DATA). The product consults external providers during the request; quotes reflect the market state observed at that moment and identical calls can produce different results. Provider unavailability or failure can yield a partial result or insufficient data.

## Output

A deterministic routing decision object including one of three verdicts (EXECUTE_BEST, WAIT, or INSUFFICIENT_DATA), the winning provider, normalized quote metrics from each aggregator (output amount, minimum output, gas/fees, price impact), a consensus signal, and a divergence measure between providers. When only one provider responds, a partial result may be returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base"
   ],
   "type": "string",
   "description": "Base Mainnet only in this quote-only MVP."
  },
  "token_in": {
   "enum": [
    "USDC",
    "USDT",
    "ETH",
    "WETH"
   ],
   "type": "string",
   "description": "Input Base asset symbol."
  },
  "amount_in": {
   "type": "string",
   "description": "Positive decimal input amount, converted exactly to raw token units."
  },
  "token_out": {
   "enum": [
    "USDC",
    "USDT",
    "ETH",
    "WETH"
   ],
   "type": "string",
   "description": "Output Base asset symbol; must differ from token_in."
  },
  "slippage_bps": {
   "type": "integer",
   "maximum": 10000,
   "minimum": 0,
   "description": "Slippage tolerance in basis points; it is not treated as a cost."
  },
  "baseline_provider": {
   "enum": [
    "oneinch",
    "kyberswap"
   ],
   "type": "string",
   "description": "Optional provider used only for a direct economic comparison."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "usage": {
   "provider_calls": []
  },
  "quotes": [],
  "status": "COMPARISON_AVAILABLE",
  "partial": false,
  "decision": "INSUFFICIENT_DATA",
  "consensus": {
   "basis": "gross_output_only",
   "comparable_output_raw": 0
  },
  "economics": {
   "total_estimated_cogs_usd": null
  },
  "confidence": "MEDIUM",
  "observed_at": "2026-01-01T00:00:00Z",
  "best_provider": "kyberswap",
  "decision_reason": "no valid quote from any provider",
  "decision_signals": {
   "confidence": "LOW",
   "is_outlier": null,
   "price_impact": null,
   "best_provider": null,
   "minimum_output": null,
   "provider_success_count": 0,
   "provider_failures_count": 0,
   "economic_advantage_basis": null
  },
  "evidence_quality": {},
  "provider_failures": [],
  "economic_advantage": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/straelo-defi-route-decision-05242ba3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from relay.straelo.com](https://www.zero.xyz/host/relay.straelo.com/llms.txt)
