Fix multi payout calculation!

This commit is contained in:
James Grugett 2022-03-07 13:14:56 -08:00
parent a32bb57167
commit ff92338873

View File

@ -138,8 +138,7 @@ export const getPayoutsMultiOutcome = (
const prob = resolutions[outcome] / probTotal
const winnings = (shares / sharesByOutcome[outcome]) * prob * poolTotal
const profit = winnings - amount
const payout = amount + (1 - FEES) * Math.max(0, profit)
const payout = deductFees(amount, winnings)
return { userId, profit, payout }
})