Cheating by adding 0.05 to max shares but gives better quickbet UX
This commit is contained in:
parent
a47b702dbe
commit
2278c3cb2e
|
@ -33,7 +33,7 @@ export default function BetButton(props: {
|
|||
<>
|
||||
<Col className={clsx('items-center', className)}>
|
||||
{user && (
|
||||
<div className={'mt-1 w-24 text-center text-sm text-gray-500'}>
|
||||
<div className={'mb-1 w-24 text-center text-sm text-gray-500'}>
|
||||
{hasYesShares
|
||||
? `(${Math.floor(yesShares)} ${
|
||||
isPseudoNumeric ? 'HIGHER' : 'YES'
|
||||
|
|
|
@ -41,7 +41,8 @@ export function QuickBetButtons(props: {
|
|||
sellOutcome = side === 'YES' ? 'NO' : 'YES'
|
||||
|
||||
const prob = getProb(contract)
|
||||
const maxSharesSold = BET_SIZE / (sellOutcome === 'YES' ? prob : 1 - prob)
|
||||
const maxSharesSold =
|
||||
(BET_SIZE + 0.05) / (sellOutcome === 'YES' ? prob : 1 - prob)
|
||||
sharesSold = Math.min(oppositeShares, maxSharesSold)
|
||||
|
||||
const { saleValue } = calculateCpmmSale(
|
||||
|
|
Loading…
Reference in New Issue
Block a user