2022-01-10 21:07:57 +00:00
|
|
|
export type Bet = {
|
2022-01-10 23:52:03 +00:00
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
contractId: string
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
amount: number // bet size; negative if SELL bet
|
2022-03-02 00:23:00 +00:00
|
|
|
loanAmount?: number
|
2022-02-17 23:00:19 +00:00
|
|
|
outcome: string
|
2022-01-10 23:52:03 +00:00
|
|
|
shares: number // dynamic parimutuel pool weight; negative if SELL bet
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
probBefore: number
|
|
|
|
probAfter: number
|
2022-01-10 21:07:57 +00:00
|
|
|
|
|
|
|
sale?: {
|
2022-01-10 23:52:03 +00:00
|
|
|
amount: number // amount user makes from sale
|
|
|
|
betId: string // id of bet being sold
|
2022-01-10 21:07:57 +00:00
|
|
|
// TODO: add sale time?
|
2022-01-10 23:52:03 +00:00
|
|
|
}
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
isSold?: boolean // true if this BUY bet has been sold
|
2022-01-19 22:36:55 +00:00
|
|
|
isAnte?: boolean
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
createdTime: number
|
|
|
|
}
|
2022-03-02 00:23:00 +00:00
|
|
|
|
|
|
|
export const MAX_LOAN_PER_CONTRACT = 20
|