dpm: don't use weightedShareTotal
This commit is contained in:
parent
b231d0968f
commit
52dd68303a
|
@ -346,10 +346,6 @@ function calculateMktDpmPayout(contract: DPMContract, bet: Bet) {
|
||||||
probs = mapValues(totalShares, (shares) => shares ** 2 / squareSum)
|
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 { outcome, amount, shares } = bet
|
||||||
|
|
||||||
const poolFrac =
|
const poolFrac =
|
||||||
|
@ -359,7 +355,7 @@ function calculateMktDpmPayout(contract: DPMContract, bet: Bet) {
|
||||||
(outcome) => {
|
(outcome) => {
|
||||||
return (
|
return (
|
||||||
(probs[outcome] * (bet as NumericBet).allOutcomeShares[outcome]) /
|
(probs[outcome] * (bet as NumericBet).allOutcomeShares[outcome]) /
|
||||||
weightedShareTotal
|
totalShares[outcome]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user