Skip to main content

Trading app

The trading app is the main Opshuns UI: permissionless option pairs, short RFQ quote windows, and a CLOB fallback for single calls and puts.

PathWhat it is
/Landing quote box, payoff diagram, pair creator
/vaultsBorrow — coming soon. Borrow against ITM opshuns is not live.
/portfolioHoldings, settled positions, and open book orders. Portfolio
/makersApply as a maker org; owners/managers issue member keys. Market makers
/testnetFaucet for OPMOCK tokens on local / test networks

Settings (gear) include the network picker. Networks come from GET /api/networks.

Quote box

Shared on every strategy: amount, underlying token, expiry (American vs European), and settings (network, premium token, strike/premium slippage).

Strategy picker

Opens a grid of named structures with a live payoff sketch. Strategies and strike fields are documented in Option spreads. Spreads expand into multiple RFQ intents in one quote.

Token picker

  • Listed tokens for the selected chain (whitelist + landing/payment token metadata)
  • Favorites pinned per chain
  • Search by symbol, or paste a 0x address to use an unlisted ERC-20

Premium token is chosen separately in quote settings (GET /api/landing-page-settings default premium tokens, plus payment tokens).

RFQ flow

  1. Resolve the pair (CLOB) for (token0, token1, premiumToken) on the selected network — create it first if needed. CLOB
  2. POST /api/quote (no login). The UI currently requests leg-by-leg offers only.
  3. Join rfq_stream:<stream_token> and rank offers. The UI does not auto-select a maker — you pick one to execute, or leave none selected.
  4. Approve mothership pulls for premium and/or underlying, then call executeIntent with the quote’s directions, taker_salt, takerPermits (allowance and/or Permit2), and referrer (address(0) unless the framed embed set referralAddress).

That path is maker-signed FillMatched. Other on-chain modes (FixedPackage, Dutch auction, Authority): On-chain fill modes. API payloads: Option spread quotes. Maker side: Fill options RFQ quotes.

Manually set a premium (Dutch UI)

After a quote is open, a Manually set a premium panel sits under the offers list (start / end premium; timeout in gear settings, default 300s).

  • No maker offers — the panel is shown open.

  • Maker offers present — the panel is collapsed; expand the header to set a premium range instead of picking a maker.

  • Pick a maker offer → approve / execute as usual (leg-by-leg). Dutch start is disabled while a maker is selected.

  • Leave no maker selected → set the premium range and start Dutch. The wallet EIP-712-signs a DutchFillRequest (this reveals trade side via directions / makerAddressHash) and the app POSTs a new dutch_only quote. Makers then bid both sides; phases are competingexclusiveopen. See Dutch auction API.

Signing confirms a side-reveal warning before the typed-data prompt.

CLOB fallback (singles only)

If the quote window closes with no maker offers, single calls and puts can be listed on the pair book at a premium you set (basis points of size; 1.5 is treated as 1.5% → 150 bps). That path is on-chain against the pair contract, not POST /api/quote. Multi-leg strategies cannot post to the book from the quote box.

Open / claim / withdraw book orders from Portfolio. Related API: Orders & exclusive fills.

Pair creator

Any two ERC-20s plus a premium token can form a market. The landing card checks the factory for an existing pair and, if missing, submits one create transaction.

Discover factory / mothership addresses from GET /api/networks. All legs of a spread must use the same pair address and expiry.

Embed (Framed)

Iframe the quote box from frame.opshuns.com (local: port 3005). Query params, referral fees, sizing, and host-page notes: Embed the quote box (Frame).

Testnet faucet

/testnet mints API-prepopulated OPMOCK tokens (GET /api/payment-tokens plus registry weth / usdc / wbtc / meme keys). Mainnet is blocked. Cap is 10 whole tokens per call on the faucet ERC-20.

Locales

With VITE_MULTILINGUAL enabled, the top bar shows a language switcher (en, es, fr, ja, zh, zh-TW).

Environment banners

Testnet and staging builds can show a persistent banner above the nav:

VariableDefault in templates
VITE_TESTNET_BANNERtrue on testnet hosts
VITE_STAGING_BANNERtrue on staging hosts

When VITE_DEBUG is on, the debug panel can override each banner independently (stored in localStorage). Production leaves both off.