resolve markets: remove seed bets from pot

This commit is contained in:
mantikoros 2021-12-14 12:54:09 -06:00
parent 6e61b38a9b
commit e662d10cfb

View File

@ -75,8 +75,8 @@ const getPayouts = (outcome: string, contract: Contract, bets: Bet[]) => {
const [yesBets, noBets] = _.partition(bets, bet => bet.outcome === 'YES')
const [pot, winningBets] = outcome === 'YES'
? [contract.pot.NO, yesBets]
: [contract.pot.YES, noBets]
? [contract.pot.NO - contract.seedAmounts.NO, yesBets]
: [contract.pot.YES - contract.seedAmounts.YES, noBets]
const finalPot = (1 - PLATFORM_FEE - CREATOR_FEE) * pot
const creatorPayout = CREATOR_FEE * pot