From bfbcde4dfcdf63f3d9381567f53ae71f26ca65f1 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Fri, 22 Apr 2022 12:26:47 -0500 Subject: [PATCH] remove fees for sold shares --- common/calculate-cpmm.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/calculate-cpmm.ts b/common/calculate-cpmm.ts index 0bf16bf0..88caf0d0 100644 --- a/common/calculate-cpmm.ts +++ b/common/calculate-cpmm.ts @@ -174,17 +174,19 @@ export function calculateCpmmSale( throw new Error('Cannot sell non-positive shares') } - const rawSaleValue = calculateCpmmShareValue( + const saleValue = calculateCpmmShareValue( contract, shares, outcome as 'YES' | 'NO' ) - const { fees, remainingBet: saleValue } = getCpmmLiquidityFee( - contract, - rawSaleValue, - outcome === 'YES' ? 'NO' : 'YES' - ) + const fees = noFees + + // const { fees, remainingBet: saleValue } = getCpmmLiquidityFee( + // contract, + // rawSaleValue, + // outcome === 'YES' ? 'NO' : 'YES' + // ) const { pool } = contract const { YES: y, NO: n } = pool