diff --git a/common/new-bet.ts b/common/new-bet.ts index c4d946bf..541b8afe 100644 --- a/common/new-bet.ts +++ b/common/new-bet.ts @@ -57,7 +57,6 @@ const computeFill = ( : floatingLesserEqual(prob, limitProb) && (matchedBet?.limitProb ?? 0) < limitProb) ) { - console.log('no fill', amount, outcome, prob, limitProb) // No fill. return undefined } @@ -89,15 +88,6 @@ const computeFill = ( ) const newState = { pool: newPool, p: newP } - console.log( - 'fill from pool', - poolAmount, - '/', - amount, - outcome, - prob, - limitProb - ) return { maker: { matchedBetId: null, @@ -125,15 +115,6 @@ const computeFill = ( (outcome === 'YES' ? 1 - matchedBet.limitProb : matchedBet.limitProb) ) - console.log( - 'fill from matchedBet', - amount, - matchRemaining, - shares, - outcome, - limitProb - ) - const maker = { bet: matchedBet, matchedBetId: 'taker', @@ -167,8 +148,6 @@ export const getBinaryCpmmBetInfo = ( (bet) => bet.createdTime ) - console.log({ outcome, betAmount, limitProb, sortedBets }) - const takers: fill[] = [] const makers: { bet: LimitBet @@ -206,8 +185,6 @@ export const getBinaryCpmmBetInfo = ( if (floatingEqual(amount, 0)) break } - console.log({ makers, takers }) - const probBefore = getCpmmProbability(contract.pool, contract.p) const probAfter = getCpmmProbability(cpmmState.pool, cpmmState.p) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index e965ec3d..fba8ae03 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -31,7 +31,6 @@ import { calculateCpmmSale, getCpmmProbability, getCpmmLiquidityFee, - calculateCpmmAmount, } from 'common/calculate-cpmm' import { getFormattedMappedValue, @@ -334,12 +333,6 @@ function BuyPanel(props: { const betDisabled = isSubmitting || !betAmount || error - const amountToGoToProb = calculateCpmmAmount( - contract, - (limitProb ?? initialProb * 100) / 100, - betChoice ?? 'YES' - ) - const limitProbFrac = (limitProb ?? 0) / 100 const { newPool, newP, newBet } = getBinaryCpmmBetInfo( @@ -350,15 +343,6 @@ function BuyPanel(props: { unfilledBets as LimitBet[] ) - console.log( - 'limitProb', - limitProb, - 'amountToGoToProb', - amountToGoToProb, - 'unfilledBets', - unfilledBets - ) - const resultProb = getCpmmProbability(newPool, newP) const matchedAmount = sumBy(newBet.fills, (fill) => fill.amount) const filledShares = sumBy(newBet.fills, (fill) => fill.shares) @@ -367,19 +351,6 @@ function BuyPanel(props: { ((betAmount ?? 0) - matchedAmount) / (betChoice === 'YES' ? limitProbFrac : 1 - limitProbFrac) - console.log( - 'overallShares', - overallShares, - 'filledShares', - filledShares, - 'amount', - betAmount, - 'matchedAmount', - matchedAmount, - 'limitProb', - limitProb - ) - const currentPayout = overallShares const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0