CTF Multi-Outcome vs NegRisk Adapter - A Complete Guide
| 구분 | 그룹형 바이너리 Grouped Binary (Nostra 현재) |
CTF 다중 결과 CTF Multi-Outcome |
그룹형 바이너리 + NegRisk Polymarket |
|---|---|---|---|
| 초기 확률 Initial Probability |
자유 설정 (50% 또는 100/N% 등) |
자유 설정 (100/N% 또는 외부 데이터) |
자유 설정 (시장 결정) |
| YES 총합 Sum of YES prices |
자유 (연동 없음) (차익거래 가능) |
항상 100% (기계적 보장) |
~100% (경제적 수렴) |
| 시장 연동 Market Linkage |
독립적 (연동 없음) |
기계적 연동 (분할/병합) |
어댑터 연동 (NegRisk) |
| 재고 문제 Stuck Inventory |
발생함 (전환 불가) |
발생하지 않음 (병합 가능) |
발생하지 않음 (전환 가능) |
| 구현 난이도 Implementation |
간단함 | 복잡함 (커스텀 거래소 필요) |
복잡함 (6-10주) |
| conditionId Condition ID |
각 outcome별 다름 | 모두 동일 (공유) | 각 outcome별 다름 + negRiskMarketId 공유 |
| 포지션 전환 Position Conversion |
불가능 | 가능 (merge) | 가능 (adapter) |
Nostra 현재: 그룹형 바이너리 (Grouped Binary) - 간단하지만 포지션 전환 불가
Polymarket: 그룹형 바이너리 + NegRisk - 포지션 전환 가능
핵심 차이: 시장 연동 메커니즘 (없음 vs 분할/병합 vs NegRisk 어댑터)
The CTF Multi-Outcome model is the "pure" way to handle multiple mutually exclusive outcomes using the Conditional Tokens Framework. Unlike Grouped Binary where each outcome is a separate market, CTF Multi-Outcome uses a single condition with multiple outcome slots.
conditionId (모든 결과가 공유)
prepareCondition(oracle, questionId, outcomeSlotCount=5)
prepareCondition(oracle, questionId_N, 2) 호출
| 구분 | 🟢 CTF 다중 결과 | 🟠 그룹형 바이너리 |
|---|---|---|
| conditionId | 1개 (공유) | N개 (결과별 개별) |
| 토큰 구조 | 결과당 1개 토큰 (스페인, 프랑스, 브라질...) |
결과당 YES/NO 쌍 (스페인 YES/NO, 프랑스 YES/NO...) |
| 분할/병합 | 네이티브 CTF 기능 | 불가능 |
| 가격 총합 | 항상 = 100% | N × 50% = 250% (5팀) |
CTF Multi-Outcome enables mechanical split/merge operations that are impossible in Grouped Binary:
Exactly ONE will be worth $1, others worth $0
Guaranteed $1 regardless of outcome
You have: 100 Spain tokens @ 20¢ = $20 value
You want: France tokens
In CTF Multi-Outcome, the split/merge mechanism creates a mechanical arbitrage that forces prices to sum to 100%:
This is why CTF Multi-Outcome markets always sum to ~100%, unlike Grouped Binary which can have any sum.
Polymarket chose Grouped Binary + NegRisk instead of pure CTF Multi-Outcome for several reasons:
Trade-off: More complex architecture, but more operational flexibility
Nostra's MarketFactory actually has a createMultipleChoiceMarket() function that creates pure CTF Multi-Outcome markets:
Current Status: Nostra has the capability but uses createBinaryMarket() in a loop instead, creating Grouped Binary markets.
In Grouped Binary markets (like Nostra's current implementation), each outcome is an independent binary market. This creates a problem:
You believe Spain will win, so you buy:
Problem: If you change your mind and want to bet on France instead, you must:
No direct conversion possible!
| Model | Can Convert Positions? | Stuck Inventory? |
|---|---|---|
| Grouped Binary (Nostra now) | No | Yes - Major Issue |
| CTF Multi-Outcome | Yes (via merge) | No |
| Grouped Binary + NegRisk | Yes (via adapter) | No |
In a mutually exclusive market (only ONE team can win), all NO tokens have a special property:
If Spain wins → Spain NO = $0, but France NO = $1, Brazil NO = $1, etc.
If France wins → France NO = $0, but Spain NO = $1, Brazil NO = $1, etc.
N개 팀이 있는 상호 배타적 시장에서:
Setup: World Cup with 5 teams (Spain, France, Brazil, Argentina, England)
You hold: 1 NO token for each team (5 total)
Insight: 5 NO tokens = $4 guaranteed = $(N-1)
NegRisk는 수학적 등가성을 활용하여 포지션 전환을 가능하게 합니다:
Current prices: Spain 20%, France 15%, Brazil 25%, Argentina 30%, England 10%
Step 1: You have 100 Spain YES tokens
Step 2: Sell Spain YES, Buy all other NO tokens
Step 3: NegRisk Converts NO tokens to YES
스페인 YES → 오더북에서 판매 → USDC → 프랑스 YES 구매
문제: 양쪽 거래에서 슬리피지, 유동성에 의존
스페인 YES → 어댑터로 전환 → 프랑스 YES
장점: 수학적 전환, 전환 단계에서 슬리피지 없음
negRiskMarketId로 연결됨
| 컨트랙트 | 목적 | Nostra 보유? |
|---|---|---|
| NegRiskAdapter | Main conversion logic (NO → YES) | No |
| NegRiskOperator | Admin functions, oracle integration | No |
| WrappedCollateral | Wrapped USDC for atomic operations | No |
| NegRiskFeeModule | Fee collection on conversions | No |
| ConditionalTokens (CTF) | Base token framework | Yes |
| MarketFactory | Create binary markets | Yes |
| CTFExchange | Order book trading | Yes |
ERC20 wrapper around USDC for internal accounting
Core conversion logic: splitPosition, mergePositions, convertPosition
Market group management, links binary markets together
Link markets in the same group
Handle conversion requests from frontend
Button to convert between outcomes in the same group
| Component | Time | Complexity |
|---|---|---|
| Smart Contracts (1-3) | 2-3 weeks | High (security critical) |
| Backend API (4-5) | 3-5 days | Medium |
| Frontend UI (6) | 3-5 days | Medium |
| Testing & Audit | 2-4 weeks | Critical |
| Total | 6-10 weeks |
Before implementing NegRisk, consider if you really need it:
gamma-api.polymarket.com is Polymarket's public REST API for market data.
Nostra equivalent: /api/markets, /api/market-groups
Nostra Design Document | Created: December 2024