From b231d0968f179b070ec2f74d4a36b7d75cc91a49 Mon Sep 17 00:00:00 2001 From: TrueMilli <61841994+TrueMilli@users.noreply.github.com> Date: Wed, 8 Jun 2022 23:06:14 +0200 Subject: [PATCH] dpm fix multi resolution (#461) * fix dpm prob * refactoring * remove newline * refactoring --- common/calculate-dpm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/calculate-dpm.ts b/common/calculate-dpm.ts index 4d31bf3b..7aef1de5 100644 --- a/common/calculate-dpm.ts +++ b/common/calculate-dpm.ts @@ -363,7 +363,7 @@ function calculateMktDpmPayout(contract: DPMContract, bet: Bet) { ) } ) - : (probs[outcome] * shares) / weightedShareTotal + : (probs[outcome] * shares) / totalShares[outcome] const totalPool = sum(Object.values(pool)) const winnings = poolFrac * totalPool