From e662d10cfbfc063c9343aca2db0deebdaadf3dbf Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 14 Dec 2021 12:54:09 -0600 Subject: [PATCH] resolve markets: remove seed bets from pot --- functions/src/resolve-market.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/resolve-market.ts b/functions/src/resolve-market.ts index 9b2b10da..973d3367 100644 --- a/functions/src/resolve-market.ts +++ b/functions/src/resolve-market.ts @@ -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