GuidesConcepts
Negative-risk markets
How the markets of a multi-outcome category are linked, what converting positions does, and what it changes for trading.
Some categories ask which of several outcomes happens, for example who wins a tournament. Each candidate gets its own Yes/No market, and only one of them can resolve Yes. When a category's markets are linked this way, it is a negative-risk category, and its markets have isNegRisk: true.
Why the markets are linked
Because only one candidate can win, a No share on one candidate is worth the same as a Yes share on every other candidate. The NegRiskAdapter contract links the markets of the category so that you can swap between the two. That swap is called converting positions.
Each market of the category is one question of the adapter's market. Its questionIndex is its position in the category, starting from 0.
Converting positions
convertPositions(negRiskOnChainId, indexSet, amount) on the NegRiskAdapter converts positions in the category whose negRiskOnChainId you pass. It takes amount No shares of each question you pick, and gives you:
amountYes shares of every question you didn't pick, and(n − 1) × amountUSDT, wherenis the number of questions you picked.
indexSet is a bitmask of the questions you pick: bit i stands for the question whose questionIndex is i. The market can charge a convert fee, which is taken from what you receive.
Converting complementary positions in the product docs shows how to convert in the web app.
Example
A category asks who wins, with three candidates A, B and C. You hold 1 No share on A and 1 No share on B, so indexSet is 0b011 (3) and n is 2. Converting gives you 1 Yes share on C and 1 USDT.
Both holdings pay the same whoever wins:
| Winner | No on A + No on B pay | Yes on C + 1 USDT pay |
|---|---|---|
| A | 0 + 1 = 1 | 0 + 1 = 1 |
| B | 1 + 0 = 1 | 0 + 1 = 1 |
| C | 1 + 1 = 2 | 1 + 1 = 2 |
So converting doesn't change your payout. It frees the USDT that your No shares had locked up across the category.
Only categories with more than one market can convert. See Manage positions for the SDK call.
What changes for trading
Negative-risk markets trade on their own exchange, the NegRiskCtfExchange. The SDK picks it when you pass isNegRisk to buildTypedData (build_typed_data in Python), and the order's signature is only valid on that exchange.
They also need one more approval than binary markets. Besides approving the exchange for your USDT and shares, you approve the NegRiskAdapter for your shares, because the adapter moves them when your sell orders fill. Without it, the API rejects your sell orders with create_order_neg_risk_adapter_not_approved. See Approvals.
Read each outcome's token ID from its onChainId. Don't compute it from the condition ID with USDT as the collateral: the adapter derives negative-risk token IDs from its own wrapped collateral token, so the result would be wrong.
Resolution
Each question of a negative-risk category resolves on its own, but at most one of them can resolve Yes. A question can't resolve 50/50.
Resolving a question takes two steps. First the oracle reports the result. Then Predict records it on the adapter, about an hour later, and only after that can you redeem. See Resolution.