9d5490cf9a
* initial commit * antes * rename path, compute to contractPath, contractMetrics * merge * Include antes as bets; more calculations * fees on estimated winnings * mkt payout calculation * contract: remove startPool, add phantomShares * Merge branch 'main' into new-dpm * dpm migration script * my service account
31 lines
930 B
TypeScript
31 lines
930 B
TypeScript
export type Contract = {
|
|
id: string
|
|
slug: string // auto-generated; must be unique
|
|
|
|
creatorId: string
|
|
creatorName: string
|
|
creatorUsername: string
|
|
|
|
question: string
|
|
description: string // More info about what the contract is about
|
|
outcomeType: 'BINARY' // | 'MULTI' | 'interval' | 'date'
|
|
// outcomes: ['YES', 'NO']
|
|
|
|
mechanism: 'dpm-2'
|
|
phantomShares: { YES: number; NO: number }
|
|
pool: { YES: number; NO: number }
|
|
totalShares: { YES: number; NO: number }
|
|
totalBets: { YES: number; NO: number }
|
|
|
|
createdTime: number // Milliseconds since epoch
|
|
lastUpdatedTime: number // If the question or description was changed
|
|
closeTime?: number // When no more trading is allowed
|
|
|
|
isResolved: boolean
|
|
resolutionTime?: number // When the contract creator resolved the market
|
|
resolution?: 'YES' | 'NO' | 'CANCEL' // Chosen by creator; must be one of outcomes
|
|
|
|
volume24Hours: number
|
|
volume7Days: number
|
|
}
|