Contract sub-collection ‘answers’:
type Answer = {
id: string
contractId: string
createdTime: number
userId: string
username: string
name: string
avatarUrl: string
text: string
}
Contract field updates.
- No fields change, only types
type Contract = {
...
outcomeType: 'BINARY' | 'MULTI'
pool: { [answerId: string]: number }
totalShares: { [answerId: string]: number }
totalBets: { [answerId:string]: number }
resolution?: string // MULTI: answerid | 'NONE' | 'CANCEL'; BINARY: 'YES' | 'NO' | 'MKT' | 'CANCEL'
}
Create contract panel
- Radio button option to choose YES/NO or Free Response market (default to YES/NO)
- With Free Response selected
- No initial probability
- Market ante? Yes, but it may act more like a true subsidy.
- Money is kept with market. Goes back to creator if they resolve NONE, otherwise added to payout pool.
Market page
- Show question and row of contract details (creator, start/end dates, pool amount)
- Then one row per answer suggested, sorted by descending probability. Shows:
- The text of the answer
- The user who suggested it (name, avatar)
- The time since they suggested it
- The current probability
- A Buy button on the right, which opens the buy panel below the answer
Buy panel
Appears below an answer, inline. Shows:
- Amount input
- Probability change
- Payout if correct
- Submit trade button