diff --git a/app/src/components/market/sections/market_profile/market_status/closed.tsx b/app/src/components/market/sections/market_profile/market_status/closed.tsx index 21eb7bc005..7f323c74d7 100644 --- a/app/src/components/market/sections/market_profile/market_status/closed.tsx +++ b/app/src/components/market/sections/market_profile/market_status/closed.tsx @@ -259,7 +259,7 @@ const Wrapper = (props: Props) => { await cpk.redeemPositions({ isConditionResolved, // Round down in case of precision error - earnedCollateral: earnedCollateral.mul(99999).div(100000), + earnedCollateral: earnedCollateral.mul(99999999).div(100000000), question, numOutcomes: balances.length, oracle, diff --git a/app/src/components/market/sections/market_sell/market_sell.tsx b/app/src/components/market/sections/market_sell/market_sell.tsx index 6ce9de8587..c9f07c9887 100644 --- a/app/src/components/market/sections/market_sell/market_sell.tsx +++ b/app/src/components/market/sections/market_sell/market_sell.tsx @@ -149,8 +149,8 @@ const MarketSellWrapper: React.FC = (props: Props) => { return index !== outcomeIndex }) const amountToSell = calcSellAmountInCollateral( - // If the transaction incur in some precision error, we need to multiply the amount by some factor, for example amountShares.mul(99999).div(100000) , bigger the factor, less dust - amountShares.mul(99999).div(100000), + // Round down in case of precision error + amountShares.mul(99999999).div(100000000), holdingsOfSoldOutcome, holdingsOfOtherOutcomes, marketFeeWithTwoDecimals, diff --git a/app/src/components/market/sections/market_sell/scalar_market_sell.tsx b/app/src/components/market/sections/market_sell/scalar_market_sell.tsx index 8e4aa82ca7..c7be0f40b9 100644 --- a/app/src/components/market/sections/market_sell/scalar_market_sell.tsx +++ b/app/src/components/market/sections/market_sell/scalar_market_sell.tsx @@ -118,8 +118,8 @@ export const ScalarMarketSell = (props: Props) => { }) const marketFeeWithTwoDecimals = Number(formatBigNumber(fee, STANDARD_DECIMALS)) const amountToSell = calcSellAmountInCollateral( - // If the transaction incur in some precision error, we need to multiply the amount by some factor, for example amountShares.mul(99999).div(100000) , bigger the factor, less dust - amountShares.mul(99999).div(100000), + // Round down in case of precision error + amountShares.mul(99999999).div(100000000), holdingsOfSoldOutcome, holdingsOfOtherOutcome, marketFeeWithTwoDecimals,