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)}>
|
<Col className={clsx('items-center', className)}>
|
||||||
{user && (
|
{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
|
{hasYesShares
|
||||||
? `(${Math.floor(yesShares)} ${
|
? `(${Math.floor(yesShares)} ${
|
||||||
isPseudoNumeric ? 'HIGHER' : 'YES'
|
isPseudoNumeric ? 'HIGHER' : 'YES'
|
||||||
|
|
|
@ -41,7 +41,8 @@ export function QuickBetButtons(props: {
|
||||||
sellOutcome = side === 'YES' ? 'NO' : 'YES'
|
sellOutcome = side === 'YES' ? 'NO' : 'YES'
|
||||||
|
|
||||||
const prob = getProb(contract)
|
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)
|
sharesSold = Math.min(oppositeShares, maxSharesSold)
|
||||||
|
|
||||||
const { saleValue } = calculateCpmmSale(
|
const { saleValue } = calculateCpmmSale(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user