diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx
index f958ed87..311a6182 100644
--- a/web/components/bet-panel.tsx
+++ b/web/components/bet-panel.tsx
@@ -8,6 +8,7 @@ import { Col } from './layout/col'
import { Row } from './layout/row'
import { Spacer } from './layout/spacer'
import {
+ formatLargeNumber,
formatMoney,
formatPercent,
formatWithCommas,
@@ -28,7 +29,7 @@ import { getProbability } from 'common/calculate'
import { useFocus } from 'web/hooks/use-focus'
import { useUserContractBets } from 'web/hooks/use-user-bets'
import { calculateCpmmSale, getCpmmProbability } from 'common/calculate-cpmm'
-import { getFormattedMappedValue } from 'common/pseudo-numeric'
+import { getFormattedMappedValue, getMappedValue } from 'common/pseudo-numeric'
import { SellRow } from './sell-row'
import { useSaveBinaryShares } from './use-save-binary-shares'
import { BetSignUpPrompt } from './sign-up-prompt'
@@ -256,17 +257,43 @@ function BuyPanel(props: {
const resultProb = getCpmmProbability(newPool, newP)
const probStayedSame =
formatPercent(resultProb) === formatPercent(initialProb)
+
const probChange = Math.abs(resultProb - initialProb)
-
const currentPayout = newBet.shares
-
const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0
const currentReturnPercent = formatPercent(currentReturn)
const format = getFormattedMappedValue(contract)
+ const getValue = getMappedValue(contract)
+ const rawDifference = Math.abs(getValue(resultProb) - getValue(initialProb))
+ const displayedDifference = isPseudoNumeric
+ ? formatLargeNumber(rawDifference)
+ : formatPercent(rawDifference)
+
const bankrollFraction = (betAmount ?? 0) / (user?.balance ?? 1e9)
+ const warning =
+ (betAmount ?? 0) > 10 &&
+ bankrollFraction >= 0.5 &&
+ bankrollFraction <= 1 ? (
+