How OwlSight Works
A complete walkthrough of the execution intelligence pipeline — from market signal ingestion to Hummingbot trade handoff.
Overview
What OwlSight does and why it exists
Cross-chain arbitrage is opaque. A visible price gap between two chains does not tell a trader whether the trade is worth making after bridge fees, slippage, and latency are accounted for. Most tooling stops at the surface spread — OwlSight starts there.
OwlSight is an execution intelligence layer that sits above a trading engine. It detects route candidates, scores them against real cost models, runs probabilistic simulation, and only hands approved trades to the execution layer.
The pipeline has four distinct stages: detect (find price dislocations), score (run feasibility simulation), decide (apply guardrails), and execute (hand off to Hummingbot). Each stage is a hard gate — a route that fails scoring never reaches execution.
Architecture
System layers and ownership boundaries
Market Data Providers
│
▼
Opportunity Engine ← detects price dislocations across chains
│
▼
Feasibility Engine ← models bridge costs, slippage, latency
│
▼
Decision Gate ← applies guardrails, produces approve/reject
│
▼
Hummingbot Adapter ← builds TradeExecutionRequest, submits to HB
│
▼
Hummingbot (paper trade) ← executes on binance_paper_trade connectorOwlSight owns
- · Market data ingestion and normalisation
- · Cross-chain opportunity detection
- · Monte Carlo feasibility simulation
- · Confidence scoring and guardrail filtering
- · Trade request construction
Hummingbot owns
- · Order placement and market interaction
- · Exchange connectivity (paper or live)
- · Position and balance management
- · Bridge and DEX transaction submission
- · Settlement and confirmation
Signal Detection
How market data enters the system
OwlSight ingests prices from one of three providers, selected at startup via the MARKET_DATA_PROVIDER environment variable. Each provider is an interchangeable adapter — the opportunity engine receives a normalised quote regardless of source.
| Provider | Type | Refresh | Used For |
|---|---|---|---|
| CoinGecko | REST API | 20s (configurable) | Broad live price anchor across major assets |
| Birdeye | REST API | 20s (configurable) | Chain-native Solana / Solana-ecosystem prices |
| Mock | Internal | Deterministic | Stable demo snapshots with realistic jitter |
Four chains are supported: Solana, Base, Ethereum, and Arbitrum. Venues covered include Jupiter (Solana), Aerodrome (Base), Uniswap V3 (Ethereum / Base), and Camelot (Arbitrum). Assets tracked: SOL, ETH, WBTC.
Feasibility Engine
How OwlSight turns a spread into an expected net profit
A raw price gap between two chains is necessary but not sufficient for a profitable trade. The feasibility engine deducts trading fees, bridge fees, slippage, and a latency penalty from the gross spread to produce an expected net profit.
Bridge cost profiles
| Bridge | Route | Latency | Fee (bps) | Reliability |
|---|---|---|---|---|
| Wormhole | Solana → Ethereum | 240s | 13 | 0.84 |
| Wormhole | Solana → Base | 95s | 10 | 0.93 |
| Wormhole | Solana → Arbitrum | 135s | 11 | 0.90 |
| Across | Base → Ethereum | 75s | 8 | 0.95 |
| Across | Arbitrum → Ethereum | 90s | 9 | 0.92 |
Monte Carlo simulation
For every candidate route, the engine runs 500 simulated execution paths. Each path samples from a slippage distribution (seeded from the route's liquidity depth), applies bridge latency variance, and models price drift over the expected execution window. The output is a profit distribution with three key percentiles:
P10
Pessimistic outcome — 10% of paths are worse than this
P50
Median expected outcome across all simulated paths
P90
Optimistic outcome — 10% of paths are better than this
Confidence score
The confidence score (0–1) is a composite of three factors: the probability that net profit exceeds the minimum threshold (P(profit)), the bridge reliability score for the route's bridge pair, and a slippage penalty that reduces confidence as estimated slippage rises. A score of 0.68 or above is required for approval.
Execution Layer
How approved routes reach Hummingbot
Hummingbot is the executor, not the strategist. OwlSight's adapter converts an approved opportunity into a TradeExecutionRequest — a structured payload that contains everything Hummingbot needs to act, along with guardrail constraints it must respect.
| Mode | Behaviour | Hummingbot required |
|---|---|---|
| mock | Writes request artifact to disk, simulates execution lifecycle locally | No |
| paper_hummingbot | Submits to Hummingbot Gateway at configured URL; falls back to mock | Yes (Gateway) |
| live (future) | Real capital execution via live connector | Yes (live keys) |
The handoff contract
TradeExecutionRequest {
request_id // unique ID written to hummingbot/requests/
opportunity_id // links back to the scored route
asset_symbol // SOL | ETH | WBTC
symbol // trading pair, e.g. "SOL-USDT"
side // "buy_then_bridge_then_sell"
source_chain // where the buy happens
source_venue // DEX on source chain
destination_chain // where the sell happens
destination_venue // DEX on destination chain
bridge_name // Wormhole | Across
notional_usd // trade size in USD
asset_amount // asset quantity
paper_trade // always true in current deployment
guardrails {
max_slippage_bps // hard cap on acceptable slippage
min_net_profit_usd // reject if expected profit below this
min_confidence_score // reject if confidence below this
}
}Safety & Guardrails
Hard filters that protect capital and maintain demo integrity
Three mandatory guardrails are evaluated before any route reaches the execution adapter. A route that fails any single guardrail is marked rejected— it appears in the UI with a rejection reason but is never submitted to Hummingbot.
| Guardrail | Default | What it prevents |
|---|---|---|
| Minimum confidence score | 0.68 | Statistically weak or high-variance routes |
| Minimum net profit | $75 USD | Trades where costs consume the opportunity |
| Maximum slippage | Route bps + 4 buffer | Execution that exceeds liquidity depth |
Paper-trade-first policy
All executions in the current deployment use binance_paper_trade as the Hummingbot connector. This means no real capital is ever at risk. The full execution stack — intent, simulation, decision, handoff — runs as a credible, safe demonstration of what live trading would look like.
The configuration flag HUMMINGBOT_PAPER_TRADE=true must be set for execution to proceed. The backend refuses to submit to a live connector unless paper-trade mode is explicitly disabled by an operator.
Dashboard & History
Persistent record of every simulation and execution run
OwlSight persists every execution automatically. When a trade reaches a terminal state — approved, rejected, or fallback — the frontend saves both the opportunity snapshot and the execution record to a local database via Prisma. No backend changes are required; the Next.js layer handles all persistence.
Auto-save on execution
The runtime hook monitors execution state. The moment terminal: true is received from the backend, two records are written:
| Record | Trigger | What is stored |
|---|---|---|
| SavedSimulation | Execution becomes terminal | Asset, route, confidence, P&L, Monte Carlo result, cost breakdown |
| ExecutionRecord | Execution becomes terminal | Execution ID, mode, status, timeline events, fallback reason |
savedExecutionIds) prevents the same execution from being written twice if polling briefly fires after terminal state is reached.Bookmarking from Mission Control
In addition to auto-save, traders can bookmark any opportunity card manually using the Save Simulation button in the right panel. The button confirms with a green checkmark and the simulation appears immediately in the Simulation Library.
Dashboard overview
The dashboard at /dashboard renders a command-center summary:
| Widget | Description |
|---|---|
| Hero stats bar | Total simulations saved, executions run, approval rate, estimated net P&L |
| Recent Executions | Last 5 records with asset, route, P&L (color-coded), status badge, and relative timestamp |
| Pinned Simulations | Up to 3 pinned route cards for quick comparison |
| Quick Actions | Direct links: Mission Control, History, Simulations, Wallets, Settings |
Execution History
The full history at /dashboard/history provides a filterable table with progressive disclosure — rows are collapsed by default. Clicking any row expands a detail panel showing the full timeline, cost breakdown, and rejection or fallback reason.
Filters are all client-side for instant feedback: status (completed / rejected / fallback), asset symbol, date range, and sort order. An Export CSV button downloads the visible rows as owlsight-executions.csv for tax or P&L analysis.
Simulation Library
The library at /dashboard/simulations shows all saved route snapshots as cards. Each card shows a confidence bar, color-coded net P&L, slippage, fees, bridge latency, and approval status.
| Feature | Behaviour |
|---|---|
| Pin / unpin | Marks a simulation as pinned; pinned cards appear in the dashboard overview |
| Notes | Free-text annotation saved on blur via PATCH /api/simulations/[id] |
| Delete | Removes the card with a confirmation prompt; cascades to linked execution records |
| Export CSV | Downloads all visible simulations as owlsight-simulations.csv |
