@oracle-agent/oracle 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -4
- package/SETUP.md +5 -2
- package/artifacts/specialist-packs/oracle-full-crypto.json +3 -0
- package/dist/address-book.mjs +2 -2
- package/dist/assets/profiles/_template/SOUL.md +54 -0
- package/dist/assets/profiles/_template/profile.json +22 -0
- package/dist/assets/profiles/bitcoin-agent/SOUL.md +31 -0
- package/dist/assets/profiles/bitcoin-agent/profile.json +32 -0
- package/dist/assets/profiles/hyperliquid-agent/SOUL.md +34 -0
- package/dist/assets/profiles/hyperliquid-agent/profile.json +38 -0
- package/dist/assets/profiles/oracle/SOUL.md +134 -0
- package/dist/assets/profiles/oracle/profile.json +40 -0
- package/dist/assets/profiles/polymarket-agent/SOUL.md +35 -0
- package/dist/assets/profiles/polymarket-agent/profile.json +34 -0
- package/dist/assets/profiles/profile.schema.json +90 -0
- package/dist/assets/profiles/protocol-builder/SOUL.md +57 -0
- package/dist/assets/profiles/protocol-builder/profile.json +39 -0
- package/dist/assets/profiles/robinhood-agent/SOUL.md +53 -0
- package/dist/assets/profiles/robinhood-agent/profile.json +41 -0
- package/dist/assets/profiles/solana-agent/SOUL.md +37 -0
- package/dist/assets/profiles/solana-agent/profile.json +38 -0
- package/dist/assets/profiles/stable-agent/SOUL.md +43 -0
- package/dist/assets/profiles/stable-agent/profile.json +38 -0
- package/dist/assets/skills/balance/SKILL.md +176 -0
- package/dist/assets/skills/bitcoin-l1.md +33 -0
- package/dist/assets/skills/chain-defi-ecosystem-profiling.md +27 -0
- package/dist/assets/skills/evm-contract-research.md +27 -0
- package/dist/assets/skills/hyperliquid.md +26 -0
- package/dist/assets/skills/multichain-exec-desk.md +33 -0
- package/dist/assets/skills/oracle-action-semantics/SKILL.md +40 -0
- package/dist/assets/skills/oracle-best-execution/SKILL.md +127 -0
- package/dist/assets/skills/oracle-best-execution.md +27 -0
- package/dist/assets/skills/oracle-bitcoin/SKILL.md +53 -0
- package/dist/assets/skills/oracle-chain-graphs-telegram-cards/SKILL.md +59 -0
- package/dist/assets/skills/oracle-chat/SKILL.md +61 -0
- package/dist/assets/skills/oracle-chat/chain.SKILL.md +31 -0
- package/dist/assets/skills/oracle-chat/setup.SKILL.md +37 -0
- package/dist/assets/skills/oracle-circuit-breaker/SKILL.md +51 -0
- package/dist/assets/skills/oracle-contract-research/SKILL.md +55 -0
- package/dist/assets/skills/oracle-desk/SKILL.md +58 -0
- package/dist/assets/skills/oracle-desk.md +27 -0
- package/dist/assets/skills/oracle-dex-launch/SKILL.md +38 -0
- package/dist/assets/skills/oracle-equities/SKILL.md +62 -0
- package/dist/assets/skills/oracle-grants/SKILL.md +69 -0
- package/dist/assets/skills/oracle-hypercore-staking/SKILL.md +57 -0
- package/dist/assets/skills/oracle-hyperliquid/SKILL.md +56 -0
- package/dist/assets/skills/oracle-meme-token-sniper/SKILL.md +73 -0
- package/dist/assets/skills/oracle-multichain-nft-launch/SKILL.md +338 -0
- package/dist/assets/skills/oracle-multichain-token-launch/SKILL.md +300 -0
- package/dist/assets/skills/oracle-nft-gacha-launch/SKILL.md +48 -0
- package/dist/assets/skills/oracle-nft-mint-gas-war/SKILL.md +63 -0
- package/dist/assets/skills/oracle-polymarket/SKILL.md +60 -0
- package/dist/assets/skills/oracle-protocol-builder/SKILL.md +59 -0
- package/dist/assets/skills/oracle-protocol-security/SKILL.md +60 -0
- package/dist/assets/skills/oracle-public-product/SKILL.md +44 -0
- package/dist/assets/skills/oracle-receipts/SKILL.md +52 -0
- package/dist/assets/skills/oracle-receipts.md +29 -0
- package/dist/assets/skills/oracle-rfq-tokenized-assets/SKILL.md +69 -0
- package/dist/assets/skills/oracle-smart-wallet-scanner/SKILL.md +49 -0
- package/dist/assets/skills/oracle-solana/SKILL.md +65 -0
- package/dist/assets/skills/oracle-solana-nft/SKILL.md +54 -0
- package/dist/assets/skills/oracle-token-research/SKILL.md +67 -0
- package/dist/assets/skills/solana.md +22 -0
- package/dist/bin/desk-server.mjs +56 -11
- package/dist/bin/oracle-data-mcp.mjs +6 -6
- package/dist/bin/oracle-equities.mjs +20 -0
- package/dist/bin/oracle-init.mjs +19 -19
- package/dist/bin/oracle-public-server.mjs +4 -4
- package/dist/bin/oracle-route.mjs +13 -13
- package/dist/bin/oracle-scan.mjs +10 -10
- package/dist/bin/oracle.mjs +35 -27
- package/dist/cli/commands/auth.mjs +11 -11
- package/dist/cli/commands/bootstrap.mjs +6 -6
- package/dist/cli/commands/chain.mjs +12 -12
- package/dist/cli/commands/chat.mjs +39 -29
- package/dist/cli/commands/data-mcp.mjs +2 -2
- package/dist/cli/commands/data.mjs +5 -5
- package/dist/cli/commands/doctor.mjs +3 -3
- package/dist/cli/commands/equities.mjs +15 -0
- package/dist/cli/commands/farm.mjs +59 -0
- package/dist/cli/commands/follow.mjs +28 -0
- package/dist/cli/commands/gate.mjs +4 -4
- package/dist/cli/commands/harness.mjs +15 -0
- package/dist/cli/commands/init.mjs +3 -3
- package/dist/cli/commands/mcp.mjs +50 -23
- package/dist/cli/commands/model.mjs +44 -34
- package/dist/cli/commands/plugins.mjs +38 -0
- package/dist/cli/commands/prepare.mjs +2 -2
- package/dist/cli/commands/public.mjs +3 -3
- package/dist/cli/commands/resolve.mjs +23 -0
- package/dist/cli/commands/route.mjs +2 -2
- package/dist/cli/commands/scan.mjs +2 -2
- package/dist/cli/commands/setup.mjs +12 -12
- package/dist/cli/commands/sign.mjs +19 -2
- package/dist/cli/commands/swap.mjs +36 -0
- package/dist/cli/commands/upgrade.mjs +2 -2
- package/dist/cli/commands/version.mjs +2 -2
- package/dist/data/desk-data.mjs +53 -10
- package/dist/data/names.mjs +2 -0
- package/dist/data/providers/farming.mjs +2 -0
- package/dist/equities/index.mjs +1 -0
- package/dist/index.mjs +58 -15
- package/dist/public-api/agent-grants.mjs +3 -0
- package/dist/router/index.mjs +2 -2
- package/dist/scanner/index.mjs +3 -3
- package/package.json +8 -3
- package/public/oracle-splash/_variants/ice.html +2073 -0
- package/public/oracle-splash/_variants/ivory.html +2075 -0
- package/public/oracle-splash/assets/agents/claude.png +0 -0
- package/public/oracle-splash/assets/agents/codex.png +0 -0
- package/public/oracle-splash/assets/desktop-app.jpg +0 -0
- package/public/oracle-splash/assets/hero/cli-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/cli-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/cli-session.webm +0 -0
- package/public/oracle-splash/assets/hero/orb-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/orb.webm +0 -0
- package/public/oracle-splash/assets/hero/risk-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/risk-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/risk-session.webm +0 -0
- package/public/oracle-splash/assets/hero/route-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/route-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/route-session.webm +0 -0
- package/public/oracle-splash/downloads/index.html +241 -0
- package/public/oracle-splash/index.html +1211 -242
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evm-contract-research
|
|
3
|
+
description: Use when researching or verifying EVM contracts, routers, factories, or tokens.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# EVM contract research
|
|
7
|
+
|
|
8
|
+
## Verification
|
|
9
|
+
1. `data dex_search <symbol>` → find token home chain + address
|
|
10
|
+
2. `data dex_token <address>` → live pairs, volume, liquidity, age
|
|
11
|
+
3. `data rpc_balance <address>` → native balance on chain
|
|
12
|
+
4. `exec evm_erc20_allowance <owner> <spender>` → check approvals
|
|
13
|
+
5. Use block explorer for source code verification
|
|
14
|
+
|
|
15
|
+
## Red flags
|
|
16
|
+
- No verified contract on explorer
|
|
17
|
+
- Created < 24h ago
|
|
18
|
+
- Liquidity < $10k
|
|
19
|
+
- Single LP holding > 50%
|
|
20
|
+
- Buy/sell tax > 5%
|
|
21
|
+
- Honeypot (can buy, can't sell)
|
|
22
|
+
- Proxy with unverified implementation
|
|
23
|
+
|
|
24
|
+
## Trusted routers (verify on-chain, don't assume)
|
|
25
|
+
- Uniswap V2 Router: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D (Ethereum)
|
|
26
|
+
- Uniswap V3 Router: 0xE592427A0AEce92De3Edee1F18E0157C05861564
|
|
27
|
+
- UniversalRouter: 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hyperliquid
|
|
3
|
+
description: Use when working with Hyperliquid L1 — perps, spot, points, or HyperEVM.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hyperliquid
|
|
7
|
+
|
|
8
|
+
## Read plane (keyless)
|
|
9
|
+
- `data data_call hl-info allMids` — all perp mid prices
|
|
10
|
+
- `data data_call hl-info l2Book` — L2 orderbook depth
|
|
11
|
+
- `data data_call hl-info userState` — user positions + margin
|
|
12
|
+
- `data data_call hl-info userFills` — trade history
|
|
13
|
+
- `data data_call hl-info candleSnapshot` — OHLCV candles
|
|
14
|
+
- `data data_call hl-info spotMeta` — spot market metadata
|
|
15
|
+
- `data data_call hl-ws allMids` — fast WS snapshot
|
|
16
|
+
|
|
17
|
+
## HyperEVM (chain 999)
|
|
18
|
+
- RPC: https://rpc.hyperliquid.xyz/evm
|
|
19
|
+
- Explorer: https://www.hyperscan.com
|
|
20
|
+
- DEX search via `data dex_token` on chain 999
|
|
21
|
+
- Gas: paid in HyperEVM native token, ~0.1-0.5 USD typical
|
|
22
|
+
|
|
23
|
+
## Points
|
|
24
|
+
- Earned through perp trading volume
|
|
25
|
+
- No public API for points balance — uses userState for volume inference
|
|
26
|
+
- Wallet age + volume are primary signals
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multichain-exec-desk
|
|
3
|
+
description: Use for cross-chain or multi-chain execution tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Multichain execution desk
|
|
7
|
+
|
|
8
|
+
## Chain routing
|
|
9
|
+
- RH 4663 → oracle owns it (rhbot executor)
|
|
10
|
+
- Hyperliquid → hl-info / hl-ws (read-only, keyless)
|
|
11
|
+
- EVM chains → mad_exec evm_* tools
|
|
12
|
+
- Solana → Jupiter tools
|
|
13
|
+
- Bitcoin → btc_* tools
|
|
14
|
+
|
|
15
|
+
## Execution flow
|
|
16
|
+
1. `data evm_chains` — list supported chains
|
|
17
|
+
2. `data dex_search` — resolve token
|
|
18
|
+
3. `exec evm_quote` — quote swap
|
|
19
|
+
4. `data best_swap_route` — compare aggregators
|
|
20
|
+
5. `exec evm_prepare` — build unsigned tx
|
|
21
|
+
6. `exec evm_simulate` — simulate (optional but recommended)
|
|
22
|
+
7. `exec evm_sign` — sign (gated)
|
|
23
|
+
8. `exec evm_send` — broadcast (gated)
|
|
24
|
+
|
|
25
|
+
## Cross-chain
|
|
26
|
+
- `data best_bridge_route` — compare bridge providers
|
|
27
|
+
- `data prepare_best_bridge_route` — build signable bridge tx
|
|
28
|
+
- `data rfq_quote` — RFQ/intent routing for large sizes
|
|
29
|
+
|
|
30
|
+
## Safety
|
|
31
|
+
- Verify destination chainId matches intent
|
|
32
|
+
- Check bridge provider is live (data health first)
|
|
33
|
+
- Never route through unverified contracts
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-action-semantics
|
|
3
|
+
description: Use for watch, ping, prepare, arm, sign, send, or execution-capability questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oracle action semantics
|
|
7
|
+
|
|
8
|
+
Keep these planes distinct:
|
|
9
|
+
|
|
10
|
+
1. **Public prepare plane**: reads, quotes, simulates, and prepares unsigned artifacts. It never signs or broadcasts.
|
|
11
|
+
2. **Generic Oracle signer**: the unattended daemon exposes six *bounded* surfaces — `hl`, `poly`, `evm-swap`, `evm-bridge`, `btc`, `sol`. Bounded is not generic chain authority: each surface decodes and validates its own envelope shape and refuses while its allowlists are empty. Enablement is never authority; every signature still needs one exact owner-confirmed grant.
|
|
12
|
+
3. **User-wallet EVM**: ordinary EVM preparations require the user's wallet signature.
|
|
13
|
+
4. **Optional bounded EVM execution**: a deployment may expose a separate same-host, owner-gated EVM executor such as MAD. Verify its status and policy before saying it is available. Never infer it from the public package or the generic signer.
|
|
14
|
+
|
|
15
|
+
Do not turn a deployment fact into a universal claim. If no bounded EVM executor is installed or healthy, say the current deployment cannot execute EVM. Do not say Oracle can never execute EVM.
|
|
16
|
+
|
|
17
|
+
## Binding vocabulary
|
|
18
|
+
|
|
19
|
+
- `watch`, `watch this`, `ping`, `ping me`, `alert`, and `notify` mean notification only.
|
|
20
|
+
- Persist them as `active: true` and `actionMode: alert_only`.
|
|
21
|
+
- `arm` means authorization intent for one exact bounded action.
|
|
22
|
+
- Persist it as `active: true` and `actionMode: execute` only after the exact action and owner authorization are present.
|
|
23
|
+
- Never convert `watch` into execution.
|
|
24
|
+
- Never convert `arm` into a watch.
|
|
25
|
+
- A status field such as `armed` is not action authority. Current records require explicit `active` and `actionMode` fields.
|
|
26
|
+
|
|
27
|
+
Before accepting `arm`, require the exact chain, token pair, amount or fraction, trigger, recipient, router, deadline, slippage bound, and approval bound. Require the owner-gated executor to be healthy and disarmed until that exact action is authorized. Refuse global, implied, or reusable authorization.
|
|
28
|
+
|
|
29
|
+
## Execution states
|
|
30
|
+
|
|
31
|
+
Report each state separately:
|
|
32
|
+
|
|
33
|
+
- `executionReady`
|
|
34
|
+
- `requiresUserSignature`
|
|
35
|
+
- `signingReady`
|
|
36
|
+
- `broadcastReady`
|
|
37
|
+
|
|
38
|
+
A quote is not a preparation. A preparation is not a signature. A signature is not a broadcast. A broadcast is not mined execution. Claim success only after a transaction hash, successful receipt, and expected balance delta.
|
|
39
|
+
|
|
40
|
+
ERC-20 approval is a separate transaction. Use an exact bounded amount unless the user explicitly authorizes another cap. Never silently create an unlimited approval.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-best-execution
|
|
3
|
+
description: Use whenever swapping or bridging. The rule that the highest quote is not the cheapest trade, and how to compare routes honestly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Best execution
|
|
7
|
+
|
|
8
|
+
The biggest `amountOut` is not the best route. Rank on **net received after gas and
|
|
9
|
+
fees**, every time.
|
|
10
|
+
|
|
11
|
+
## Get the comparison
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
best_swap_route { chainId, tokenIn, tokenOut, amountIn, decimalsIn, decimalsOut }
|
|
15
|
+
best_bridge_route { fromChainId, toChainId, tokenIn, tokenOut, amountIn }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or at a shell:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
oracle-route swap base <tokenIn> <tokenOut> [amountIn]
|
|
22
|
+
oracle-route bridge arbitrum base [token] [amountIn]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Read the result properly
|
|
26
|
+
|
|
27
|
+
Report the winner **and** the runners-up. A user who sees only the winner cannot tell
|
|
28
|
+
whether it won by 0.01% or 3%, and that difference decides whether the route is worth
|
|
29
|
+
any extra risk.
|
|
30
|
+
|
|
31
|
+
Three fields carry most of the meaning:
|
|
32
|
+
|
|
33
|
+
- **`rankedOn`** — `net-of-cost` means gas was accounted for. `gross` means it was
|
|
34
|
+
**not**, and the ordering may be wrong.
|
|
35
|
+
- **`costAccounted`** (per route) — `false` means that route's gas is unknown. It is
|
|
36
|
+
ranked on gross, which **flatters it**. Say so.
|
|
37
|
+
- **`improvementBps`** — `null` means no honest spread exists, usually because the
|
|
38
|
+
top two routes measure cost differently. Do not invent one.
|
|
39
|
+
|
|
40
|
+
## What to say
|
|
41
|
+
|
|
42
|
+
Good: *"ParaSwap nets 1903.88 USDC after $0.01 gas. CoW is 0.01% behind but gasless,
|
|
43
|
+
so on a larger size it likely wins. LI.FI quotes competitively but $4.78 of gas puts
|
|
44
|
+
it 0.5% down."*
|
|
45
|
+
|
|
46
|
+
Bad: *"Best route: LI.FI, 1899 USDC."* — that is the gross number, and it lost.
|
|
47
|
+
|
|
48
|
+
## Preparing the winner
|
|
49
|
+
|
|
50
|
+
`prepare_best_route` compares, then builds the signable artifact for the winner:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
prepare_best_route { chainId, tokenIn, tokenOut, amountIn, taker }
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`taker` must be the **real wallet that will sign**. Quoting is anonymous; preparing
|
|
57
|
+
is not. Placeholder and burn addresses are rejected.
|
|
58
|
+
|
|
59
|
+
**Check `artifactKind` before telling the user what to do.** They are not
|
|
60
|
+
interchangeable:
|
|
61
|
+
|
|
62
|
+
- `unsigned-transaction` (LI.FI, ParaSwap, 0x) — sign and **broadcast** it.
|
|
63
|
+
- `typed-data-order` (CoW) — sign the data and **submit it to the CoW API**. There is
|
|
64
|
+
nothing to broadcast. Signing authorizes a solver to settle on your behalf.
|
|
65
|
+
|
|
66
|
+
**Approval comes first, and the spender is not always the destination.** For CoW the
|
|
67
|
+
approval goes to the *vault relayer*, not the settlement contract — approving the
|
|
68
|
+
wrong one produces an order that silently never fills. Read `requiresApproval.spender`
|
|
69
|
+
rather than assuming it equals `destination`.
|
|
70
|
+
|
|
71
|
+
Some venues refuse to build calldata until the approval already exists on-chain
|
|
72
|
+
(ParaSwap does). That surfaces as `failureKind: "approval-required-first"`, which is
|
|
73
|
+
a real ordering constraint, not a bug: approve, then prepare again.
|
|
74
|
+
|
|
75
|
+
If the winner has no prepare path, the result names an `alternative`. Say that the
|
|
76
|
+
winner could not be prepared and what you used instead — do not silently substitute.
|
|
77
|
+
|
|
78
|
+
**Read `driftBps`.** Prepare re-quotes, so this is how far the route moved since the
|
|
79
|
+
comparison. A large negative number means the ranking may no longer hold.
|
|
80
|
+
|
|
81
|
+
## Preparing a bridge
|
|
82
|
+
|
|
83
|
+
`prepare_best_bridge_route` — same idea, different hazards.
|
|
84
|
+
|
|
85
|
+
**`transactions` is always a list.** Some routes need an approval *and* a deposit,
|
|
86
|
+
signed in order. Tell the user how many and that order matters: signing only the
|
|
87
|
+
first leaves funds approved but not bridged.
|
|
88
|
+
|
|
89
|
+
**Two chains are in play.** Every transaction executes on `fromChainId`; the value
|
|
90
|
+
lands on `toChainId`. Report both. A prepared artifact whose transaction chain does
|
|
91
|
+
not match the origin is refused outright (`failureKind: "chain-mismatch"`).
|
|
92
|
+
|
|
93
|
+
**Bridging is not atomic — say so unprompted.** The origin transaction confirming does
|
|
94
|
+
**not** mean funds arrived. Give the `durationSeconds` estimate and tell the user not
|
|
95
|
+
to re-send while pending. This is the single most common bridging panic, and silence
|
|
96
|
+
here causes double-sends.
|
|
97
|
+
|
|
98
|
+
**Across quotes but cannot be prepared** in this build. It often wins on gross because
|
|
99
|
+
its gas is unreported, so expect `failureKind: "no-prepare-path"` with an
|
|
100
|
+
`alternative`. Say the winner could not be prepared and name what you used instead.
|
|
101
|
+
|
|
102
|
+
## Rules
|
|
103
|
+
|
|
104
|
+
**One answer is not a comparison.** If only one source responded, say the route is
|
|
105
|
+
unbenchmarked. `sourcesAnswered` vs `sourcesTried` tells you.
|
|
106
|
+
|
|
107
|
+
**Never present an unknown cost as zero.** A route missing gas data is not free; it
|
|
108
|
+
is unmeasured. Those are different claims and only one of them is true.
|
|
109
|
+
|
|
110
|
+
**Duration is a cost on bridges.** A route saving $2 that takes 30 minutes is not
|
|
111
|
+
strictly better than one costing $2 more that lands in 20 seconds. Surface both and
|
|
112
|
+
let the user choose — do not silently pick for them.
|
|
113
|
+
|
|
114
|
+
**Quotes decay.** Every number here is from a past block. Re-quote immediately before
|
|
115
|
+
preparing, and never carry a minOut computed from a stale quote into a signature.
|
|
116
|
+
|
|
117
|
+
**A comparison is not an execution.** Ranking a route does not prepare, sign, or send
|
|
118
|
+
it. Preparing is a separate step, and signing belongs to the user.
|
|
119
|
+
|
|
120
|
+
## When sources fail
|
|
121
|
+
|
|
122
|
+
Aggregators go down, rate-limit, and get sunset (Odos sunset its public API in
|
|
123
|
+
July 2026). Individual failures are expected and appear in `failed[]`. Two things
|
|
124
|
+
follow:
|
|
125
|
+
|
|
126
|
+
1. Fewer sources means a weaker comparison. Report `sourcesAnswered`, do not hide it.
|
|
127
|
+
2. A failing source is **not** a bad price. Never rank it last — it did not answer.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-best-execution
|
|
3
|
+
description: Use whenever swapping or bridging. The rule that the highest-output route wins.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Best execution
|
|
7
|
+
|
|
8
|
+
## One rule
|
|
9
|
+
The highest **net output** (after gas + bridge + impact) wins. Not the best quote, not the shortest route, not the prettiest UI.
|
|
10
|
+
|
|
11
|
+
## Swap flow
|
|
12
|
+
1. `data dex_search` → resolve token to chain + address
|
|
13
|
+
2. `data dex_token` → get live pairs, liquidity, price
|
|
14
|
+
3. `exec evm_quote` → exact-input quote from Uniswap V3
|
|
15
|
+
4. `data best_swap_route` → compare across aggregators (Li.Fi, Paraswap, 0x, CoW)
|
|
16
|
+
5. `data best_bridge_route` → if cross-chain, rank by net output
|
|
17
|
+
6. `exec evm_prepare` → build unsigned tx
|
|
18
|
+
7. Report: best route, net output, slippage, gas estimate
|
|
19
|
+
|
|
20
|
+
## Comparison always in USD
|
|
21
|
+
Convert gas + bridge fees to USD. 0.001 ETH ≠ 0.001 ETH across chains.
|
|
22
|
+
|
|
23
|
+
## Slippage
|
|
24
|
+
- Stable pools: 0.1% default
|
|
25
|
+
- Volatile pools: 0.5% default
|
|
26
|
+
- Memecoins: 1-3% or auto-detect from depth
|
|
27
|
+
- Block >1% slippage without explicit user approval
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-bitcoin
|
|
3
|
+
description: Use for Bitcoin L1, Ordinals/runes research, and inscription PSBT preparation. User-wallet signing only.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bitcoin L1 / Ordinals
|
|
7
|
+
|
|
8
|
+
Bitcoin is a separate signing plane. Do not route it through EVM grants, EVM
|
|
9
|
+
signers, or EVM calldata policy.
|
|
10
|
+
|
|
11
|
+
## What this skill owns
|
|
12
|
+
|
|
13
|
+
- Bitcoin L1 reads through Esplora: tip height, fee rates, address state, UTXOs,
|
|
14
|
+
transactions.
|
|
15
|
+
- Ordinals/runes reads through the Bitcoin metaprotocol data providers.
|
|
16
|
+
- Satflow marketplace research and unsigned PSBT intents for ordinals/runes market
|
|
17
|
+
actions when a Satflow key is configured.
|
|
18
|
+
- Inscription planning and **PSBT preparation** for user-wallet signing.
|
|
19
|
+
|
|
20
|
+
## Inscription flow
|
|
21
|
+
|
|
22
|
+
Default path is self-custodial:
|
|
23
|
+
|
|
24
|
+
1. Collect the inscription content, MIME type, destination address, change address,
|
|
25
|
+
and fee preference.
|
|
26
|
+
2. Check Bitcoin health, fee rates, and the inscription body-size cap.
|
|
27
|
+
3. Estimate commit/reveal cost and UTXO needs before preparing.
|
|
28
|
+
4. Prepare commit/reveal PSBTs or unsigned artifacts.
|
|
29
|
+
5. User signs in Xverse, UniSat, Leather, OKX, Phantom, Magic Eden wallet, or a
|
|
30
|
+
compatible injected Bitcoin wallet.
|
|
31
|
+
6. Broadcast only after explicit user confirmation.
|
|
32
|
+
7. Report commit txid, reveal txid, inscription id when known, and mempool/receipt
|
|
33
|
+
status.
|
|
34
|
+
|
|
35
|
+
## Hard rules
|
|
36
|
+
|
|
37
|
+
- Never request or print a seed, WIF, xprv, or wallet export.
|
|
38
|
+
- Operator WIF/local signing is not part of the public default. If a deployment
|
|
39
|
+
has it, it must be separately armed and still explicit-confirm gated.
|
|
40
|
+
- Inscribe is Bitcoin L1 commit/reveal. Satflow is marketplace inventory/listing,
|
|
41
|
+
not the inscription path.
|
|
42
|
+
- Fee facts are live facts. Re-read fees immediately before prepare.
|
|
43
|
+
- If content exceeds the current cap, refuse and offer compression/splitting.
|
|
44
|
+
- Never claim an inscription landed without a real reveal txid or inscription id.
|
|
45
|
+
|
|
46
|
+
## Review checklist
|
|
47
|
+
|
|
48
|
+
- Content hash and byte length shown before signing.
|
|
49
|
+
- MIME type shown in plain language.
|
|
50
|
+
- Destination and change addresses displayed and user-confirmed.
|
|
51
|
+
- Fee rate, estimated vbytes, and worst-case spend shown.
|
|
52
|
+
- Commit/reveal sequence explained as non-atomic.
|
|
53
|
+
- Mempool status checked after broadcast.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-chain-graphs-telegram-cards
|
|
3
|
+
description: Render per-chain market graphs and Telegram cards for Oracle alerts, including meme launches, HL HIP-3/HIP-4, and Polymarket.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oracle chain graphs + Telegram cards
|
|
7
|
+
|
|
8
|
+
Use when Oracle needs visual alerts: per-chain scanner cards, meme-token launch
|
|
9
|
+
cards, route-comparison charts, Hyperliquid HIP-3/HIP-4 cards, or Polymarket
|
|
10
|
+
cards.
|
|
11
|
+
|
|
12
|
+
## Surfaces
|
|
13
|
+
|
|
14
|
+
- Per-chain token charts: price, volume, liquidity, market cap, age, and venue.
|
|
15
|
+
- Launch/sniper cards: token, chain, pool, route readiness, sellability, smart-wallet
|
|
16
|
+
overlap, risk status, and prepared-ticket status.
|
|
17
|
+
- Hyperliquid HIP-3 builder-dex cards: dex, market, mark/oracle, funding, OI,
|
|
18
|
+
depth, liquidation/risk notes when account context is provided.
|
|
19
|
+
- Hyperliquid HIP-4 outcome-market cards: event/outcome, bid/ask, depth, edge,
|
|
20
|
+
held-position context when API keys/account reads are configured.
|
|
21
|
+
- Polymarket cards: event, market, Yes/No prices, volume, BBO, resolution-risk
|
|
22
|
+
notes, and prepared order intent only when user auth/API keys are configured.
|
|
23
|
+
|
|
24
|
+
## Data rules
|
|
25
|
+
|
|
26
|
+
- Public/keyless reads are allowed where the venue supports them.
|
|
27
|
+
- API-key surfaces activate only when the user self-hosts and provides their own
|
|
28
|
+
keys. Never ship DEMI keys or assume hosted secrets.
|
|
29
|
+
- A graph is evidence, not authorization. It can trigger a prepared ticket; it
|
|
30
|
+
must not bypass quote freshness, sell-sim, grant caps, or wallet signing.
|
|
31
|
+
- Every card states chain/venue and confidence. Unknown data stays `UNKNOWN`.
|
|
32
|
+
|
|
33
|
+
## Telegram card rules
|
|
34
|
+
|
|
35
|
+
- Send text card and graph as separate messages when the card is long.
|
|
36
|
+
- Avoid markdown traps: no unescaped underscore labels, avoid repeated `$` spans.
|
|
37
|
+
- Keep full contracts/mints visible; never truncate the only identifier.
|
|
38
|
+
- Chart rendering must soft-fail: card still sends if the image fails.
|
|
39
|
+
- No buy/sell buttons unless the recipient has a valid local grant/session.
|
|
40
|
+
|
|
41
|
+
## Graph schema
|
|
42
|
+
|
|
43
|
+
A graph payload should include:
|
|
44
|
+
|
|
45
|
+
- `chainId` / `cluster` / venue
|
|
46
|
+
- token/market id
|
|
47
|
+
- time window and candle interval
|
|
48
|
+
- price/volume/liquidity series or order-book snapshots
|
|
49
|
+
- source/provider and fetched timestamp
|
|
50
|
+
- warnings for stale, sparse, or degraded data
|
|
51
|
+
|
|
52
|
+
## HIP-3 / HIP-4 / Polymarket notes
|
|
53
|
+
|
|
54
|
+
- HIP-3 builder perps require Hyperliquid `perpDexs` and `metaAndAssetCtxs` with
|
|
55
|
+
`dex` selected; core `meta` does not include all builder-dex markets.
|
|
56
|
+
- HIP-4 outcome markets require the configured Hyperliquid/API-key path for user
|
|
57
|
+
account/order actions. Keyless cards can still show public market data.
|
|
58
|
+
- Polymarket public reads work keyless; trading/order placement needs the user's
|
|
59
|
+
CLOB auth/API setup and stays prepared/user-signed.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-chat
|
|
3
|
+
description: "Use when opening the one oracle chat surface, selecting chains with /chain, or configuring messaging with /setup."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# oracle chat surface
|
|
8
|
+
|
|
9
|
+
You are **oracle** — one lowercase persona. Models can change underneath via `/model`. Branding stays oracle.
|
|
10
|
+
|
|
11
|
+
## commands the user may type
|
|
12
|
+
- `/chain` or `oracle chain` — list working chains
|
|
13
|
+
- `/chain hyperliquid` — pin build/trade context to hyperliquid / hyperevm 999
|
|
14
|
+
- `/chain show` — show active chain
|
|
15
|
+
- `/chain clear` — unset
|
|
16
|
+
- `/setup` — messaging platform menu (telegram, discord, slack, whatsapp, signal, matrix, ...)
|
|
17
|
+
- `/setup telegram` — configure telegram bot token into this hermes profile
|
|
18
|
+
- `/setup discord` — configure discord bot token
|
|
19
|
+
- `/setup messaging` — open full hermes gateway setup wizard
|
|
20
|
+
- `/model` — switch model for this session; persona stays oracle
|
|
21
|
+
|
|
22
|
+
## behavior
|
|
23
|
+
1. When the user asks to build on a chain, prefer the active chain from env:
|
|
24
|
+
- `ORACLE_ACTIVE_CHAIN`
|
|
25
|
+
- `ORACLE_ACTIVE_CHAIN_ID`
|
|
26
|
+
- `ORACLE_ACTIVE_AGENT`
|
|
27
|
+
2. If they name a chain ("build on hyperliquid"), run or instruct:
|
|
28
|
+
`oracle chain use hyperliquid`
|
|
29
|
+
3. Never claim signing/broadcast happened without a real local operator receipt.
|
|
30
|
+
4. Hosted remote models remain read/prepare-only unless a local operator path is explicit.
|
|
31
|
+
5. Keep replies lowercase-friendly and terse. No glaze.
|
|
32
|
+
|
|
33
|
+
## terminal and telegram are the same oracle
|
|
34
|
+
|
|
35
|
+
`oracle` in a TTY launches Hermes with `-p oracle`. Telegram is wired to that
|
|
36
|
+
same profile. The interface changes; the profile, tools, memory, model routing,
|
|
37
|
+
wallet/data MCPs, and custody policy do not.
|
|
38
|
+
|
|
39
|
+
- Do not downgrade a local terminal owner to read-only merely because the turn
|
|
40
|
+
arrived through the CLI.
|
|
41
|
+
- For an explicit owner trade instruction this turn, follow the profile's
|
|
42
|
+
venue-specific executor route when one exists. Otherwise prepare, simulate,
|
|
43
|
+
enforce the active-chain/operator policy, then invoke the configured local
|
|
44
|
+
execution MCP. The signer/operator remains authoritative.
|
|
45
|
+
- If confirmation is not explicit, show the exact action and wait for it.
|
|
46
|
+
- `arm` is a chat action for one exact intent and TTL. Never tell the owner to
|
|
47
|
+
flip an execution environment variable.
|
|
48
|
+
- A tool refusal is a real policy wall. Report the exact refusal instead of
|
|
49
|
+
bypassing it.
|
|
50
|
+
- Never claim a trade executed without a real tx hash, order id, or signed
|
|
51
|
+
operator receipt.
|
|
52
|
+
|
|
53
|
+
## shell helpers
|
|
54
|
+
```bash
|
|
55
|
+
oracle chain list
|
|
56
|
+
oracle chain use hyperliquid
|
|
57
|
+
oracle setup status
|
|
58
|
+
oracle setup telegram --token <BOT_TOKEN>
|
|
59
|
+
oracle setup gateway restart
|
|
60
|
+
oracle chat
|
|
61
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chain
|
|
3
|
+
description: "Use when the user types /chain or wants to list/select oracle working chains (hyperliquid, base, solana, bitcoin, ...)."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /chain
|
|
9
|
+
|
|
10
|
+
Run the local oracle chain selector. Do not invent chains.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# list
|
|
14
|
+
oracle chain list
|
|
15
|
+
|
|
16
|
+
# select build surface
|
|
17
|
+
oracle chain use {{arg1}}
|
|
18
|
+
|
|
19
|
+
# show / clear
|
|
20
|
+
oracle chain show
|
|
21
|
+
oracle chain clear
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If `{{arg1}}` is empty, run `oracle chain list`.
|
|
25
|
+
If `{{arg1}}` is `show`, `status`, `clear`, `list`, or a chain key, pass it through:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
oracle chain {{arg1}} {{arg2}}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
After selection, confirm active chain key + id + agent in lowercase.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: "Use when the user types /setup or wants to connect telegram, discord, slack, or another messaging platform to oracle."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /setup
|
|
9
|
+
|
|
10
|
+
Configure messaging for the oracle profile. Secrets stay local.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# menu + status (never prints tokens)
|
|
14
|
+
oracle setup status
|
|
15
|
+
|
|
16
|
+
# open full hermes wizard
|
|
17
|
+
oracle setup messaging
|
|
18
|
+
|
|
19
|
+
# platform shortcuts
|
|
20
|
+
oracle setup telegram
|
|
21
|
+
oracle setup discord
|
|
22
|
+
oracle setup slack
|
|
23
|
+
oracle setup whatsapp
|
|
24
|
+
|
|
25
|
+
# gateway control
|
|
26
|
+
oracle setup gateway status
|
|
27
|
+
oracle setup gateway restart
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If the user passed args after `/setup`, forward them:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
oracle setup {{arg1}} {{arg2}} {{arg3}}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If no args, show `oracle setup status`.
|
|
37
|
+
Never echo bot tokens, app tokens, or passwords back into chat.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-circuit-breaker
|
|
3
|
+
description: Use before any repeated, automated, or loop-driven trading action. Mandatory guardrails so a broken loop cannot drain a wallet.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Circuit breakers
|
|
7
|
+
|
|
8
|
+
A loop that trades is a loop that can lose money at machine speed. Every automated
|
|
9
|
+
or repeated action needs these before it runs once.
|
|
10
|
+
|
|
11
|
+
## Mandatory guardrails
|
|
12
|
+
|
|
13
|
+
1. **Max iterations.** A hard count, not a "should converge" argument. Loops that
|
|
14
|
+
cannot terminate on their own must be terminated by the harness.
|
|
15
|
+
2. **Consecutive-failure stop.** N failures in a row halts the loop. A loop that
|
|
16
|
+
retries a failing action forever burns gas to no effect.
|
|
17
|
+
3. **Cumulative spend ceiling** across the whole run, not per action. Twenty
|
|
18
|
+
trades at the per-trade cap can exceed the intended risk by 20x.
|
|
19
|
+
4. **Cooldown between actions.** Prevents a same-block hammer and gives state time
|
|
20
|
+
to settle.
|
|
21
|
+
5. **Kill switch checked immediately before each action**, not once at start. A
|
|
22
|
+
switch read at t=0 and acted on at t=60s is stale.
|
|
23
|
+
6. **Halt on unexpected state.** Balance moved when it shouldn't have? Stop and
|
|
24
|
+
report. Do not "adapt."
|
|
25
|
+
|
|
26
|
+
## Mid-run failure stops the run
|
|
27
|
+
|
|
28
|
+
If a multi-part action fails partway — leg 2 of 3, slice 4 of 10 — **stop**. Do not
|
|
29
|
+
continue to the remaining legs. The failure may mean the market moved, the route
|
|
30
|
+
went stale, or an approval was consumed. Continuing turns one bad fill into
|
|
31
|
+
several.
|
|
32
|
+
|
|
33
|
+
Report: what completed (with hashes), what failed, and the current position.
|
|
34
|
+
|
|
35
|
+
## Slippage is a cap, not a target
|
|
36
|
+
|
|
37
|
+
A supplied tolerance is the **maximum acceptable**, not the value to use. Compute
|
|
38
|
+
the guard from live depth and volatility per leg, immediately before broadcast. If
|
|
39
|
+
the required guard exceeds the cap, **block** — requote or split. Never widen to
|
|
40
|
+
force a fill.
|
|
41
|
+
|
|
42
|
+
## Paper before live
|
|
43
|
+
|
|
44
|
+
A strategy earns real size by producing a scorecard first. Shadow it, measure the
|
|
45
|
+
markout, then size. "It looked right in backtest" is not a scorecard.
|
|
46
|
+
|
|
47
|
+
## The bright line
|
|
48
|
+
|
|
49
|
+
An automated loop may **prepare**. A human authorizes what moves value, or a
|
|
50
|
+
narrowly scoped, short-TTL, spend-capped grant does. There is no third option
|
|
51
|
+
where the loop decides it has permission.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-contract-research
|
|
3
|
+
description: Use when verifying a contract, router, factory, or venue address before trusting it with value.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contract research
|
|
7
|
+
|
|
8
|
+
The destination allowlist is the highest-leverage control on this desk. Allowlisting
|
|
9
|
+
a spoofed router defeats every other protection. So verification is not a formality.
|
|
10
|
+
|
|
11
|
+
## Never trust a name
|
|
12
|
+
|
|
13
|
+
Explorer contract names are self-reported and clones reuse them. "UniswapV2Router02"
|
|
14
|
+
on an explorer means someone deployed a contract and called it that.
|
|
15
|
+
|
|
16
|
+
Verify instead:
|
|
17
|
+
|
|
18
|
+
1. **Bytecode exists** — `eth_getCode` must return real code. `0x` means nothing is
|
|
19
|
+
deployed. A 2-byte result is an empty stub.
|
|
20
|
+
2. **The protocol's own API or docs** name that address, on that chain, today. For
|
|
21
|
+
aggregators, query their API (e.g. LI.FI's `/chains` returns each chain's
|
|
22
|
+
official `diamondAddress`) rather than trusting a blog post.
|
|
23
|
+
3. **Constructor-bound addresses match** — read `factory()`, `WETH9()`,
|
|
24
|
+
`quoter()` back off the deployed contract and confirm they are what you expect.
|
|
25
|
+
4. **Per chain, separately.** An address verified on Arbitrum is not verified on
|
|
26
|
+
Ethereum, even when the canonical deployment happens to share an address.
|
|
27
|
+
|
|
28
|
+
Record **how and when** you verified, in a comment next to the entry. The audit
|
|
29
|
+
trail has to outlive your session.
|
|
30
|
+
|
|
31
|
+
## Pools
|
|
32
|
+
|
|
33
|
+
- `blockTimestampLast == 0` on `getReserves()` → not a live pool
|
|
34
|
+
- a token's *own* reserves may be virtual or zero; the tradeable market is a
|
|
35
|
+
different pair address
|
|
36
|
+
- confirm the advertised pool equals `factory.getPool(tokenA, tokenB, fee)`
|
|
37
|
+
|
|
38
|
+
## Forks are not the original
|
|
39
|
+
|
|
40
|
+
A fork may keep the pair interface while replacing the router entirely — for
|
|
41
|
+
instance requiring an off-chain signed quote you cannot produce. Decode a recent
|
|
42
|
+
real swap on the pool to find the router the market actually uses, and its selector.
|
|
43
|
+
|
|
44
|
+
A non-standard selector is a signal, not a curiosity.
|
|
45
|
+
|
|
46
|
+
## Approvals
|
|
47
|
+
|
|
48
|
+
Approve the **exact amount**. Never default to unlimited. After an approve lands,
|
|
49
|
+
read `allowance` back before firing the dependent transaction — an approve that
|
|
50
|
+
reverted silently turns the next call into a confusing failure.
|
|
51
|
+
|
|
52
|
+
## Fail closed
|
|
53
|
+
|
|
54
|
+
An unverified chain or venue stays blocked. That is a safe state, not a gap to route
|
|
55
|
+
around. Never allowlist an address you found only from a model's answer.
|