dsh-onchain-arbitrage-radar
DiscoveredRead-only on-chain arbitrage radar for DeepSeek Harness: cross-venue spreads, funding crowding, tokenized-stock clock, cost model and execution gate.
On-chain Arbitrage Radar
A read-only arbitrage research plugin for DeepSeek Harness. It reads public market data, turns it into cost-adjusted numbers, and refuses to pretend that a screen spread is a trade.
It never holds keys, never signs, and never places an order.
What it gives you
| Tool | What it answers |
|---|---|
arb_spread_scan | Is there a live Gate ↔ Bitfinex spot spread, and what is left after both taker fees, further slippage, conversion and depth? |
arb_cost_model | Given a gross spread and explicit costs, what is the net profit, break-even spread and minimum effective size? |
arb_guard_check | Does the plan respect the loss cap, leverage cap, minimum edge, quote age and observed-data rule? |
arb_funding_scan | Which perpetuals pay the most annualized funding, and which of those are thin, crowded or delisting? |
arb_stock_clock | How far is a Gate tokenized stock from its underlying reference, and is the US session open? |
arb_research | What does the research method say about this structure? |
arb_records | What did this Host process scan and reject recently? |
A compact radar strip below the composer shows the latest spread, funding and tokenized-stock numbers and can trigger one spread scan.
Data sources
All calls are public and keyless:
- Gate.io — spot tickers, USD and USDT markets, USDT perpetual funding.
- Bitfinex — public spot ticker (USD).
- Hyperliquid — perpetual contexts and funding history.
- DeFiLlama coins — USDT/USD rate when a Gate market is USDT-quoted while Bitfinex quotes USD.
The Host process must be able to reach these hosts. On a restricted network a
source simply reports unavailable; the remaining sources still answer.
Install
dsh plugin install https://github.com/gpteth/dsh-onchain-arbitrage-radar
A local checkout works too: dsh plugin install /absolute/path/to/dsh-onchain-arbitrage-radar.
In the running Harness, install it from Settings → Plugins (or have the agent
call plugin_manager → install_bundle), then check the plugin appears in
Settings → Plugins. The row is inserted by cordis.patch.yml; the browser strip
is discovered from the package's dsh.client manifest and ./client export.
Configure
Every field is optional; defaults live in src/settings.js. Edit the row config
in cordis.patch.yml or the profile patch:
- id: arbitrage-radar
config:
thresholds:
goBps: 40 # net bps needed for a "go"
maxQuoteAgeSeconds: 20 # older Bitfinex quotes are rejected
stockDeviationBps: 150
minOiUsd: 1000000 # Hyperliquid open interest floor
minDayVolumeUsd: 500000
fundingWatchPct: 30 # annualized funding that gets a flag
venues:
gate: { takerBps: 20 }
bitfinex: { takerBps: 20 }
scan:
symbols: [BTC, ETH, SOL]
sizeQuote: 1000
slippageBps: 5
funding:
venues: [gate, hyperliquid]
top: 15
historyPoints: 60
historyCandidates: 3
stocks:
tokens: [NVDAX, TSLAX, COINX]
transfer:
conversionBufferBps: 5
usdtFallbackBufferBps: 15
risk:
maxLossFraction: 0.02
maxLeverage: 1
minNetBps: 30
maxQuoteAgeSeconds: 60
panel:
path: /arb-radar
enabled: true
throttleMs: 5000
requestTimeoutMs: 8000
maxRecords: 200
Unusable values fall back to their defaults and are logged; they never stop the plugin from activating.
Panel route
The strip reads and writes two same-origin JSON routes on the Host web server:
GET /arb-radar/summary— latest scan/funding/stock snapshots and journal counts.POST /arb-radar/scan— run one spread scan with the configured defaults.GET /arb-radar/health— liveness and journal counts.
Scans are throttled, cross-origin requests are refused, and only public market data plus process-local records are returned.
What version 1 does not do
- No wallets, signing, orders, transfers, keys or credentials.
- No DEX/AMM pool quotes: the cross-venue scope is Gate ↔ Bitfinex. The on-chain angle is the tokenized-stock clock and the funding/basis work.
- No full order book: depth is top-of-book only, and Bitfinex's public ticker exposes no size at all.
- No server timestamp on Gate spot tickers; the fetch time is recorded instead.
- No US holiday calendar or early-close modeling.
- No durable journal: records last for the Host process. The session log is the authoritative record.
- No P&L claim. A
goverdict is a scenario for review, not a fill.
Research basis
The method — net edge over gross spread, minimum effective size, funding as insurance rather than rent, the tokenized-stock clock, evidence and risk gates — was informed by the public study vault at https://github.com/gpteth/onchain-arbitrage-colearn. That repository carries no license, so this plugin is an original implementation: no code, notes or scripts were copied, and none of its files are executed. Its market data is read live from the venues listed above.
Develop and verify
node --test test/*.test.js # pure logic, stubbed sources, route, client module
node scripts/live-check.mjs # real public endpoints; prints a compact summary
The tests cover the arithmetic, spread verdicts (including stale quotes, thin depth and USDT conversion), funding flags, the US session clock, reference matching, the HTTP route and the browser module's registration. Live behavior depends on the network described above.
Comments
Loading…
Similar plugins
by dingchenhui0618-arch
Adversary review gate for DeepSeek Harness: an independent small model reviews destructive tool calls before they run, and reports every verdict. · DSH 对抗式审查门:危险工具调用在执行前由一个独立小模型复核。
★ 0
MIT
JavaScript
Oct 27, 2026
dsh plugin --profile web add dsh-wardenby Liu-Bot24
DeepSeek Harness(DSH)只读执行轨迹复盘插件,支持规则分析、独立模型解读、证据定位、任务概览与运行对比。
★ 5
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-plugin-trace-insightby Wanbinyu
Read-only, redacted provider error diagnostics for DeepSeek Harness
★ 3
MIT
TypeScript
Oct 14, 2026
dsh plugin --profile web add dsh-error-lensby Muggle8888
Read-only update auditing for DeepSeek Harness profile plugins
★ 0
MIT
JavaScript
Sep 10, 2026
dsh plugin --profile web add dsh-plugin-update-auditby XiaoSHang05
A passive watchdog for DeepSeek Harness: watches a turn's thinking and text streams and cancels it when the model starts repeating itself.
★ 0
MIT
JavaScript
Oct 27, 2026
dsh plugin --profile web add dsh-rice-guardby gjjkbssg
Structured cross-model peer review for DeepSeek Harness — blind reasoning, anonymous critique, revision, and deterministic verdicts.
★ 0
MIT
TypeScript
Aug 31, 2026
dsh plugin --profile web add dsh-model-jury