diff --git a/common/calculate-cpmm.ts b/common/calculate-cpmm.ts
index 4c0d30eb..ffe04133 100644
--- a/common/calculate-cpmm.ts
+++ b/common/calculate-cpmm.ts
@@ -74,7 +74,7 @@ export function getCpmmLiquidityFee(
const totalFees = liquidityFee + platformFee + creatorFee
const remainingBet = bet - totalFees
- return { remainingBet, fees }
+ return { remainingBet, totalFees, fees }
}
export function calculateCpmmSharesAfterFee(
diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx
index 2f9064c7..679af415 100644
--- a/web/components/bet-panel.tsx
+++ b/web/components/bet-panel.tsx
@@ -27,7 +27,11 @@ import {
} 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 {
+ calculateCpmmSale,
+ getCpmmProbability,
+ getCpmmLiquidityFee,
+} from 'common/calculate-cpmm'
import { SellRow } from './sell-row'
import { useSaveShares } from './use-save-shares'
@@ -281,6 +285,10 @@ function BuyPanel(props: {
const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0
const currentReturnPercent = formatPercent(currentReturn)
+ const cpmmFees =
+ contract.mechanism === 'cpmm-1' &&
+ getCpmmLiquidityFee(contract, betAmount ?? 0, betChoice ?? 'YES').totalFees
+
const dpmTooltip =
contract.mechanism === 'dpm-2'
? `Current payout for ${formatWithCommas(shares)} / ${formatWithCommas(
@@ -335,6 +343,10 @@ function BuyPanel(props: {
)}
+ {cpmmFees !== false && (
+
+ )}
+
{dpmTooltip && }