> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testnet.dev.adipredictstreet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Neg-risk markets

> Multi-outcome markets (3+ mutually exclusive) settled through the NegRiskAdapter.

## When to use

Binary markets only cover two outcomes. For questions with 3+ exclusive
outcomes — e.g. "Who wins the Premier League?" with Arsenal / Chelsea /
Draw / Other — PredictStreet uses a **neg-risk** market backed by the
`NegRiskAdapter` contract.

Neg-risk lets you trade each outcome independently as a separate
binary YES/NO, but **guarantees collateral efficiency** via
`convertPositions`: holding the full set of NO tokens is equivalent
to holding 1 USDC, which can be converted back atomically.

## Differences from binary

|                                | Binary                                             | Neg-risk                                                   |
| ------------------------------ | -------------------------------------------------- | ---------------------------------------------------------- |
| Outcomes                       | 2                                                  | 3+                                                         |
| Settlement adapter             | `CTFExchange`                                      | `PredictStreetNegRiskCtfExchange`                          |
| `verifyingContract` in EIP-712 | `CTFExchange` address                              | **Neg-risk exchange address** (different!)                 |
| Position derivation            | `getPositionId(collateral, conditionId, indexSet)` | via `NegRiskAdapter.getPositionId(marketId, outcomeIndex)` |
| `convertPositions` available   | ❌                                                  | ✅                                                          |

<Warning>
  **Different `verifyingContract`.** An EIP-712 order signed for the
  binary exchange will fail signature validation on a neg-risk market.
  Always match `verifyingContract` to the market type.
</Warning>

## Outcome indexing

For a 4-outcome market (`["Arsenal", "Chelsea", "Draw", "Other"]`),
outcomes are `"0"`, `"1"`, `"2"`, `"3"`. Each outcome has its own
YES and NO tokens.

## convertPositions

The neg-risk invariant: holding NO across all outcomes except one
is equivalent to holding 1 USDC. `convertPositions` collapses that
basket into collateral atomically.

```http theme={null}
POST /api/vault/convert-signature
Content-Type: application/json
X-Api-Key: ps_live_<keyId>_<secret>   # needs `vault:write` scope

{
  "marketId": "...",
  "indexSet": "0b1110",
  "amount": "100",
  "signature": "0x...",
  "deadline": 1713800000,
  "salt": "0x..."
}
```

The request uses a dual-signature flow (user + backend).

## Resolution

The oracle settles each outcome independently against the same
`conditionId`. At resolution, `reportPayouts` is called with a
payout array where exactly one outcome is `1` and the rest are `0`.

<Warning>
  **Current limitation (testnet):** the automated multi-source
  oracle-service does not yet propose outcomes for neg-risk markets
  directly — it flows outcomes through `PredictStreetOracle` only.
  Neg-risk market resolution on testnet is driven by the
  admin-controlled path against `NegRiskAdapter`. The 2h challenge
  window and bond mechanics still apply at the `PredictStreetOracle`
  level for the underlying condition. Automated neg-risk proposal
  support is on the oracle-service roadmap.
</Warning>
