# Orb testnet configuration

> Current status reviewed September 29, 2026. See [the release index](README.md) for shipped versus planned features, network, wallet signing and deployment boundaries. Older dated experiments below are retained as history.

The Web3 preview is pinned to Monad testnet **10143**. Privy defaults to this network and lists no mainnet chain. Native/ERC-20 transfers, NFT ownership reads, wallet receipt validation, game metadata and the Arena use the testnet. Signing code rejects a mainnet preparation or receipt. Mainnet RPC is not a fallback.

- RPC: https://testnet-rpc.monad.xyz
- Explorer: https://testnet.monadscan.com
- Faucet: https://faucet.monad.xyz — test MON only
- Tokens: ORB `0x439D1DA1a1A1cf438EcDABbb29c1412E7250a9F0`; MON; USDC `0x534b2f3a21130d7a60830c2df862319e593943a3`; WMON `0xfb8bf4c1cc7a94c73d209a149ea2abea852bc541`; Perpl collateral AUSD `0xa9012a055bd4e0edff8ce09f960291c09d5322dc`.
- Perpetuals: market ids and venue minimums are read from Perpl's `/v1/pub/context`. The exchange and AUSD collateral addresses, symbol and decimals are pinned to reviewed testnet values; if the venue changes them, trading stops pending review. Opening an account currently needs 100 AUSD.

The token contracts and metadata were checked read-only on chain 10143. Perpl's AUSD collateral is a different asset from the USDC above. Do not send mainnet MON or tokens for this preview.

## What still gates the venue

Perpetual trading runs on Perpl's testnet instance. The user still needs:

1. At least the venue minimum of test AUSD and test MON for onchain gas. Orb Wallet can request AUSD from the existing testnet faucet, subject to the faucet's own cooldown.
2. An onchain Perpl account and an enrolled Ed25519 `trade` key. The private half is generated in and never leaves that browser tab; revoking keys happens in Perpl's app (`https://testnet.perpl.xyz`). Orb's backend forwards the signed enrollment without a browser `Origin` header.

Kuru Spot has returned through the reviewed testnet MON/USDC orderbook integration. It does not use the retired mainnet Flow quote path, and importing a token does not make it supported by this market. The old reserved-order keeper remains retired. Price alerts are **alert-only** — the server monitor evaluates conditions and the user places the order, including take profit and stop loss, which Perpl supports natively as trigger orders. The monitor prices from Perpl's own marks; an address the venue cannot price reports `price_unavailable` instead of borrowing a mainnet reference number.

Mainnet prices are never substituted for testnet ones. Manual NFT contract/token ownership checks use testnet RPC; automatic NFT discovery depends on the configured indexer supporting this network. The assistant uses the configured free OpenRouter route; HUNYUAN_* configuration names are retained. Inference still depends on valid server-only credentials and provider availability. It is also metered per wallet per day: beyond the free daily allowance an active Holder Pro licence is required, and without one the request is refused with 402.

## Existing data and deployment

Migration `0030_orb_testnet_finance.sql` creates separate `orb_testnet_*` tables for spending-wallet bindings, transfers, swaps, achievements, intents, monitoring, reserved funds and broadcasts. It copies only wallet account bindings, with chain 10143; it never relabels mainnet transactions or migrates assets. Old tables and records remain unchanged. Browser recovery keys and token pins are also namespaced with 10143. People, login identities and conversations are preserved.

Apply migrations before starting the updated web process/worker. The local preview uses the isolated file database and port 3112 via `npm run dev:arena`. Tables left over from the retired automatic orders (`orb_testnet_reserved_orders`, `orb_testnet_order_broadcasts`, `orb_testnet_order_keeper_lock`) hold historical records only; no code reads or signs through them.

Sources: [Monad token list](https://github.com/monad-crypto/token-list/blob/main/tokenlist-testnet.json), Perpl testnet API `https://testnet.perpl.xyz/api/v1/pub/context`.

## Perpl trading socket

The Perpl testnet trading WebSocket currently refuses third-party browser
`Origin` headers (the browser exposes the failed handshake as close code 1006).
The Oracle Caddy configuration in `infra/orb-site.caddy` accepts only WebSocket
upgrades to `/perpl/trading` from the Orb origin or the two local development
origins, strips `Origin` and Orb cookies, and forwards to the pinned Perpl
testnet trading endpoint. Other origins and ordinary HTTP requests receive 403.
The relay does not enroll keys or sign orders: the Ed25519 private key stays in
the browser tab, although the relay necessarily carries the signed sign-in
frame and order frames. For local development, set
`NEXT_PUBLIC_PERPL_WS_RELAY_ORIGIN=https://joinorb.online`.
Production uses its own origin and needs no public environment override.
