NightshadeDocs

Trade

Three ways to trade

The Public Book, the Private Book and the Dark Pool side by side.

Nightshade gives you three places to trade the same tokens. They differ in what someone watching the chain can learn about you.

Side by side

Public BookPrivate BookDark Pool
You tradePublic tokens (NIGHT, SHADE…)Private twins (sNIGHT, sSHADE…)Private twins
Who tradedVisible: tokens move to and from your Midnight addressHiddenHidden
Prices, amounts, the bookPublicPublicHidden on chain; Nightshade's operator sees each order
How orders fillOn chain, against the bookOn chain, against the bookThe operator's keeper fills your order at the public book's price
Partial fillsYesYesNo: each order, or each lot of a split order, fills whole
What you trustMidnight and the contractMidnight and the contractAlso the operator, to fill your order on time
Fee0.2% taker, 0 maker0.2% taker, 0 maker0.3% on top of the book's price and fee

Public Book

The order book everyone sees, with swaps, a queue for busy markets, limit orders, stops and auto-flip liquidity. Your orders and pool shares are kept under a key made from a secret only your wallet knows, not under your address, but the tokens you pay in and take out come from and go to your Midnight address. Treat what you do here as public.

Private Book

The same book engine, over private twins. Tokens go in as private coins and come out as new private coins to your wallet, and your orders carry a key that nothing links to your wallet. Anyone can see the book, its prices and every trade's size, but not whose trade it was. The Private Book.

Dark Pool

You send an order (give this much, get at least that much) to Nightshade's Dark Pool as a proved private offer. The pool's keeper fills it from its own private tokens as soon as your price is at least as good as the public book's plus the pool's fee. The chain shows a private transaction, with no tokens, amounts or parties. Nightshade's operator sees your order's terms, and decides when to fill, but can't change them. The Dark Pool.

Moving between them

The Shield turns a public token into its private twin and back, one for one, at any time. That step is public: the chain shows the address and amount going in or out. To keep a trade private, shield ahead of time, trade privately, and don't unshield the exact amount you just shielded.

Two private wallets can also trade directly with a private swap link, with no book or pool involved.

Private trading is still being finished. It comes to the Preview testnet first, and opens on mainnet after its audit.