SV3 logo

Deployments

How an SV3 deployment is laid out on a chain, and how the SDK is pointed at it.

Each chain has one SV3 control plane. Markets are created later. They share one beacon implementation and keep their own USDC reserve.

Base proxy addresses are filled at public release. Until then you pass a deployment manifest into createSv3Client — local Anvil writes those addresses when you deploy.

Layout

One chain, one Directory, many markets. Curve math is compiled into FloorMarket. There is no live curve-engine contract to call.

The quoter cannot move funds. Directory does not store the controller or quoter — those addresses come from the deployment manifest you pass the SDK.

Components

ContractSDK
Directory — pause, caps, launch fee, factory and beacon pointerssv3.directory
Factory — creates markets and assigns marketIdsv3.factory
Floor policy controller — next eligible floor raiseManifest controller
Upgradeable beacon — shared FloorMarket implementationManifest beacon
Quoter — optional on-chain quote checksv3.quote
FloorMarket — settlementsv3.market / sv3.trade
MarketToken — 18-decimal AVM with permitsnapshot.tokens.avm
USDC — 6-decimal reservesnapshot.tokens.reserve

Networks

NetworkChain IDReserveAddresses
Anvil31337MockUSDC (6 decimals, permit)Written by local deploy
Base8453USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Empty until release

The SDK accepts only 8453 and 31337. Any other chainId throws UnsupportedChainError.

Point the SDK at a chain

Spread the chain fixture from @repo/chain-config, then fill the proxy addresses your deploy printed.

import { createSv3Client } from "@repo/contract-client";
import { ANVIL_CHAIN_ID, ANVIL_DEPLOYMENT_MANIFEST } from "@repo/chain-config";

const sv3 = createSv3Client({
  publicClient,
  chainId: ANVIL_CHAIN_ID,
  deployment: {
    ...ANVIL_DEPLOYMENT_MANIFEST,
    contracts: {
      directoryProxy: "0x…",
      factoryProxy: "0x…",
      marketBeacon: "0x…",
      marketImplementation: "0x…",
      floorPolicyControllerProxy: "0x…",
      floorMarketQuoter: "0x…",
    },
  },
});

createSv3Client also reads deployment.curveLibrary (kind, revision, sourceHash). Unknown revisions throw instead of silently reusing v1 math. Full parameter list: createSv3Client.

Market identity

marketId = keccak256(abi.encode(chainId, factory, sequence))

The factory assigns sequence. Creators never pass an ID or CREATE2 salt. predictMarketAddress can race. The confirmed MarketCreated event is source of truth.

Who may call what

ActorCalls
Apps and usersTrades, positions, factory create, raiseIfEligible
KeepersThe same raiseIfEligible path — no extra role. See Floor keeper
Owner / pauserUpgrades, pause, caps, launch fee

A pause can halt buys, sells, repayment, surrender, raises, and claims. See Risks & Controls.