Documentation
How OccPerps works
A plain-language guide to the product as it is built today. Where something is an estimate, unverified or unavailable, this page says so.
What OccPerps is
OccPerps is a trading interface for perpetual futures on Solana. It shows markets, prepares orders, and lets you manage positions from one desk. Orders execute on the venue named on each market: Velocity, a cross-margined perpetuals protocol on Solana, or Pacifica, a perpetuals exchange on Solana with an off-chain order book and deposits held by an on-chain program (how Pacifica differs). OccPerps is not an exchange: it runs no liquidity, order matching or price oracle of its own, it does not route or split orders between venues, and it never takes custody of funds. Each venue keeps its own account, collateral and positions for your wallet.
Velocity is a fork of the Drift v2 codebase, deployed as a separate program with its own accounts and its own SDK (Drift’s documentation address now leads to Velocity’s, and the Drift program is paused). OccPerps integrates it through the official @velocity-exchange/sdk and Velocity’s public data services. Program ID: vELoC1audYbSYVRXn1vPaV8Axoa9oU6BYmNGZZBDZ1P.
Network selection
A deployment of OccPerps targets one network, chosen when it is built. This one targets Solana Mainnet. The network is shown in the header of every application page. The server checks the genesis hash of its Solana RPC endpoint, so a mainnet build cannot silently talk to devnet or the reverse.
- Mainnet: full market data, charts, order book and history. Collateral is USDT (or SOL).
- Devnet: markets and accounts are read from chain. Charts, order book and history are unavailable because Velocity’s data services index mainnet only. Collateral is the dUSDT test token (or devnet SOL).
Wallet connection
Any wallet that supports the Solana Wallet Standard appears in the picker, including Phantom, Solflare and Backpack. Connecting shares your public address so your account can be read. It does not move funds, does not create an account, and does not ask you to sign anything.
- OccPerps never asks for a seed phrase or private key and never stores signing secrets.
- Nothing is signed automatically. Every transaction is shown for review first, then approved or declined in your own wallet.
- Your wallet needs a little SOL to pay Solana network fees, even if your collateral is USDT.
- You can disconnect at any time from the wallet menu.
Venue accounts
Trading on Velocity happens from a Velocity account: an on-chain account owned by your wallet that holds your collateral, positions and open orders. OccPerps uses subaccount 0. If your wallet has no account yet, the first deposit creates it in the same transaction.
Creating the account requires a rent deposit in SOL (roughly 0.03 SOL at the time of writing). Rent is held by Solana for as long as the account exists and is returned if the account is deleted. The exact amount is measured by simulating your transaction and shown in the review before you sign.
Collateral
Collateral is what backs your positions. OccPerps supports depositing and withdrawing the venue’s quote asset (USDT) and SOL.
- USDT counts at 100% of its value. Note that Velocity’s quote asset on mainnet is USDT, not USDC.
- SOL counts at a discount (80% for opening positions at the time of writing), and its value moves with the SOL price, which also moves your margin.
- Deposits in one account back every position in that account. This is cross-margin.
- Withdrawals are limited to free collateral, and OccPerps sends them as reduce-only so a withdrawal can never turn into a borrow.
- The venue can pause deposits or withdrawals, or throttle large withdrawals. When it does, the control is disabled with the reason.
Market data and freshness
Three price types appear in the app, always labelled:
- Oracle price: the external reference price the venue uses for margin, unrealized PnL and liquidation.
- Mark price: the middle of the venue’s current bid and ask.
- Last trade: the price of the most recent fill on the venue.
Statistics, candles and trades come from the Velocity Data API; the order book from the Velocity DLOB server; balances, positions and market parameters from the venue program through a Solana RPC. Volume and open interest are Velocity’s figures for that market, not OccPerps activity. Funding is quoted for the venue’s 1-hour period as a percentage of position notional.
Every panel shows the state of its feed: Live, Loading, Stale, Disconnected, Rate limited, Unavailable or No data, with the age of the data. When a feed stops updating its figures are dimmed and marked stale rather than left looking current, and orders cannot be reviewed against stale market data. Missing values are shown as “Unavailable”; they are never replaced with placeholder numbers. Failed requests are retried with increasing delays.
Orders and fills
Sizes are entered in the base asset (for example SOL) and shown alongside their notional value in USDT. Sizes must match the market’s step size and minimum, which the form checks as you type.
- Market orders run a short price auction on Velocity and fill against makers or the venue’s AMM. You set a slippage limit; the order cannot fill at a price worse than that limit from the estimated fill price shown in the review. Whatever has not filled after about 60 seconds expires.
- Limit orders rest in your account until they fill or you cancel them. Post-only makes the venue reject the order instead of letting it take liquidity.
- Reduce-only orders can shrink a position but never open or flip one.
Before your wallet is asked to sign, the review shows:
- market, direction, order type, size and notional;
- the oracle price, and an estimated fill price for market orders (from Velocity’s own quote service);
- the price protection in force;
- the estimated trading fee and the Solana network fee;
- account leverage before and after, the initial margin the order reserves, and an estimated liquidation price.
The transaction is built by the server with the Velocity SDK and simulated first. If simulation fails, it is not offered for signing. The browser then checks that the transaction is paid for and signed only by your wallet and calls only the expected programs, and the server repeats that check before relaying it.
Lifecycle
An order passes through named states: Review, Wallet approval requested, Declined in wallet, Submitted, Confirmed, Failed, Expired or Status unknown, and then, for the order itself, Open, Partially filled, Filled or Cancelled.
A confirmed transaction does not mean the order filled. Confirmation means the network accepted the instruction that places the order. OccPerps then reads the venue to report what actually filled. If the status of a transaction becomes uncertain (for example the connection dropped while sending), the desk blocks new transactions until that one is resolved or can no longer land, so the same order is not sent twice.
Positions
Each position shows its market, direction, size, entry price, current oracle price, notional, unrealized PnL, unsettled funding and an estimated liquidation price. Reduce and Close send reduce-only market orders in the opposite direction, so they cannot open a position on the other side. Open orders can be cancelled one at a time or all at once.
Stop and take-profit orders are not placed from OccPerps. If your account has trigger orders created elsewhere, they are listed and can be cancelled. A trigger price decides when such an order becomes fillable; it is not a guaranteed execution price.
Fees
- Trading fee: charged by Velocity on the notional that fills, at your account’s fee tier. The review shows the estimate and the rate. Post-only orders that provide liquidity receive a maker rebate instead.
- Network fee: the Solana base fee plus a small priority fee, paid in SOL on every transaction, whether or not an order fills.
- Account rent: a one-time refundable SOL deposit when your Velocity account is created.
- Funding: not a fee to OccPerps or the venue; it is paid between longs and shorts every hour and appears as unsettled funding on each position.
- OccPerps charges no fee of its own in this build.
Margin and liquidation
Velocity accounts are cross-margined. There is no per-position leverage setting: account leverage is your total position notional against the collateral in the account, and every market has its own maximum. Opening a position needs initial margin; keeping it open needs the smaller maintenance margin.
Account health runs from 100 to 0. At 0, collateral no longer covers maintenance margin and the venue can liquidate: it first cancels open orders, then transfers part of your positions to a liquidator at a penalty, until the account is healthy again.
Liquidation prices shown in OccPerps come from the Velocity SDK’s own risk calculation for your whole account at current prices. They are estimates. They change when prices move, when you deposit or withdraw, and when any other position in the account changes. Read the risk guide before using leverage.
Watchlist, alerts and exports
- Favorites are stored in your browser and sort to the top of the market selector.
- Price alerts are stored in your browser and checked against the oracle price while OccPerps is open in a tab. They are not delivered when the app is closed; there is no background service or push notification behind them.
- History (fills, orders, funding, transfers) comes from Velocity’s index of your account, latest 50 records per table, and can be exported as CSV with UTC timestamps, units in the column names and the data source in each row. Realized PnL is not shown because the public history does not provide a figure that could be reproduced reliably.
Pacifica: the second venue
On Solana Mainnet, OccPerps also lists perpetual markets from Pacifica, a perpetuals exchange on Solana with an off-chain order book and deposits held by an on-chain program. It adds markets Velocity does not have, including meme coins and recent listings. The sections above describe Velocity; Pacifica works differently in the ways listed here, and every screen names the venue it is showing.
- Which markets. Only Pacifica’s crypto perpetuals that trade on its order book are listed. Its perpetuals on stocks, indices, commodities and currencies, and its spot market, are left out. If your Pacifica account holds a position in one of those, it is shown in your positions but can only be managed on Pacifica.
- “Memes”, “Majors” and “New listings” are OccPerps’ own labels for finding markets. They are not Pacifica data and say nothing about market capitalisation, which neither venue publishes and OccPerps does not show.
- Data path. Your browser reads Pacifica’s public API and price stream directly, not through the OccPerps server. Pacifica limits requests per IP address, so each visitor uses their own allowance; if it runs out, panels say “Rate limited” and recover within a minute. With a wallet connected, your browser asks Pacifica for that address’s account.
- Deposits. Collateral is USDC. A deposit is a Solana transaction that moves USDC from your wallet into Pacifica’s program (
PCFA5iYgmqK6MqPhWNKg7Yv7auX7VZ4Cx7T1eJyrAMH); Pacifica then credits your account, sometimes after a pending period. The minimum is 10 USDC, and a wallet’s first deposit registers it with Pacifica. From then on the funds are held by Pacifica, not by an account your wallet controls on chain. - Orders are signed messages. A Pacifica order, cancel, leverage change or withdrawal is a short text message your wallet signs. It is not a Solana transaction and costs no network fee. The review shows the exact text, and Pacifica accepts the signature for 60 seconds. The signed request goes from your browser straight to Pacifica; OccPerps’ server never sees it.
- Order types. Market orders carry your slippage limit and are held about 200 ms by Pacifica before matching; what does not fill is cancelled. Limit orders rest on the book; post-only uses Pacifica’s add-liquidity-only mode. Orders have a minimum value (10 USD on most markets). Stop and take-profit orders are not placed from OccPerps.
- Leverage and margin. Pacifica keeps a leverage setting per market, at the market’s maximum until you change it, and reserves notional ÷ leverage as margin. You can change the setting from the order form. Cross margin is the default; OccPerps does not switch a market to isolated margin, but respects the mode already set on your account. Maintenance margin is half of the initial margin at the market’s maximum leverage, and the liquidation price shown is the one Pacifica reports.
- Fees. Pacifica charges its maker or taker fee on what fills (0.015% and 0.040% at the first tier) and 1 USDC per withdrawal. OccPerps adds nothing.
- Withdrawals. A signed request; Pacifica sends the USDC to your wallet. Accounts with two-factor authentication on must withdraw on Pacifica.
- Hardware wallets. Pacifica needs a different signature format for hardware wallets, which OccPerps does not send yet. Such a wallet can read markets and deposit, but its order messages are refused by Pacifica.
- How far this is verified. Market data, account reads and the review are checked against the live service. The message format is checked against Pacifica’s live signature verification with a throwaway key: a correctly signed request passes it and a tampered one is refused. The deposit transaction is built from Pacifica’s published SDK and simulated. No deposit, order or withdrawal with real funds has been completed from this build, so treat the first one as a test and keep it small.
The $OCC token
$OCC is the OccPerps token on Solana. Its contract address is published in one place, the token block on the home page. Right now that block reads CA: SOON: no address has been published, so there is nothing to copy and no placeholder is shown.
- The app does not use it. Trading, collateral, fees and limits on OccPerps are the same with or without $OCC. It gives no fee discount, no share of any revenue and no vote, and OccPerps charges no fee of its own to share.
- An address is checked before it is shown. It is read from Solana mainnet first: it must be an initialized token mint whose on-chain symbol is OCC. What Solana reports for it (token program, supply, whether anyone can still mint or freeze, Token-2022 extensions) is published next to the address, with the time of the read.
- Compare before you use it. An address offered anywhere else should match the one on this site character for character. A token can lose all of its value; nothing here is financial advice.
Feature status
What this build supports on Solana Mainnet, and how each part was checked.
Implemented and verified
| Market discovery and live statistics | Read from the Velocity Data API on mainnet; payloads are schema-validated. Checked against the live service. |
|---|---|
| Historical candles and chart | Velocity candles for six intervals, traded and oracle price series. Checked against the live service. |
| Order book and recent trades | Velocity DLOB server snapshots and Data API trades, polled. Checked against the live service. |
| Pacifica market discovery, live statistics, order book, trades and candles | Crypto perpetuals read by the browser from Pacifica’s public API and price stream; payloads are schema-validated. Checked against the live service. |
| Pacifica account, position, open-order and history reads | Read from Pacifica’s public API by wallet address. Checked against existing mainnet accounts (read-only). |
| Pacifica order review and message format | Reviews are computed from live Pacifica figures for real accounts. A request signed in this format with a throwaway key passes Pacifica’s live signature verification, and a tampered one is refused. |
| Wallet connection | Wallet Standard discovery, connect, disconnect, address copy. Checked in a headless browser with a Wallet Standard test wallet. |
| Account, balance and position reads | Read from chain with the Velocity SDK, including health, leverage and liquidation estimates. Checked against existing mainnet accounts (read-only). |
| Transaction preparation: deposit, account creation, withdrawal, market and limit orders, reduce and close, cancel | Built with the Velocity SDK and simulated on mainnet against real accounts, without signatures. Each one passed simulation. |
| Review, signing guard and decline handling | Checked in a headless browser: review dialog, wallet decline, and a wrongly signed transaction being refused by the relay. |
| Watchlist, local price alerts, CSV export | Unit tests and browser checks. |
| Read-only position lookup for any wallet address | On the home page: positions on both venues for a pasted address, with no wallet connection. Checked in a browser against existing mainnet accounts. |
| $OCC token block | Shows "CA: SOON" and no address until one is published. The publishing script reads the mint from Solana mainnet first and refuses anything that is not an initialized mint with the right on-chain symbol; checked against real mints of both token programs. |
| Stationary camera in the landing scene | Camera matrices compared before and after pointer movement and scrolling, while the environment animates. |
Implemented, awaiting configuration or integration testing
| Signed transaction submission, confirmation and fill reconciliation | Implemented end to end, but no signed transaction has been sent from this build: no funded mainnet order was placed, and the devnet faucet could not be used from the build environment. |
|---|---|
| Pacifica orders, cancels, leverage changes and withdrawals with a funded account | Implemented as wallet-signed messages in Pacifica’s documented format, with decline, refusal and lost-answer handling checked in a headless browser against a stand-in for Pacifica’s answer. No funded order was placed: Pacifica refuses requests from a wallet that has not deposited. |
| Pacifica USDC deposit | Built from Pacifica’s published SDK and simulated on mainnet without a signature. No deposit was sent. |
| Dedicated Solana RPC | Works with a public endpoint out of the box; set SOLANA_RPC_URL for reliable trading. |
| Devnet mode | Markets and accounts are read from chain. Charts, order book and history are unavailable there because the venue indexes mainnet only. Transactions unverified. |
Unsupported
| Stop and take-profit orders | Not placed from OccPerps on either venue. Velocity trigger orders created elsewhere are listed and can be cancelled; Pacifica ones are listed and cancelled on Pacifica. |
|---|---|
| Isolated margin | Velocity accounts are cross-margined. Pacifica supports isolated margin, but OccPerps does not change a market’s margin mode. |
| Pacifica perpetuals on stocks, indices, commodities and currencies; Pacifica spot | Not listed. Only Pacifica’s order-book crypto perpetuals are offered. |
| Pacifica orders from hardware wallets | Pacifica needs a different signature format for them, which is not sent yet. |
| Pacifica on devnet | Pacifica is integrated on mainnet only. |
| $OCC utility in the app | None. The interface does not read the token: no fee discount, revenue share, staking or governance. |
| Market capitalisation | Neither venue publishes it, so it is not shown. “Memes” and “New listings” are OccPerps’ own labels. |
| Multiple subaccounts | Only subaccount 0 is read and traded. |
| Gasless signed orders (Swift) | Every order is an on-chain transaction you sign. |
| Manual PnL settlement | Left to the venue’s keepers. |
| Collateral other than the quote asset and SOL | Other balances in an account are shown but cannot be deposited or withdrawn here. |
| Background or push price alerts | Alerts run only while the app is open in a browser tab. |
| Venue aggregation | Two venue adapters (Velocity and Pacifica), shown side by side. Orders are never routed or split across venues, and collateral is separate. |
Velocity capabilities on this network
- AvailableMarket ordersMarket orders run a short price auction on Velocity and fill against makers or the AMM.
- AvailableLimit ordersLimit orders rest in your Velocity account until they fill or you cancel them.
- AvailablePost-onlyPost-only limit orders are rejected instead of taking liquidity.
- AvailableReduce-onlyReduce-only orders can shrink a position but never open or flip one.
- Not availableStop / take-profit ordersStop and take-profit orders exist on Velocity as trigger orders. OccPerps does not place them yet; trigger orders created elsewhere are listed here and can be cancelled.
- AvailableOrder cancellationCancel a single order or every open order in one transaction.
- AvailablePosition reduction and closureClosing sends a reduce-only market order for the position size, so it cannot open the opposite side.
- AvailableDepositsDeposits move tokens from your wallet into your Velocity account. The first deposit also creates the account.
- AvailableWithdrawalsWithdrawals are limited to free collateral and never create a borrow.
- AvailableOrder bookAggregated book from the Velocity DLOB server.
- AvailableHistorical candlesServed by the Velocity Data API.
- AvailableFill and order historyServed by the Velocity Data API.
- AvailableDeposit and withdrawal historyServed by the Velocity Data API.
- Not availableIsolated marginVelocity accounts are cross-margined. Isolated positions are not enabled in the deployed program.
- Not availablePer-market leverage settingThere is no per-position leverage setting. Leverage is the result of your position size against the collateral in the whole account.
- Not availableGasless signed ordersOff-chain signed orders (Swift) are not used. Every order is a transaction you sign.
- Not availableMultiple subaccountsOccPerps reads and trades subaccount 0 only.
- Not availableManual PnL settlementSettling profit and loss into the token balance is left to the venue’s keepers; OccPerps does not send settle transactions.
Pacifica capabilities on this network
- AvailableMarket ordersMarket orders match against the Pacifica order book within the slippage limit you set. Pacifica delays market orders by about 200 ms.
- AvailableLimit ordersLimit orders rest on the Pacifica order book until they fill or you cancel them.
- AvailablePost-onlyPost-only orders use Pacifica’s add-liquidity-only time in force and are rejected instead of taking liquidity.
- AvailableReduce-onlyReduce-only orders can shrink a position but never open or flip one.
- Not availableStop / take-profit ordersPacifica supports stop and take-profit orders. OccPerps does not place them yet; ones created elsewhere are listed here, and are cancelled on Pacifica.
- AvailableOrder cancellationCancel a single order or every open order with one signed request.
- AvailablePosition reduction and closureClosing sends a reduce-only market order for the position size, so it cannot open the opposite side.
- AvailableDepositsDeposits move USDC from your wallet into Pacifica’s on-chain program. A first deposit registers the wallet with Pacifica. The minimum is 10 USDC.
- AvailableWithdrawalsWithdrawals are a signed request. Pacifica sends the USDC to your wallet and charges a 1 USDC fee.
- AvailableOrder bookTop ten levels per side from Pacifica, streamed.
- AvailableHistorical candlesPacifica trade candles for six intervals.
- AvailableFill and order historyServed by the Pacifica API.
- AvailableDeposit and withdrawal historyServed by the Pacifica API.
- Not availableIsolated marginPacifica supports isolated margin per market. OccPerps does not change the margin mode: orders use the mode already set on your Pacifica account, which is cross margin by default.
- AvailablePer-market leverage settingPacifica keeps a leverage setting per market, at the market maximum until you change it. It can be changed here.
- AvailableGasless signed ordersEvery Pacifica order is a text message you sign in your wallet. It is not a Solana transaction and costs no network fee.
- Not availableMultiple subaccountsOccPerps reads and trades the main Pacifica account of the connected wallet only.
- Not availableManual PnL settlementNot needed: Pacifica settles profit and loss into the account balance itself.
Third-party notices
- Charts use TradingView Lightweight Charts (Apache 2.0). The TradingView attribution mark on each chart is part of that licence.
- Venue integration uses
@velocity-exchange/sdk(Apache 2.0) and the public Velocity Data API and DLOB server, and Pacifica’s public REST API and websocket. The Pacifica deposit instruction follows Pacifica’s published Python SDK. - Wallet connection uses the Solana wallet-adapter packages (Apache 2.0). Typefaces: Bricolage Grotesque and Geist (SIL Open Font License).
- The Occ City scene is original procedural geometry built for OccPerps; it contains no third-party models or textures.