DeFi Route Decision
defi_route_decisionCompare live read-only Base swap quotes from 1inch and KyberSwap using output, fees/gas, price impact, consensus/divergence to return EXECUTE_BEST, WAIT or INSUFFICIENT_DATA. Provider failures: PARTIAL or UPSTREAM_UNAVAILABLE; quotes vary with market state. slippage_bps (basis points) sets local minimum_output; provider minOutAmount takes precedence. USE WHEN: choosing a quoted route or deciding to wait. DO NOT USE WHEN: executing, signing, submitting or authorizing swaps.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "base",
"token_in": "WETH",
"amount_in": "0.1",
"token_out": "USDC",
"slippage_bps": 50
},
"name": "defi_route_decision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Base Mainnet only in this quote-only MVP. | |
| token_in | Yes | Input Base asset symbol; must differ from token_out. | |
| amount_in | Yes | Positive decimal input amount as string (not float), converted exactly to raw token units per token_in decimals. | |
| token_out | Yes | Output Base asset symbol; must differ from token_in. | |
| slippage_bps | Yes | Slippage tolerance in basis points; sets local minimum_output when provider omits minOutAmount; provider's minOutAmount takes precedence if present; not a cost. | |
| baseline_provider | No | Optional comparison reference provider; sets economic advantage baseline, does not change best provider selection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | Per-provider call success, latency, and configured cost-estimate availability. | |
| quotes | Yes | Normalized provider quote evidence in raw token units. | |
| status | Yes | Quote comparison outcome: COMPARISON_AVAILABLE (≥2 valid quotes), PARTIAL (≥1 valid + ≥1 failed), UPSTREAM_UNAVAILABLE (0 valid quotes). | |
| partial | Yes | True when status is PARTIAL or UPSTREAM_UNAVAILABLE (i.e., any provider failed); false only when status=COMPARISON_AVAILABLE. | |
| decision | Yes | Deterministic economic decision (EXECUTE_BEST/WAIT/INSUFFICIENT_DATA); not a safety authorization, does not execute swaps. | |
| consensus | Yes | Comparable-output median and comparison basis when two provider quotes are valid. | |
| economics | Yes | Known or unknown estimated provider COGS; unknown is never represented as zero. | |
| confidence | Yes | Deterministic comparison confidence; never HIGH with only 2 providers. | |
| observed_at | Yes | UTC timestamp when the latest provider quote was observed during this request. | |
| best_provider | Yes | Best comparable provider when ≥2 valid quotes exist, else null. | |
| decision_reason | Yes | Human-readable deterministic reason for the decision. | |
| decision_signals | Yes | Objective signals used for the decision. | |
| evidence_quality | Yes | Per-provider reported, calculated, estimated, or unavailable field quality. | |
| provider_failures | Yes | Providers that failed to return a valid quote, with provider name and failure category. | |
| economic_advantage | Yes | Best quote versus declared baseline or next available quote; never ROI. |