@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.
Files changed (124) hide show
  1. package/README.md +31 -4
  2. package/SETUP.md +5 -2
  3. package/artifacts/specialist-packs/oracle-full-crypto.json +3 -0
  4. package/dist/address-book.mjs +2 -2
  5. package/dist/assets/profiles/_template/SOUL.md +54 -0
  6. package/dist/assets/profiles/_template/profile.json +22 -0
  7. package/dist/assets/profiles/bitcoin-agent/SOUL.md +31 -0
  8. package/dist/assets/profiles/bitcoin-agent/profile.json +32 -0
  9. package/dist/assets/profiles/hyperliquid-agent/SOUL.md +34 -0
  10. package/dist/assets/profiles/hyperliquid-agent/profile.json +38 -0
  11. package/dist/assets/profiles/oracle/SOUL.md +134 -0
  12. package/dist/assets/profiles/oracle/profile.json +40 -0
  13. package/dist/assets/profiles/polymarket-agent/SOUL.md +35 -0
  14. package/dist/assets/profiles/polymarket-agent/profile.json +34 -0
  15. package/dist/assets/profiles/profile.schema.json +90 -0
  16. package/dist/assets/profiles/protocol-builder/SOUL.md +57 -0
  17. package/dist/assets/profiles/protocol-builder/profile.json +39 -0
  18. package/dist/assets/profiles/robinhood-agent/SOUL.md +53 -0
  19. package/dist/assets/profiles/robinhood-agent/profile.json +41 -0
  20. package/dist/assets/profiles/solana-agent/SOUL.md +37 -0
  21. package/dist/assets/profiles/solana-agent/profile.json +38 -0
  22. package/dist/assets/profiles/stable-agent/SOUL.md +43 -0
  23. package/dist/assets/profiles/stable-agent/profile.json +38 -0
  24. package/dist/assets/skills/balance/SKILL.md +176 -0
  25. package/dist/assets/skills/bitcoin-l1.md +33 -0
  26. package/dist/assets/skills/chain-defi-ecosystem-profiling.md +27 -0
  27. package/dist/assets/skills/evm-contract-research.md +27 -0
  28. package/dist/assets/skills/hyperliquid.md +26 -0
  29. package/dist/assets/skills/multichain-exec-desk.md +33 -0
  30. package/dist/assets/skills/oracle-action-semantics/SKILL.md +40 -0
  31. package/dist/assets/skills/oracle-best-execution/SKILL.md +127 -0
  32. package/dist/assets/skills/oracle-best-execution.md +27 -0
  33. package/dist/assets/skills/oracle-bitcoin/SKILL.md +53 -0
  34. package/dist/assets/skills/oracle-chain-graphs-telegram-cards/SKILL.md +59 -0
  35. package/dist/assets/skills/oracle-chat/SKILL.md +61 -0
  36. package/dist/assets/skills/oracle-chat/chain.SKILL.md +31 -0
  37. package/dist/assets/skills/oracle-chat/setup.SKILL.md +37 -0
  38. package/dist/assets/skills/oracle-circuit-breaker/SKILL.md +51 -0
  39. package/dist/assets/skills/oracle-contract-research/SKILL.md +55 -0
  40. package/dist/assets/skills/oracle-desk/SKILL.md +58 -0
  41. package/dist/assets/skills/oracle-desk.md +27 -0
  42. package/dist/assets/skills/oracle-dex-launch/SKILL.md +38 -0
  43. package/dist/assets/skills/oracle-equities/SKILL.md +62 -0
  44. package/dist/assets/skills/oracle-grants/SKILL.md +69 -0
  45. package/dist/assets/skills/oracle-hypercore-staking/SKILL.md +57 -0
  46. package/dist/assets/skills/oracle-hyperliquid/SKILL.md +56 -0
  47. package/dist/assets/skills/oracle-meme-token-sniper/SKILL.md +73 -0
  48. package/dist/assets/skills/oracle-multichain-nft-launch/SKILL.md +338 -0
  49. package/dist/assets/skills/oracle-multichain-token-launch/SKILL.md +300 -0
  50. package/dist/assets/skills/oracle-nft-gacha-launch/SKILL.md +48 -0
  51. package/dist/assets/skills/oracle-nft-mint-gas-war/SKILL.md +63 -0
  52. package/dist/assets/skills/oracle-polymarket/SKILL.md +60 -0
  53. package/dist/assets/skills/oracle-protocol-builder/SKILL.md +59 -0
  54. package/dist/assets/skills/oracle-protocol-security/SKILL.md +60 -0
  55. package/dist/assets/skills/oracle-public-product/SKILL.md +44 -0
  56. package/dist/assets/skills/oracle-receipts/SKILL.md +52 -0
  57. package/dist/assets/skills/oracle-receipts.md +29 -0
  58. package/dist/assets/skills/oracle-rfq-tokenized-assets/SKILL.md +69 -0
  59. package/dist/assets/skills/oracle-smart-wallet-scanner/SKILL.md +49 -0
  60. package/dist/assets/skills/oracle-solana/SKILL.md +65 -0
  61. package/dist/assets/skills/oracle-solana-nft/SKILL.md +54 -0
  62. package/dist/assets/skills/oracle-token-research/SKILL.md +67 -0
  63. package/dist/assets/skills/solana.md +22 -0
  64. package/dist/bin/desk-server.mjs +56 -11
  65. package/dist/bin/oracle-data-mcp.mjs +6 -6
  66. package/dist/bin/oracle-equities.mjs +20 -0
  67. package/dist/bin/oracle-init.mjs +19 -19
  68. package/dist/bin/oracle-public-server.mjs +4 -4
  69. package/dist/bin/oracle-route.mjs +13 -13
  70. package/dist/bin/oracle-scan.mjs +10 -10
  71. package/dist/bin/oracle.mjs +35 -27
  72. package/dist/cli/commands/auth.mjs +11 -11
  73. package/dist/cli/commands/bootstrap.mjs +6 -6
  74. package/dist/cli/commands/chain.mjs +12 -12
  75. package/dist/cli/commands/chat.mjs +39 -29
  76. package/dist/cli/commands/data-mcp.mjs +2 -2
  77. package/dist/cli/commands/data.mjs +5 -5
  78. package/dist/cli/commands/doctor.mjs +3 -3
  79. package/dist/cli/commands/equities.mjs +15 -0
  80. package/dist/cli/commands/farm.mjs +59 -0
  81. package/dist/cli/commands/follow.mjs +28 -0
  82. package/dist/cli/commands/gate.mjs +4 -4
  83. package/dist/cli/commands/harness.mjs +15 -0
  84. package/dist/cli/commands/init.mjs +3 -3
  85. package/dist/cli/commands/mcp.mjs +50 -23
  86. package/dist/cli/commands/model.mjs +44 -34
  87. package/dist/cli/commands/plugins.mjs +38 -0
  88. package/dist/cli/commands/prepare.mjs +2 -2
  89. package/dist/cli/commands/public.mjs +3 -3
  90. package/dist/cli/commands/resolve.mjs +23 -0
  91. package/dist/cli/commands/route.mjs +2 -2
  92. package/dist/cli/commands/scan.mjs +2 -2
  93. package/dist/cli/commands/setup.mjs +12 -12
  94. package/dist/cli/commands/sign.mjs +19 -2
  95. package/dist/cli/commands/swap.mjs +36 -0
  96. package/dist/cli/commands/upgrade.mjs +2 -2
  97. package/dist/cli/commands/version.mjs +2 -2
  98. package/dist/data/desk-data.mjs +53 -10
  99. package/dist/data/names.mjs +2 -0
  100. package/dist/data/providers/farming.mjs +2 -0
  101. package/dist/equities/index.mjs +1 -0
  102. package/dist/index.mjs +58 -15
  103. package/dist/public-api/agent-grants.mjs +3 -0
  104. package/dist/router/index.mjs +2 -2
  105. package/dist/scanner/index.mjs +3 -3
  106. package/package.json +8 -3
  107. package/public/oracle-splash/_variants/ice.html +2073 -0
  108. package/public/oracle-splash/_variants/ivory.html +2075 -0
  109. package/public/oracle-splash/assets/agents/claude.png +0 -0
  110. package/public/oracle-splash/assets/agents/codex.png +0 -0
  111. package/public/oracle-splash/assets/desktop-app.jpg +0 -0
  112. package/public/oracle-splash/assets/hero/cli-session-poster.jpg +0 -0
  113. package/public/oracle-splash/assets/hero/cli-session.mp4 +0 -0
  114. package/public/oracle-splash/assets/hero/cli-session.webm +0 -0
  115. package/public/oracle-splash/assets/hero/orb-poster.jpg +0 -0
  116. package/public/oracle-splash/assets/hero/orb.webm +0 -0
  117. package/public/oracle-splash/assets/hero/risk-session-poster.jpg +0 -0
  118. package/public/oracle-splash/assets/hero/risk-session.mp4 +0 -0
  119. package/public/oracle-splash/assets/hero/risk-session.webm +0 -0
  120. package/public/oracle-splash/assets/hero/route-session-poster.jpg +0 -0
  121. package/public/oracle-splash/assets/hero/route-session.mp4 +0 -0
  122. package/public/oracle-splash/assets/hero/route-session.webm +0 -0
  123. package/public/oracle-splash/downloads/index.html +241 -0
  124. package/public/oracle-splash/index.html +1211 -242
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: oracle-nft-mint-gas-war
3
+ description: Guard public NFT mint bots with chain-wide gas-war caps before any wallet-signed mint transaction is returned.
4
+ ---
5
+
6
+ # Oracle NFT mint gas-war guard
7
+
8
+ Use when a public Oracle lane prepares NFT mint transactions or runs a mint bot
9
+ across configured chains.
10
+
11
+ ## Rule
12
+
13
+ A mint bot may move fast, but it must not bid uncapped gas.
14
+
15
+ Every prepared mint transaction must carry a gas envelope that fits the user's
16
+ explicit grant or bot policy:
17
+
18
+ - `maxTotalGasWei` / grant `maxGasWei`: total gas spend cap (`gasLimit * maxFeePerGas` or `gasLimit * gasPrice`)
19
+ - optional `maxFeePerGasWei`: per-unit fee cap
20
+ - optional `maxPriorityFeePerGasWei`: tip cap for gas wars
21
+ - chain id: required and bound to the prepared transaction
22
+
23
+ Missing caps fail closed. A mint returning calldata without gas caps is not
24
+ public-safe.
25
+
26
+ ## Implementation hook
27
+
28
+ Use `validateNftMintGasWar()` or `assertNftMintGasWar()` from the public package
29
+ before returning a wallet-signable NFT mint transaction.
30
+
31
+ ```js
32
+ import { assertNftMintGasWar } from "oracle-agent";
33
+
34
+ assertNftMintGasWar({
35
+ chainId,
36
+ tx: { gasLimit, maxFeePerGas, maxPriorityFeePerGas },
37
+ policy: {
38
+ grant, // may provide maxGasWei
39
+ maxFeePerGasWei,
40
+ maxPriorityFeePerGasWei,
41
+ },
42
+ });
43
+ ```
44
+
45
+ ## Public behavior
46
+
47
+ - PASS: return the unsigned mint transaction with the gas verdict fields.
48
+ - BLOCK: show the cap breached and ask the user to raise the cap or skip.
49
+ - Never silently widen gas during a gas war.
50
+ - Never treat mint price cap as gas cap; mint value and gas spend are separate.
51
+ - Never backend-sign public mints. User wallet or explicit self-hosted session
52
+ grant signs.
53
+
54
+ ## Verification
55
+
56
+ Run:
57
+
58
+ ```bash
59
+ node --test test/nft-gas-war-guard.test.mjs test/package-surface.test.mjs
60
+ ```
61
+
62
+ Full public release gate still requires `npm test`, package dry-run, and secret
63
+ scan before publishing.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: oracle-polymarket
3
+ description: Use for Polymarket prediction markets — event pricing, books, and resolution risk via the public CLOB and Gamma APIs.
4
+ ---
5
+
6
+ # Polymarket
7
+
8
+ Read through Oracle's data plane (`poly-public` provider: CLOB + Gamma REST, no
9
+ key). Settles on Polygon (137).
10
+
11
+ ## Ops
12
+
13
+ | Need | Op |
14
+ |---|---|
15
+ | market list | `markets` |
16
+ | events | `events` |
17
+ | order book | `book` |
18
+ | midpoint | `midpoint` |
19
+ | spread | `spread` |
20
+ | last price | `price` |
21
+
22
+ ## A price is not a probability
23
+
24
+ 0.62 means the last trader transacted there — net of fees, liquidity constraints,
25
+ and whoever is hedging an off-platform position. Before treating it as a forecast:
26
+
27
+ - **depth** — 0.62 on $40 of size carries no information
28
+ - **spread** — wide means nobody defends an opinion
29
+ - **time to resolution** — a 3-day market and a 3-month market at the same price
30
+ are not saying the same thing
31
+ - **fee drag** — round-trip costs eat thin edges
32
+
33
+ ## Resolution text is the real risk
34
+
35
+ The most expensive mistake here is not mispricing probability. It is being *right*
36
+ about the world and *wrong* about the resolution criteria.
37
+
38
+ Read the rules before discussing edge. Flag:
39
+
40
+ - ambiguous wording that could settle against the consensus reading
41
+ - who resolves it and on what source
42
+ - what happens on an edge case, a delay, or a cancelled event
43
+ - whether the market can resolve early
44
+
45
+ If the rules could plausibly settle the "obviously right" side as a loss, that is
46
+ the headline, not a footnote.
47
+
48
+ ## Correlated markets
49
+
50
+ Related markets often disagree. A set of outcome prices summing well past 1.00 is
51
+ either a fee/liquidity artifact or a genuine inconsistency. Check the sum before
52
+ calling something mispriced.
53
+
54
+ ## Hard rules
55
+
56
+ 1. Read the resolution criteria before discussing edge.
57
+ 2. Never present a market price as your own forecast without saying which you mean.
58
+ 3. Quote depth alongside price.
59
+ 4. You prepare; the user's wallet signs.
60
+ 5. Receipts or it didn't happen.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: oracle-protocol-builder
3
+ description: Use when the user wants Oracle to scaffold/deploy protocol templates. Gated Foundry templates; prepare-only deploy; not a firm audit.
4
+ ---
5
+
6
+ # Protocol builder
7
+
8
+ Oracle scaffolds and **prepares unsigned deploys**. The user signs. Custody boundary unchanged.
9
+
10
+ ## Security gate (v1)
11
+
12
+ Before any template deploy prepare:
13
+
14
+ 1. `forge test` must pass on the template
15
+ 2. Slither runs when installed (optional skip if missing; set `REQUIRE_SLITHER=1` to hard-require)
16
+ 3. JS `runProtocolTemplateGate` / `prepareTemplateDeploy` refuse otherwise
17
+
18
+ ```js
19
+ // list
20
+ data.call("protocol-templates", "list")
21
+ // gate
22
+ data.call("protocol-templates", "gate", { templateId: "safe-erc20" })
23
+ // unsigned deploy prepare (stamped)
24
+ data.call("protocol-templates", "prepareDeploy", {
25
+ templateId: "safe-erc20",
26
+ chainId: 8453,
27
+ args: [name, symbol, supply, initialHolder, initialOwner],
28
+ })
29
+ ```
30
+
31
+ CLI: `npm run protocol:gate -- safe-erc20`
32
+
33
+ ## Shipped template: `safe-erc20`
34
+
35
+ - Fixed supply, mint once in constructor (no hidden mint)
36
+ - Ownable2Step + pause
37
+ - No tax / blacklist / max-tx / upgrade proxy
38
+ - Foundry tests included
39
+
40
+ ## Honesty
41
+
42
+ **Reviewed templates + automated tests ≠ paid Solidity audit.**
43
+
44
+ Docs and prepare envelopes always set `firmAudit: false` and carry the disclaimer.
45
+ Mainnet TVL → independent firm audit.
46
+
47
+ ## Required order (custom work)
48
+
49
+ 1. Authority model
50
+ 2. Threat model
51
+ 3. Tests (Foundry)
52
+ 4. Static analysis when available
53
+ 5. Gate green
54
+ 6. Prepare unsigned only
55
+ 7. User signs + verify source
56
+
57
+ ## Refusal line
58
+
59
+ Refuse hidden drains, honeypots, wash-trading systems, undisclosed tax switches, fake TVL, or any contract whose main purpose is deceiving buyers.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: oracle-protocol-security
3
+ description: Use before preparing any contract deploy or reviewing protocol code. Authority model first, then the vulnerability checklist.
4
+ ---
5
+
6
+ # Protocol security
7
+
8
+ Deploys are permanent. This skill runs **before** code is written, not after.
9
+
10
+ ## Authority model comes first
11
+
12
+ Before reviewing a single line of logic, answer these in plain language:
13
+
14
+ 1. **Who owns it** after deployment — owner, admin, upgrader, pauser, treasury
15
+ 2. **What is upgradeable**, and who can upgrade
16
+ 3. **What is immutable** once live
17
+ 4. **What breaks if the deployer key is lost** — or is stolen
18
+ 5. **What an attacker gains** from each privileged function
19
+
20
+ If a contract mints privileged roles to an address, **name that address** and make
21
+ the user confirm it is the intended one. A deploy that hands ownership to the wrong
22
+ key is unrecoverable.
23
+
24
+ ## Review checklist
25
+
26
+ | Area | What to actually check |
27
+ |---|---|
28
+ | access control | every privileged fn gated; no missing modifier |
29
+ | initialization | can `initialize` be front-run or called twice? |
30
+ | reentrancy | state written *before* external calls |
31
+ | external calls | return values checked; no blind `call` |
32
+ | integer handling | unchecked blocks justified individually |
33
+ | approvals | exact amount, never unlimited by default |
34
+ | upgrade path | storage layout compatible; gap reserved |
35
+ | emergency stop | exists, and someone can actually reach it |
36
+ | oracle use | manipulation cost vs the value it secures |
37
+ | withdrawal | can funds ever be stranded? |
38
+
39
+ ## Prefer boring
40
+
41
+ A fork of an audited contract with a small, reviewed diff beats elegant clean-room
42
+ code. If you propose something novel, justify why the boring option fails.
43
+
44
+ ## Verify, never assume
45
+
46
+ - Explorer contract **names are not verification**. Clones share names.
47
+ - Confirm bytecode exists: `eth_getCode` returning `0x` means nothing is deployed
48
+ there. Codesize 2 is an empty stub.
49
+ - Confirm constructor-bound addresses (factory, WETH, router) match what you
50
+ expect — read them back from the deployed contract.
51
+ - Verify a router or venue from the protocol's **own API or docs**, per chain, and
52
+ record how and when you verified it.
53
+
54
+ ## Deploy discipline
55
+
56
+ Review → simulate → prepare **unsigned** → user signs. Never house-sign. The
57
+ destination allowlist applies to deploy targets like any other destination.
58
+
59
+ Decode constructor arguments and read them back to the user in plain language
60
+ before they sign. "Trust the calldata" is not consent.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: oracle-public-product
3
+ description: Use for Oracle public product UX/copy: non-custodial, prepare-first, graph/evidence-led, no operator framing.
4
+ ---
5
+
6
+ # Oracle public product
7
+
8
+ Use this when writing Oracle public docs, console copy, landing pages, launch notes,
9
+ or capability-pack language.
10
+
11
+ ## Positioning
12
+
13
+ Oracle is a public multichain crypto agent interface:
14
+
15
+ - trader: quote, route, simulate, prepare, and verify receipts
16
+ - builder: scaffold contracts/apps and prepare unsigned deploy/admin txs
17
+ - analyzer: token, contract, venue, wallet, and market research
18
+ - scanner: chain scanners and smart-wallet boards
19
+ - non-EVM lanes: Solana and Bitcoin/Ordinals where supported
20
+
21
+ The product voice is user-facing. Do not describe internal operator plumbing,
22
+ private wallets, VPS paths, hot-wallet ops, or house execution.
23
+
24
+ ## Custody copy
25
+
26
+ Always state the invariant clearly:
27
+
28
+ - Oracle prepares; the user's wallet signs.
29
+ - Broadcast needs explicit user/grant authority.
30
+ - Prepare is not sign. Sign is not broadcast.
31
+ - Server API keys are scoped agent keys, not wallet keys.
32
+
33
+ ## Forbidden public framing
34
+
35
+ - no autonomous custody promises
36
+ - no hidden operator signer references
37
+ - no guaranteed-profit or floor-guarantee claims
38
+ - no "we execute for you" without the grant/user-wallet boundary
39
+ - no references to private infrastructure, hostnames, paths, or internal agents
40
+
41
+ ## Output standard
42
+
43
+ Lead with what the user can do. Then name the guardrail. Keep it concrete and
44
+ short: capability, boundary, evidence.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: oracle-receipts
3
+ description: Use whenever reporting the outcome of any on-chain action. Enforces that a claim of success carries a hash, a receipt, and a balance delta.
4
+ ---
5
+
6
+ # Receipts or it didn't happen
7
+
8
+ The failure mode this prevents: an agent says "done, swapped 0.5 ETH for USDC" when
9
+ the transaction reverted, was never broadcast, or landed with a different output
10
+ than promised. The user then acts on a false balance.
11
+
12
+ ## The rule
13
+
14
+ A money-moving action is **complete** only when you can show:
15
+
16
+ 1. **transaction hash** — the real one, from the broadcast response
17
+ 2. **receipt status** — `1`. A receipt with status `0` is a *failed* transaction
18
+ that still consumed gas; that is not success
19
+ 3. **balance delta** — the output token balance actually changed, read back after
20
+ the receipt
21
+ 4. **the log** proving the intended event fired (`Swap`, `Transfer` to the right
22
+ recipient, `OrderFilled`)
23
+
24
+ Missing any of the four → report what you have and call it incomplete.
25
+
26
+ ## Language discipline
27
+
28
+ | Don't say | Say |
29
+ |---|---|
30
+ | "swapped" (before receipt) | "prepared" / "broadcast, awaiting receipt" |
31
+ | "done" | "receipt 1, balance +NNN USDC, hash 0x..." |
32
+ | "it should have gone through" | "unknown — no receipt yet" |
33
+ | "approved and swapped" | name each transaction separately |
34
+
35
+ **Preparing is not signing. Signing is not broadcasting. Broadcasting is not
36
+ confirmation.** Four distinct states; never collapse them in a report.
37
+
38
+ ## Multi-step actions
39
+
40
+ An ERC-20 swap is at minimum two transactions: `approve` then the swap. Report each
41
+ separately with its own hash. If the approve landed and the swap reverted, the
42
+ honest report is "allowance set, swap failed" — not "swap failed" (the user now has
43
+ a live allowance they should know about).
44
+
45
+ For a raw-pair or multi-leg route: funding a pool is **not** a buy. Until the swap
46
+ call itself has a receipt, the tokens are sitting somewhere they can be taken.
47
+
48
+ ## When it fails
49
+
50
+ Say what failed, the revert reason if you have it, and what you tried. Never
51
+ substitute a plausible-looking result for one you could not obtain. A reported
52
+ blocker is useful; an invented success is a loss.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: oracle-receipts
3
+ description: Use whenever reporting the outcome of any on-chain action (swap, bridge, mint, send, list, accept-offer).
4
+ ---
5
+
6
+ # Receipt format
7
+
8
+ ## Required fields
9
+ - tx hash (full, with chain explorer link)
10
+ - chain + chainId
11
+ - action (swap/bridge/mint/send/list/accept-offer)
12
+ - from → to (addresses)
13
+ - amount in → amount out (with token symbols)
14
+ - gas used + gas cost in USD
15
+ - status: confirmed / pending / failed
16
+
17
+ ## Explorer links
18
+ - Ethereum: https://etherscan.io/tx/{hash}
19
+ - Base: https://basescan.org/tx/{hash}
20
+ - Arbitrum: https://arbiscan.io/tx/{hash}
21
+ - Optimism: https://optimistic.etherscan.io/tx/{hash}
22
+ - Polygon: https://polygonscan.com/tx/{hash}
23
+ - BSC: https://bscscan.com/tx/{hash}
24
+ - HyperEVM: https://www.hyperscan.com/tx/{hash}
25
+
26
+ ## Never claim
27
+ - "submitted" = confirmed. Only tx receipt with status=1 is confirmed.
28
+ - A prepare is not a fill. Report prepare as "prepared, unsigned."
29
+ - A sign is not a send. Report sign as "signed, not broadcast."
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: oracle-rfq-tokenized-assets
3
+ description: RFQ/intent routing across supported chains and guarded buys for tokenized Robinhood assets when user keys/routes are configured.
4
+ ---
5
+
6
+ # Oracle RFQ + tokenized asset routing
7
+
8
+ Use when a user asks for RFQ, solver/intent quotes, request-for-quote execution,
9
+ or buying tokenized Robinhood-style assets/stocks on supported chains.
10
+
11
+ ## RFQ scope
12
+
13
+ Oracle should treat RFQ as another best-execution source, not a bypass:
14
+
15
+ - Query RFQ/intent venues where the chain and token pair are supported and the
16
+ user has configured any required API keys.
17
+ - Compare RFQ quotes against AMM/aggregator routes on net received after gas,
18
+ fees, solver spread, and settlement assumptions.
19
+ - Return `artifactKind` precisely: signed typed-data order vs unsigned tx vs
20
+ wallet-provider action.
21
+ - Re-quote immediately before prepare/signing. RFQ expiry/nonce is short-lived.
22
+ - Do not fabricate RFQ support for a chain without a configured venue.
23
+
24
+ ## Every-chain rule
25
+
26
+ "Across all chains" means every configured chain is attempted and capability-labeled:
27
+
28
+ - `RFQ_READY`: venue configured, quote live, prepare path verified.
29
+ - `QUOTE_ONLY`: quote available, but no reviewed prepare path.
30
+ - `UNCONFIGURED`: needs user API key or venue credentials.
31
+ - `UNAVAILABLE`: no RFQ venue for that chain/token pair.
32
+ - `BLOCKED`: policy, unsupported asset, compliance, or route guard rejected.
33
+
34
+ Unsupported is an honest result, not a failure to hide.
35
+
36
+ ## Tokenized Robinhood assets
37
+
38
+ Treat tokenized Robinhood assets as normal on-chain assets plus extra identity/risk
39
+ checks:
40
+
41
+ 1. Resolve the exact chain and contract/mint from the official issuer/venue or a
42
+ user-provided contract. Never infer from ticker alone.
43
+ 2. Check asset metadata, decimals, supply, issuer/proxy/admin controls, transfer
44
+ restrictions, and redeemability/custody disclosures when public.
45
+ 3. Verify the venue/router can quote and prepare the asset on that chain.
46
+ 4. For buys, run the same route and slippage guard as any ERC-20/SPL swap.
47
+ 5. For sells, run sellability/reverse route first; tokenized assets may trade like
48
+ wrappers and can have restricted-transfer or allowlist rules.
49
+ 6. User signs; Oracle does not custody or guarantee redemption.
50
+
51
+ ## Output contract
52
+
53
+ Return a table per chain/venue:
54
+
55
+ - chain / venue / asset id
56
+ - RFQ status and expiry
57
+ - gross quote, estimated gas/fees, net output
58
+ - artifact kind and signing path
59
+ - policy blockers
60
+ - confidence and data timestamp
61
+
62
+ ## Pitfalls
63
+
64
+ - Calling a solver/RFQ quote "gasless" when the cost is hidden in spread.
65
+ - Using an RFQ quote after expiry.
66
+ - Treating a tokenized stock ticker as identity without contract provenance.
67
+ - Ignoring transfer restrictions that make buys possible but exits blocked.
68
+ - Routing tokenized Robinhood assets through DEMI/RH private executor by default;
69
+ public users must use their own wallet/key/API setup.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: oracle-smart-wallet-scanner
3
+ description: Use when finding, scoring, or monitoring smart wallets from on-chain behavior across tokens, NFTs, and venues.
4
+ ---
5
+
6
+ # Smart-wallet scanner
7
+
8
+ Use this for on-chain wallet intelligence: early buyers, profitable exits, repeat
9
+ edge, copy-radar, cabal detection candidates, and wallet boards.
10
+
11
+ ## Smart wallet definition
12
+
13
+ A wallet is not smart because it bought one winner. Require repeatable evidence:
14
+
15
+ - early across multiple unrelated assets
16
+ - profitable realized exits, not just mark-to-market bags
17
+ - enough trade count and not only one ticker
18
+ - entry before broad social consensus
19
+ - exits before liquidity drain or sell imbalance
20
+ - behavior survives fees, gas, and failed trades
21
+
22
+ ## Scan pattern
23
+
24
+ 1. Start from live events: pair creates, swaps, mint transfers, order fills,
25
+ marketplace sales, bridge inflows.
26
+ 2. Normalize wallet, chain, token/NFT, time, size, and realized PnL.
27
+ 3. Cluster funding and common recipients separately; do not call it a bundle
28
+ without launch-block clustering and common-funder evidence.
29
+ 4. Score wallets by multi-asset repeatability and drawdown, not raw largest win.
30
+ 5. Track holds vs exits. A smart buyer becoming a smart seller changes the signal.
31
+ 6. Emit confidence and evidence window with every wallet label.
32
+
33
+ ## Output standard
34
+
35
+ For each wallet surface:
36
+
37
+ - address and chain
38
+ - sample wins/losses
39
+ - realized PnL basis and limitations
40
+ - first-seen timing vs launch/volume
41
+ - current holdings/exit state if known
42
+ - confidence: high / moderate / low / unknown
43
+
44
+ ## Hard rules
45
+
46
+ - Never expose a private operator wallet as a public smart-wallet seed.
47
+ - Never use one-token PnL as a primary smart label.
48
+ - Cabal candidates are seeds for deeper analysis, not proof of manipulation.
49
+ - If sell data is unavailable, label PnL `UNKNOWN`, not profitable.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: oracle-solana
3
+ description: Use for Solana research and swap preparation — Jupiter routes, SPL accounts, simulation, blockhash expiry.
4
+ ---
5
+
6
+ # Solana
7
+
8
+ Read and prepare through Oracle's data plane (`solana-rpc`, `jupiter`). No key
9
+ required. Signing happens in the user's wallet; Oracle returns unsigned
10
+ transactions.
11
+
12
+ ## Ops
13
+
14
+ | Need | Op |
15
+ |---|---|
16
+ | SOL balance | `getBalance` |
17
+ | SPL accounts | `tokenAccounts` |
18
+ | fresh blockhash | `latestBlockhash` |
19
+ | dry run | `simulate` |
20
+ | route price | `jupiter.quote` |
21
+ | unsigned swap tx | `jupiter.prepare` |
22
+
23
+ ## Blockhash expiry is the trap
24
+
25
+ A Solana transaction carries a recent blockhash and dies in roughly 60–90 seconds.
26
+
27
+ Consequences that catch people:
28
+
29
+ - a transaction prepared two minutes ago is **dead** — re-prepare, don't retry
30
+ - do not prepare, go do other tool work, then hand it over
31
+ - if the user takes a while to approve, prepare again
32
+
33
+ An expired transaction fails with a confusing error that looks like a routing bug.
34
+ It isn't.
35
+
36
+ ## Simulate every time
37
+
38
+ `simulateTransaction` is cheap and tells you the actual failure before the user
39
+ signs. There is no reason to skip it. Check:
40
+
41
+ - does it succeed at all
42
+ - compute units consumed (near the limit → it will fail under load)
43
+ - logs for the real revert reason
44
+
45
+ ## Account creation costs rent
46
+
47
+ Swapping into a token the wallet has never held requires creating an associated
48
+ token account, which costs SOL rent. Budget it, and say so — a wallet with exactly
49
+ enough SOL for the swap will fail on the account creation.
50
+
51
+ ## Decimals are not standard
52
+
53
+ Nine is common, six is common, others exist. Read the mint. Assuming decimals is how
54
+ an amount ends up 1000x off.
55
+
56
+ ## Hard rules
57
+
58
+ 1. **Simulate before returning any transaction for signature.**
59
+ 2. **Never relay a caller-supplied RPC** — a hostile endpoint can lie about
60
+ simulation.
61
+ 3. **Return unsigned only.** Never a fully-signed transaction.
62
+ 4. **Solana authority is separate from EVM authority.** No EVM key satisfies a
63
+ Solana grant.
64
+ 5. Name the **mint address**, not just the ticker.
65
+ 6. Receipts or it didn't happen — confirmed signature or it failed.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: oracle-solana-nft
3
+ description: Research Solana NFT collections and prepare unsigned Magic Eden buy, list, and mint transactions.
4
+ ---
5
+
6
+ # Solana NFT lane (Magic Eden)
7
+
8
+ Use when someone asks Oracle to check a Solana NFT collection's floor, find
9
+ listings, buy an NFT, list one they hold, or mint from a launchpad drop.
10
+
11
+ ## Tiers
12
+
13
+ | Op | Key needed | What it returns |
14
+ |---|---|---|
15
+ | `stats` | none | floor in SOL, listed count, 24h volume |
16
+ | `listings` | none | mint, seller, auctionHouse, tokenATA, price |
17
+ | `tokenListings` | none | listings for one specific mint |
18
+ | `prepareBuy` | `MAGICEDEN_API_KEY` | unsigned base64 transaction |
19
+ | `prepareList` | `MAGICEDEN_API_KEY` | unsigned base64 transaction |
20
+ | `prepareMint` | `MAGICEDEN_API_KEY` | unsigned base64 transaction |
21
+
22
+ Reads are keyless. Instruction builders need the user's own Magic Eden key. If
23
+ the key is missing, say so plainly and stop; do not fake a ticket.
24
+
25
+ ## Flow for a buy
26
+
27
+ 1. `desk.solana.nftStats({ symbol })` - confirm the collection is real and get
28
+ the floor.
29
+ 2. `desk.solana.nftListings({ symbol, limit })` - pull live listings. The
30
+ cheapest listing is the first one when sorted by price.
31
+ 3. Set `maxPriceSol` from the user's stated ceiling, not from the floor. The cap
32
+ is checked before any network call, so a listing that moved above the ceiling
33
+ is rejected without touching the API.
34
+ 4. `desk.solana.nftPrepareBuy({ buyer, seller, auctionHouse, tokenMint, tokenATA, priceSol, maxPriceSol })`.
35
+ 5. Simulate the returned base64 through `desk.solana.simulate` before handing it
36
+ over. A prepared transaction that fails simulation is a prepared loss.
37
+ 6. Hand the user the unsigned transaction. Their wallet signs and sends.
38
+
39
+ ## Rules
40
+
41
+ - Floor price is not a bid. Buying fills at the listing price, which can move
42
+ between the read and the signature.
43
+ - Always pass `maxPriceSol`. Without it there is no ceiling on a mint or buy.
44
+ - Collection symbols are validated as slugs. `../` and empty strings are
45
+ rejected, not encoded into a URL.
46
+ - Every prepare returns `signingReady: false` and `broadcastReady: false`. Oracle
47
+ never signs a Solana transaction and never sends one.
48
+ - Solana lamports are integers. `priceSol` is decimal SOL; the module converts.
49
+
50
+ ## Verification
51
+
52
+ `npm run e2e:solana-bitcoin` hits live Magic Eden reads, a live Jupiter quote,
53
+ a live prepared swap, and a live simulation, then asserts the prepare posture
54
+ held.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: oracle-token-research
3
+ description: Use when researching any token, especially low-cap or newly launched. The sell-side-first checklist that catches honeypots.
4
+ ---
5
+
6
+ # Token research
7
+
8
+ The default assumption for a new token is **hostile**. Research exists to disprove
9
+ that, not to confirm a story.
10
+
11
+ ## Sell side first
12
+
13
+ Most losses here are not bad entries. They are tokens that **buy cleanly and cannot
14
+ be sold**. So the first question is never "will it go up" — it is "can I get out."
15
+
16
+ Run a **round-trip simulation** in one state-free call: wrap native → buy token →
17
+ sell token back → require a minimum return. Treat any of these as FAIL:
18
+
19
+ - quote failure in either direction
20
+ - transfer failure
21
+ - router revert
22
+ - round-trip return below the no-tax reverse quote by more than a small tolerance
23
+
24
+ A successful **buy** quote proves nothing about the sell.
25
+
26
+ ## Price against the real pool
27
+
28
+ A launchpad or bonding-curve token often exposes its **own** `getReserves()`
29
+ returning zero or virtual values. The tradeable market is a *different* pair.
30
+
31
+ - `blockTimestampLast == 0` → not a live pool. Do not size against it.
32
+ - Find the real pair via `factory.getPair(a, b)` or a live swap's decoded target
33
+ - A pair with `kLast`, `price0CumulativeLast`, `MINIMUM_LIQUIDITY` is standard V2
34
+ even when the router in front of it is a custom fork
35
+
36
+ Sizing against stale reserves is how a "0.4% impact" trade becomes 3%.
37
+
38
+ ## Identity before action
39
+
40
+ Tickers collide and get squatted. A fuzzy name match is a **candidate**, never
41
+ confirmation.
42
+
43
+ Always surface the **contract address** and require explicit confirmation before
44
+ anything that moves value. `FEFUR` vs `FEFER` is a real class of loss.
45
+
46
+ ## The rest of the checklist
47
+
48
+ | Check | Red flag |
49
+ |---|---|
50
+ | holder concentration | top 5 hold most of supply |
51
+ | liquidity depth | thin relative to your size |
52
+ | LP status | unlocked or removable |
53
+ | age | hours old with heavy volume |
54
+ | router | non-canonical clone with a familiar name |
55
+ | mint authority | still open |
56
+ | transfer logic | fees or blocks that change post-launch |
57
+
58
+ ## Label your evidence
59
+
60
+ Mark every finding `LIVE`, `STALE`, `UNKNOWN`, or `UNAVAILABLE` with a timestamp.
61
+ Do not call holder-concentration analysis "bundle detection" — bundles require
62
+ launch-block clustering and common-funder evidence, which is a different query.
63
+
64
+ ## Honest output
65
+
66
+ `unknown` is a correct and frequent answer about a two-hour-old token. Say it.
67
+ Never let narrative quality substitute for a passing sell simulation.