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.
| Path | What it is |
|---|---|
/ | Landing quote box, payoff diagram, pair creator |
/borrow | Borrow: coming soon. Borrow against ITM opshuns is not live. Planned protocol rates: Borrow fees |
/vaults | Vaults: coming soon. Lender vaults for funding Borrow RFQs are not live. |
/portfolio | One table of buy, sell, claim, order, and settled rows. Portfolio |
/explore | Inspect discovered CLOB triplets: outstanding book depth, fills, and posted activity by timeframe (SIWE required: Explore auth) |
/loan-explorer | Loan analytics: at-risk positions, recent openings, activity chart (SIWE required, not in nav. Explore auth) |
/trade | Advanced trade terminal (SIWE required in the UI; RFQ quote create on the API remains public) |
/makers | Apply as a maker org; owners/managers issue member keys. Market makers |
/testnet | Faucet for OPMOCK tokens on local / test networks |
Settings (gear) include the network picker. Networks come from GET /api/networks.
Query parameters
/ and /trade accept the same URL flags as the framed embed (useful for deep links and demos):
| Param | Default on app | Effect |
|---|---|---|
referralAddress | none | Credited as referrer on fills from this page. |
side | buy | buy or sell. Alias: buySell. |
type | call | call or put. Aliases: optionType, callPut. |
strategy | single | Initial option structure. Alias: optionStrategy. |
expiry | next suggested week | YYYY-MM-DD, YYYY-MM-DDTHH:mm, or unix seconds. Aliases: expiration, expiryDate. |
amount | empty | Prefills size (underlying units). Aliases: quantity, size. When set, Quote stays disabled longer before it arms. |
strike | empty | Primary strike for the strategy (strikePrice alias); or named putStrike / callStrike / …; or strikes=a,b,c in strategy order. |
underlying | all listed | Symbols/addresses for the underlying picker. Alias: underlyingTokens. |
quote | all listed | Pair quote picker. Aliases: quoteTokens, pairQuote. |
premium | all payment / listed | Premium picker. Alias: premiumTokens. |
showPayoffDiagram | true | false hides the side payoff diagram. (Frame default is false.) |
tooltips | true | false hides hover help on the quote flow. |
lang | browser / English | UI language. Alias: locale. |
Token filters: comma-separated symbols or 0x addresses; first value is the default. How-to: Restrict which tokens appear.
https://opshuns.com/?underlying=WETH"e=USDC&premium=USDC
https://opshuns.com/trade?side=sell&type=put&strategy=single
https://opshuns.com/trade?expiry=2026-12-31&strike=3500&type=call
https://opshuns.com/trade?amount=2&strike=3500&type=call
https://opshuns.com/trade?strategy=strangle&referralAddress=0xYOURADDRESS
https://opshuns.com/?lang=de&showPayoffDiagram=false
Quote box
Shared on every strategy: amount, underlying token, expiry (American vs European), and settings (network, premium token).
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
0xaddress 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). Gear Premium mode: Same as quote (default), Same as underlying, or Manual (toolbar pick). How ratios become a token amount: Premium ratio.
RFQ flow
- Resolve the pair (CLOB) for
(token0, token1, premiumToken)on the selected network: create it first if needed. CLOB POST /api/quote(no login). Standard quotes are package-only: makers sign a fixedpackage_premium.referreron that body (defaultaddress(0); hosts pass?referralAddress=) is hashed intotaker_address_hash.- 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. - Approve mothership pulls for the package premium and/or underlying plus the live protocol fee (maker half-rate when the maker pays that leg) and referral. Then settle the package with the quote’s
directions,taker_salt, and the samereferrer. Fee table: Fees.
Gear Approval method: Auto (default) uses Permit2 when your wallet already approved the canonical Permit2 contract for every pull token; otherwise it asks for a direct mothership ERC-20 approval. Permit2 always uses signature pulls after a one-time Permit2 approval. Direct approval always approves the mothership.
That path is a maker-signed FixedPackage (executeFixedPackageIntent): one absolute package premium, then zero-premium fillMatched on each leg. Dutch and Authority use other entrypoints: On-chain fill modes.
API payloads: Option spread quotes. Maker side: Fill options RFQ quotes. Bots / scripts: TypeScript SDK.
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 the package. 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 viadirections/makerAddressHash) and the appPOSTs a newdutch_onlyquote. Makers then bid both sides; phases arecompeting→exclusive→open. 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 (entered as a percent of size in the UI, encoded as a premium tick on-chain). See Premium ratio. 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 or the Open orders tab on /trade. Click a row for payoff, pair key, and on-chain details. Withdraw calls mothership claimBuy / claimSell to refund the unmatched deposit. Maker-post on that rest is not returned. 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:
| Variable | Default in templates |
|---|---|
VITE_TESTNET_BANNER | true on testnet hosts |
VITE_STAGING_BANNER | true on staging hosts |
When VITE_DEBUG is on, the debug panel can override each banner independently (stored in localStorage). Production leaves both off.