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.

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

Market page

Buy panel

Appears below an answer, inline. Shows: