creator fees messaging
This commit is contained in:
parent
beedbed6ff
commit
bb8f7cc966
|
@ -9,9 +9,10 @@ import { Spacer } from './layout/spacer'
|
|||
import { ResolveConfirmationButton } from './confirmation-button'
|
||||
import { resolveMarket } from '../lib/firebase/api-call'
|
||||
import { ProbabilitySelector } from './probability-selector'
|
||||
import { CREATOR_FEE } from '../../common/fees'
|
||||
import { DPM_CREATOR_FEE } from '../../common/fees'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { Binary, CPMM, DPM, FullContract } from '../../common/contract'
|
||||
import { formatMoney } from '../../common/util/format'
|
||||
|
||||
export function ResolutionPanel(props: {
|
||||
creator: User
|
||||
|
@ -25,6 +26,11 @@ export function ResolutionPanel(props: {
|
|||
|
||||
const { contract, className } = props
|
||||
|
||||
const earnedFees =
|
||||
contract.mechanism === 'dpm-2'
|
||||
? `${DPM_CREATOR_FEE * 100}% of trader profits`
|
||||
: `${formatMoney(contract.collectedFees.creatorFee)} in fees`
|
||||
|
||||
const [outcome, setOutcome] = useState<
|
||||
'YES' | 'NO' | 'MKT' | 'CANCEL' | undefined
|
||||
>()
|
||||
|
@ -85,14 +91,14 @@ export function ResolutionPanel(props: {
|
|||
Winnings will be paid out to YES bettors.
|
||||
<br />
|
||||
<br />
|
||||
You earn {CREATOR_FEE * 100}% of trader profits.
|
||||
You will earn {earnedFees}.
|
||||
</>
|
||||
) : outcome === 'NO' ? (
|
||||
<>
|
||||
Winnings will be paid out to NO bettors.
|
||||
<br />
|
||||
<br />
|
||||
You earn {CREATOR_FEE * 100}% of trader profits.
|
||||
You will earn {earnedFees}.
|
||||
</>
|
||||
) : outcome === 'CANCEL' ? (
|
||||
<>The pool will be returned to traders with no fees.</>
|
||||
|
@ -103,7 +109,7 @@ export function ResolutionPanel(props: {
|
|||
probabilityInt={Math.round(prob)}
|
||||
setProbabilityInt={setProb}
|
||||
/>
|
||||
<div>You earn {CREATOR_FEE * 100}% of trader profits.</div>
|
||||
You will earn {earnedFees}.
|
||||
</Col>
|
||||
) : (
|
||||
<>Resolving this market will immediately pay out traders.</>
|
||||
|
|
|
@ -236,10 +236,9 @@ export function NewContract(props: { question: string; tag?: string }) {
|
|||
|
||||
<div className="form-control mb-1 items-start">
|
||||
<label className="label mb-1 gap-2">
|
||||
<span>Market ante</span>
|
||||
<span>Market subsidy</span>
|
||||
<InfoTooltip
|
||||
text={`Subsidize your market to encourage trading. Ante bets are set to match your initial probability.
|
||||
You earn ${CREATOR_FEE * 100}% of trader profits.`}
|
||||
text={`Provide liquidity to encourage traders to participate.`}
|
||||
/>
|
||||
</label>
|
||||
<AmountInput
|
||||
|
|
Loading…
Reference in New Issue
Block a user