From a10e4c115e3c16ce9490f6bde3d95083904429a0 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 26 Sep 2022 15:57:21 -0400 Subject: [PATCH] Fix dpm MULTI resolution payouts bug --- common/payouts-dpm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/payouts-dpm.ts b/common/payouts-dpm.ts index bf6f5ebc..48850dca 100644 --- a/common/payouts-dpm.ts +++ b/common/payouts-dpm.ts @@ -168,7 +168,7 @@ export const getPayoutsMultiOutcome = ( const winnings = (shares / sharesByOutcome[outcome]) * prob * poolTotal const profit = winnings - amount - const payout = amount + (1 - DPM_FEES) * Math.max(0, profit) + const payout = amount + (1 - DPM_FEES) * profit return { userId, profit, payout } })