Revert "use geometric mean probability to calculate fees for cfmm (a lot easier than solving the integral)"
This reverts commit a1c3a5e569
.
This commit is contained in:
parent
c3be126337
commit
5f385c2f9d
|
@ -63,10 +63,8 @@ export function getCpmmLiquidityFee(
|
|||
bet: number,
|
||||
outcome: string
|
||||
) {
|
||||
const probBefore = getCpmmProbability(contract.pool, contract.p)
|
||||
const probAfter = getCpmmProbabilityAfterBetBeforeFees(contract, outcome, bet)
|
||||
const probMid = Math.sqrt(probBefore * probAfter)
|
||||
const betP = outcome === 'YES' ? 1 - probMid : probMid
|
||||
const prob = getCpmmProbabilityAfterBetBeforeFees(contract, outcome, bet)
|
||||
const betP = outcome === 'YES' ? 1 - prob : prob
|
||||
|
||||
const liquidityFee = LIQUIDITY_FEE * betP * bet
|
||||
const platformFee = PLATFORM_FEE * betP * bet
|
||||
|
|
Loading…
Reference in New Issue
Block a user