Juice Integration

DAEMON integrates Juice as a market-making operator cockpit for MM wallets, balances, PNL, scouting reports, mint crowding checks, strategy previews, and guarded execution.

DAEMON treats Juice as infrastructure plus an operator workflow, not just an API connection. The goal is to let builders inspect, understand, preview, and approve Juice actions from one Solana-native workspace.

What the integration adds#

The Juice integration gives DAEMON a dedicated control surface for market-making workflows. Users can add their JUICE_API_KEY, load MM wallet state, inspect wallet balances and PNL, review scouting reports, check mint crowding, and model what Juice might do next before any money-moving action is approved.

Operator cockpit

A dedicated Juice panel for API key setup, wallet status, PNL, balances, scouts, crowding data, strategy previews, and guarded execution controls.

Main-process safety

Juice API calls live in Electron services and are routed through DAEMON's typed IPC/engine boundary instead of being called directly from the renderer.

API key setup#

Users paste their Juice API key directly into the Juice cockpit. DAEMON validates the key with a read-only Juice wallet request, then stores it through DAEMON's secure key system.

  • The key name is JUICE_API_KEY.
  • The key is validated before being saved.
  • The key can be removed from the Juice panel.
  • The renderer never needs to hold the key after setup.
Key setup flow
User pastes JUICE_API_KEY
  -> DAEMON validates through JuiceService.storeJuiceKey()
  -> JuiceService calls GET /api/mm-api/tokens
  -> SecureKeyService stores JUICE_API_KEY
  -> Juice cockpit unlocks read-only dashboard actions

Read-only dashboard#

The first layer of the integration is a read-only dashboard. It lets a builder see the state of their Juice MM operation without triggering any trades or wallet changes.

SurfaceWhat DAEMON showsJuice source
MM walletsWallet public key, active/idle state, assigned mint, SL/TP values, deactivation stateGET /tokens
BalancesSOL balance and token balances for each Juice walletGET /tokens/:id/balances
PNLTotal, realized, and unrealized PNL per walletGET /tokens/:id/pnl
Scouting reportToken candidates, grades, scores, liquidity, market cap, and price actionGET /scouting-report
Mint inspectionCrowding level, MM wallet count, total position, liquidity, and position/liquidity ratioGET /mints/:mint

Strategy preview#

DAEMON includes a backend strategy preview service. This service asks Juice for wallets, PNL, scouting reports, and mint crowding data, then returns a read-only model of what might be worth looking at next.

  • Sell candidates: active wallets whose PNL is at or above the user-defined target.
  • Entry candidates: scouted tokens that pass the crowding filter.
  • Skipped candidates: tokens rejected because mint details are unavailable or crowding is too high.
  • No buy, sell, or wallet-edit action is executed by the preview service.
Strategy preview model
Input:
  targetPnlUsd: number
  maxCrowdLevel: number
  scoutLimit: number

Output:
  sellCandidates[]
  entryCandidates[]
  skipped[]
  generatedAt

Guarded execution#

DAEMON now has the backend foundation for Juice write and transaction actions, but they are guarded. This means no action that can move funds or change MM behavior can run silently.

Guarded execution is intentionally stricter than normal read-only API calls. The UI requires the user to acknowledge impact, arm the action, and execute within a short confirmation window. The backend enforces the same rules.
ActionStatusGuardrails
BuyBackend + UI guarded controlsRequires acknowledgedImpact and fresh confirmedAt
Sell allBackend + UI guarded controlsRequires output mint, acknowledgedImpact, and fresh confirmedAt
Edit walletBackend + UI guarded controlsRequires wallet id, acknowledgedImpact, and fresh confirmedAt
Create walletBackend support onlyRequires private-key acknowledgement before execution

Confirmation window

Every guarded action requires a fresh confirmation timestamp. DAEMON's backend rejects the action if confirmation is missing, stale, or if the user did not explicitly acknowledge impact.

Guard requirements
acknowledgedImpact: true
confirmedAt: Date.now()
confirmation TTL: 60 seconds

If the confirmation expires:
  -> action is rejected
  -> user must review and arm again

How it is wired#

The integration is split across DAEMON's main process, IPC/engine bridge, and renderer cockpit. Juice API calls stay in Electron services. The renderer talks to those services through DAEMON's existing engine bridge.

Integration file map
electron/services/JuiceService.ts
  API key validation
  read-only wallet, balance, PNL, scout, mint calls
  guarded create/edit/buy/sell-all methods

electron/services/JuiceStrategyPreviewService.ts
  read-only strategy preview model

electron/ipc/engine.ts
  engine routes for juice:* actions

src/panels/JuicePanel/JuicePanel.tsx
  Juice cockpit UI

src/panels/IntegrationCommandCenter/registry.ts
  Juice integration card

src/panels/SolanaToolbox/catalog.ts
  Juice protocol entry

Engine actions#

Engine actionPurpose
juice:has-keyCheck whether JUICE_API_KEY is configured
juice:store-keyValidate and store a Juice API key
juice:delete-keyRemove the stored Juice API key
juice:list-walletsLoad Juice MM wallets
juice:get-balancesLoad balances for a Juice wallet
juice:get-pnlLoad PNL for a Juice wallet
juice:get-mint-detailsInspect mint crowding and position data
juice:get-scouting-reportLoad Juice scouting reports
juice:strategy-previewBuild the read-only next-action model
juice:buyGuarded buy execution
juice:sell-allGuarded sell-all execution
juice:edit-walletGuarded MM wallet update
juice:create-walletGuarded create-wallet backend path

Safety model#

DAEMON is designed so agents and UI surfaces can assist the operator without silently moving funds. Juice execution is treated as high-impact and must pass a backend guard before it can run.

  • Read-only actions can load data without confirmation.
  • Write and transaction actions require acknowledgement and fresh confirmation.
  • Confirmation expires after 60 seconds.
  • Create-wallet requires private-key handling acknowledgement.
  • The UI explains that actions may move funds, change MM behavior, or execute real on-chain transactions.

Current status#

The Juice integration is currently implemented on a DAEMON feature branch and is being reviewed as a draft PR. The core cockpit, read-only data flow, strategy preview, and guarded execution foundation are in place.

  • Read-only cockpit: implemented
  • API key setup: implemented
  • Mint crowding inspection: implemented
  • Strategy preview: implemented
  • Guarded buy/sell/edit controls: implemented
  • Create-wallet backend: implemented, UI intentionally held until private-key UX is finalized
  • Build/typecheck and live Juice key testing: still required before production merge