Derivatives liquidity protocol. Synthetix v3 is a re-architected core (collateral pools, markets, accounts as NFTs) deployed on Ethereum, Optimism, Arbitrum and Base; Perps v3 (Andromeda) on Base provides USDC-margined perps. The legacy v2x perps still run on Optimism.
- 01perps frontends with deep on-chain liquidity
- 02building markets on Synthetix collateral pools (v3)
- 03integrators using v2x sUSD-margined perps on Optimism
- 04structured products on top of v3 vaults
- 05spot synth swaps via Atomic / Wrapper
- pnpm add @synthetixio/v3-contracts viem
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_SNX_NETWORK | Client | `base`, `optimism`, `arbitrum`, or `mainnet`. Each has different deployments and markets. |
| PYTH_PRICE_SERVICE_URL | Client | Pyth Hermes endpoint (e.g. https://hermes.pyth.network) — Perps v3 requires an off-chain price update bundled with order settlement. |
Use viem with the v3 ABIs from `@synthetixio/v3-contracts`. Account creation: `CoreProxy.createAccount(accountId)` mints an account NFT. For Perps v3 on Base, deposit collateral via `PerpsMarketProxy.modifyCollateral(accountId, synthMarketId, amount)`, then atomically `commitOrder({ marketId, accountId, sizeDelta, settlementStrategyId, acceptablePrice, trackingCode })`. After the commitment delay, a keeper (or you) calls `settleOrder(accountId)` with a fresh Pyth `priceUpdateData` payload from Hermes. v2x integrators on Optimism use `PerpsV2MarketData` and `PerpsV2Market.submitOffchainDelayedOrder`.
- ⚑Accounts are NFTs in v3 — transferring the NFT transfers the entire margin and open positions. Treat `accountId` as a sensitive asset and never let users approve `setApprovalForAll` to untrusted contracts.
- ⚑Perps v3 settlement is a two-step (commit → settle) flow gated by a settlement strategy delay (typically 2-15 seconds) and requires a Pyth `updatePriceFeeds` call — pulling stale prices reverts settlement. Bundle Hermes data with the settle tx or run a keeper.
- ⚑Synthetix v3 (core protocol) and Synthetix v2x (legacy SNX/sUSD perps on Optimism) are separate codebases. Don't mix v2x `PerpsV2Market` calls with v3 `PerpsMarketProxy` — they use different market IDs, different collateral, and different fee models.
- ⚑Liquidations are open and pay a flat fee + share of remaining margin. Health factor uses initial vs maintenance margin per market; oracle deviation thresholds can pause markets.
- ⚑Funding is continuous (per-second velocity model) — `currentFundingRate` is a velocity, not a rate. Use `fundingRate(marketId)` to read the instantaneous rate or `accruedFunding(accountId, marketId)` for what's owed.
- ⚑Tracking codes (`bytes32 trackingCode`) earn integrator fee rebates — register one with the SC Pool to receive a share of fees from orders you route.