Concepts
Important: xDAI as secondary only applies to the sDAI profile on Gnosis. A site using s-gCRC has no xDAI secondary — users split/merge/redeem with s-gCRC only.
SDK registry and helpers
Gnosis (chain 100) — registered profiles
Other chains keep one profile each (sDAI on mainnet, sUSDS on Base/Optimism, etc.) — see
getCollateralProfiles in the SDK.
Configure active profile (frontend / site build only)
Optional. If omitted, the site uses thedefault profile (sDAI on Gnosis):
configureCollateral throws if the name is unknown (e.g. configureCollateral("bogus")).
Call it once at app startup, before Seer UI or portfolio hooks. Sites that use default (e.g. app.seer.pm with sDAI on Gnosis) do not need to call it at all.
How you wire the profile name in your build (hardcoded, env var, etc.) is up to each frontend — the SDK only exposes configureCollateral(name).
Do not call configureCollateral in the shared Netlify backend. One backend instance serves multiple frontends (app.seer.pm, white-label sites, etc.).
Helpers (typical usage)
Per-market vs site collateral
- Trading / pools: Use the market’s
collateralTokenon-chain; for UI metadata usegetActivePrimaryCollateral(chainId)/getActiveCollateralProfile(chainId)until per-market resolution is needed. - Site chrome (header balance, portfolio totals, bridge destination): Use
getActiveCollateralProfile(chainId). - Conditional markets: Collateral for the child is the parent’s outcome token, not a chain profile (unchanged — see Conditional market).
HTTP API: collateralProfile query parameter
Portfolio and related endpoints accept an optional collateralProfile query param: the registered profile name (default, circles, …) to use for that request. The backend resolves it to the profile’s primary token via getCollateralProfileByName.
If omitted, the API defaults to the
default profile (sDAI on Gnosis).
The @seer-pm/sdk fetchPortfolio* functions send collateralProfile from getActiveCollateralProfileName() after configureCollateral.
Example:
Split / merge on Gnosis (sDAI vs s-gCRC)
Pass
collateralToken explicitly to getSplitExecution / getMergeExecution / getRedeemExecution — use the market’s collateral or the profile primary, not a global default.
See Split, merge and redeem.
White-label sites
- Call
configureCollateral("circles")(or another registered name) once at startup. - Filter market listings client-side:
market.collateralToken === getActivePrimaryCollateral(chainId).address(or show all markets but only enable trade for matching collateral). - Portfolio hooks (
usePortfolioValue,usePortfolioPnL) already pass the active profile name to the API when using current@seer-pm/react.