Skip to main content
Use the Router (or chain-specific GnosisRouter / MainnetRouter) to split collateral into outcome tokens, merge a full set of outcome tokens back into collateral, and redeem winning outcome tokens after resolution. The market must already exist (see Create a market). Which router and collateral: GnosisRouter and MainnetRouter inherit from Router, so they expose the same functions (splitPosition, mergePositions, redeemPositions, getWinningOutcomes). You can call those with any collateral token on any chain.
  • Router (all networks): Pass an ERC20 collateral token and the market address; approve the collateral and call splitPosition / mergePositions / redeemPositions. Use the router address for your chain (addresses.Router, addresses.GnosisRouter, or addresses.MainnetRouter — all support these calls).
  • Gnosis (100): GnosisRouter also exposes splitFromBase(market) (payable in xDAI), mergeToBase, and redeemToBase: you work with xDAI directly; the router converts to/from sDAI internally (sDAI is the collateral used by the market). Convenient if you prefer xDAI over sDAI.
  • Ethereum (1): MainnetRouter also exposes splitFromDai(market, amount), mergeToDai, and redeemToDai: you work with DAI directly; the router converts to/from sDAI internally. Convenient if you prefer DAI over sDAI.

Router functions overview


Split

What you do: Provide collateral (or send xDAI on Gnosis) and receive one full set of outcome tokens (one ERC20 per outcome). Parameters: collateralToken (Router only): ERC20 address. market: Market contract address. amount: amount in collateral units; you receive that many units of each outcome token.

Merge

What you do: Hold a full set of outcome tokens (same amount of each outcome), then merge them back into collateral. You receive collateral (or parent outcome tokens for conditional markets). Parameters: market, and amount (per-outcome amount you are merging). Approve the Router to spend that amount of each outcome token.

Redeem

What you do: After the market is resolved, redeem winning outcome tokens for collateral (or parent outcome tokens in conditional markets). Parameters: outcomeIndexes: array of outcome indices that won (e.g. [0] or [1, 2]). amounts: amount to redeem for each (same length). Approve the Router to spend the winning outcome token(s) before calling. How to know which outcomes won: Call the view getWinningOutcomes(conditionId) on the Router (or GnosisRouter / MainnetRouter on those chains) with the market’s conditionId; the returned array has true for each winning outcome index. ABI and example (viem):

Conditional markets

For conditional (child) markets, the “collateral” for that market is a parent outcome token (ERC20 from a parent market), not the chain’s base collateral.
  • Split: user holds parent outcome tokens; splitting mints child outcome tokens (one set per amount).
  • Merge: user holds a full set of child outcome tokens (equal amount of each outcome); merging returns parent outcome tokens.
  • Redeem: after the child market is resolved, user redeems winning child outcome tokens for parent outcome tokens (not base collateral until the parent is also resolved and redeemed).
Use the same Router functions with the child market; pass the parent’s wrapped outcome token as the collateral token for split/merge/redeem (see Conditional market).
The @seer-pm/sdk provides getRouterAddress, getSplitExecution, getMergeExecution, and getRedeemExecution. Approve the collateral (or outcome tokens) before sending. See Viem setup for installation. Collateral per market: Use the market’s collateralToken (or the parent outcome token for conditional markets). On Gnosis there are multiple registered primaries (sDAI, s-gCRC); xDAI splitFromBase only applies to the sDAI profile. See Collateral profiles.

SDK: shared setup and split

  • On Gnosis with sDAI markets: pass collateralToken: undefined to use splitFromBase (payable xDAI); send the same amount as value. Not available for s-gCRC markets — always pass the s-gCRC address.
  • On Ethereum, collateralToken: undefined yields splitFromDai; approve DAI to the router and the SDK encodes splitFromDai(market, amount).

SDK: merge

SDK: redeem (after market is resolved)

For conditional markets, use the same functions with the child market and pass the parent’s outcome token as collateralToken; for redeeming to base collateral in one tx use isRedeemToParentCollateral: true (ConditionalRouter).