From 52dd68303a88ff00449489d09b8c649245ca01f6 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 8 Jun 2022 16:18:00 -0500 Subject: [PATCH] dpm: don't use weightedShareTotal --- common/calculate-dpm.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/calculate-dpm.ts b/common/calculate-dpm.ts index 7aef1de5..497f1155 100644 --- a/common/calculate-dpm.ts +++ b/common/calculate-dpm.ts @@ -346,10 +346,6 @@ function calculateMktDpmPayout(contract: DPMContract, bet: Bet) { probs = mapValues(totalShares, (shares) => shares ** 2 / squareSum) } - const weightedShareTotal = sumBy(Object.keys(totalShares), (outcome) => { - return probs[outcome] * totalShares[outcome] - }) - const { outcome, amount, shares } = bet const poolFrac = @@ -359,7 +355,7 @@ function calculateMktDpmPayout(contract: DPMContract, bet: Bet) { (outcome) => { return ( (probs[outcome] * (bet as NumericBet).allOutcomeShares[outcome]) / - weightedShareTotal + totalShares[outcome] ) } )