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, oraddresses.MainnetRouter— all support these calls). - Gnosis (100): GnosisRouter also exposes
splitFromBase(market)(payable in xDAI),mergeToBase, andredeemToBase: 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, andredeemToDai: 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).
Using @seer-pm/sdk (recommended)
The @seer-pm/sdk providesgetRouterAddress, 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: undefinedto use splitFromBase (payable xDAI); send the sameamountasvalue. Not available for s-gCRC markets — always pass the s-gCRC address. - On Ethereum,
collateralToken: undefinedyields splitFromDai; approve DAI to the router and the SDK encodessplitFromDai(market, amount).
SDK: merge
SDK: redeem (after market is resolved)
collateralToken; for redeeming to base collateral in one tx use isRedeemToParentCollateral: true (ConditionalRouter).