Midway

Getting started

What Midway is

A dark pool for block trades in xStocks on Solana. Orders are sealed to an Arcium MXE and cross only at the Pyth midpoint.

Midway is a dark pool for tokenized stocks on Solana. You trade xStocks against USDC from a vault, your order's terms are encrypted before they leave your browser, and orders cross only at the Pyth midpoint. A fill moves no price: the price is the mid at that moment, whatever the size.

FundUSDC or stock inSealsix terms encryptedResthidden in the bookCrossat the Pyth midSettlebetween vaultsFundUSDC or stock inSealsix terms encryptedResthidden in the bookCrossat the Pyth midSettlebetween vaults

How a trade works#

  1. Fund your vault. Deposit USDC to buy, or the stock to sell. The vault is a balance the settlement program holds for your wallet.
  2. Seal an order. Set the side, size, limit, smallest fill you'll take, expiry and session. Your browser encrypts all six to the Arcium MXE, and your wallet signs the submission.
  3. It rests, hidden. The encrypted book admits it. On chain it looks like every other order: a position that is taken, with no size.
  4. It crosses at the mid. Each matching round takes the current Pyth midpoint and crosses buys priced at or above it with sells priced at or below it, oldest first, within everyone's limit and minimum fill.
  5. The fill settles on Solana. The settlement program moves USDC and stock between the two vaults at the midpoint and records the fill.

What you'll find here#

  • Getting started walks through connecting a wallet, funding the vault and sealing a first order.
  • Concepts explains how crossing works, what stays private, and how fees and settlement are computed.
  • Guides cover reading your remaining size, cancelling, and resuming a transaction you signed.
  • Reference lists the parameters, program accounts, messages and HTTP API.