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
| Contract | SDK |
|---|---|
| Directory — pause, caps, launch fee, factory and beacon pointers | sv3.directory |
Factory — creates markets and assigns marketId | sv3.factory |
| Floor policy controller — next eligible floor raise | Manifest controller |
| Upgradeable beacon — shared FloorMarket implementation | Manifest beacon |
| Quoter — optional on-chain quote check | sv3.quote |
| FloorMarket — settlement | sv3.market / sv3.trade |
| MarketToken — 18-decimal AVM with permit | snapshot.tokens.avm |
| USDC — 6-decimal reserve | snapshot.tokens.reserve |
Networks
| Network | Chain ID | Reserve | Addresses |
|---|---|---|---|
| Anvil | 31337 | MockUSDC (6 decimals, permit) | Written by local deploy |
| Base | 8453 | USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | Empty 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
| Actor | Calls |
|---|---|
| Apps and users | Trades, positions, factory create, raiseIfEligible |
| Keepers | The same raiseIfEligible path — no extra role. See Floor keeper |
| Owner / pauser | Upgrades, pause, caps, launch fee |
A pause can halt buys, sells, repayment, surrender, raises, and claims. See Risks & Controls.