eliminate fees

This commit is contained in:
mantikoros 2022-08-24 15:29:48 -05:00
parent d6d1e8e86f
commit d390b39e0a
5 changed files with 25 additions and 29 deletions

View File

@ -1,9 +1,9 @@
export const PLATFORM_FEE = 0 export const PLATFORM_FEE = 0
export const CREATOR_FEE = 0.1 export const CREATOR_FEE = 0
export const LIQUIDITY_FEE = 0 export const LIQUIDITY_FEE = 0
export const DPM_PLATFORM_FEE = 0.01 export const DPM_PLATFORM_FEE = 0.0
export const DPM_CREATOR_FEE = 0.04 export const DPM_CREATOR_FEE = 0.0
export const DPM_FEES = DPM_PLATFORM_FEE + DPM_CREATOR_FEE export const DPM_FEES = DPM_PLATFORM_FEE + DPM_CREATOR_FEE
export type Fees = { export type Fees = {

View File

@ -53,10 +53,10 @@ export const sendMarketResolutionEmail = async (
const subject = `Resolved ${outcome}: ${contract.question}` const subject = `Resolved ${outcome}: ${contract.question}`
const creatorPayoutText = // const creatorPayoutText =
userId === creator.id // userId === creator.id
? ` (plus ${formatMoney(creatorPayout)} in commissions)` // ? ` (plus ${formatMoney(creatorPayout)} in commissions)`
: '' // : ''
const emailType = 'market-resolved' const emailType = 'market-resolved'
const unsubscribeUrl = `${UNSUBSCRIBE_ENDPOINT}?id=${userId}&type=${emailType}` const unsubscribeUrl = `${UNSUBSCRIBE_ENDPOINT}?id=${userId}&type=${emailType}`
@ -68,7 +68,7 @@ export const sendMarketResolutionEmail = async (
question: contract.question, question: contract.question,
outcome, outcome,
investment: `${Math.floor(investment)}`, investment: `${Math.floor(investment)}`,
payout: `${Math.floor(payout)}${creatorPayoutText}`, payout: `${Math.floor(payout)}`,
url: `https://${DOMAIN}/${creator.username}/${contract.slug}`, url: `https://${DOMAIN}/${creator.username}/${contract.slug}`,
unsubscribeUrl, unsubscribeUrl,
} }

View File

@ -9,7 +9,6 @@ import { Row } from './layout/row'
import { Spacer } from './layout/spacer' import { Spacer } from './layout/spacer'
import { import {
formatMoney, formatMoney,
formatMoneyWithDecimals,
formatPercent, formatPercent,
formatWithCommas, formatWithCommas,
} from 'common/util/format' } from 'common/util/format'
@ -18,7 +17,6 @@ import { User } from 'web/lib/firebase/users'
import { Bet, LimitBet } from 'common/bet' import { Bet, LimitBet } from 'common/bet'
import { APIError, placeBet, sellShares } from 'web/lib/firebase/api' import { APIError, placeBet, sellShares } from 'web/lib/firebase/api'
import { AmountInput, BuyAmountInput } from './amount-input' import { AmountInput, BuyAmountInput } from './amount-input'
import { InfoTooltip } from './info-tooltip'
import { import {
BinaryOutcomeLabel, BinaryOutcomeLabel,
HigherLabel, HigherLabel,
@ -346,9 +344,9 @@ function BuyPanel(props: {
</> </>
)} )}
</div> </div>
<InfoTooltip {/* <InfoTooltip
text={`Includes ${formatMoneyWithDecimals(totalFees)} in fees`} text={`Includes ${formatMoneyWithDecimals(totalFees)} in fees`}
/> /> */}
</Row> </Row>
<div> <div>
<span className="mr-2 whitespace-nowrap"> <span className="mr-2 whitespace-nowrap">
@ -665,9 +663,9 @@ function LimitOrderPanel(props: {
</> </>
)} )}
</div> </div>
<InfoTooltip {/* <InfoTooltip
text={`Includes ${formatMoneyWithDecimals(yesFees)} in fees`} text={`Includes ${formatMoneyWithDecimals(yesFees)} in fees`}
/> /> */}
</Row> </Row>
<div> <div>
<span className="mr-2 whitespace-nowrap"> <span className="mr-2 whitespace-nowrap">
@ -689,9 +687,9 @@ function LimitOrderPanel(props: {
</> </>
)} )}
</div> </div>
<InfoTooltip {/* <InfoTooltip
text={`Includes ${formatMoneyWithDecimals(noFees)} in fees`} text={`Includes ${formatMoneyWithDecimals(noFees)} in fees`}
/> /> */}
</Row> </Row>
<div> <div>
<span className="mr-2 whitespace-nowrap"> <span className="mr-2 whitespace-nowrap">

View File

@ -110,10 +110,10 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) {
<td>{formatMoney(contract.volume)}</td> <td>{formatMoney(contract.volume)}</td>
</tr> </tr>
<tr> {/* <tr>
<td>Creator earnings</td> <td>Creator earnings</td>
<td>{formatMoney(contract.collectedFees.creatorFee)}</td> <td>{formatMoney(contract.collectedFees.creatorFee)}</td>
</tr> </tr> */}
<tr> <tr>
<td>Traders</td> <td>Traders</td>

View File

@ -8,10 +8,8 @@ import { Spacer } from './layout/spacer'
import { ResolveConfirmationButton } from './confirmation-button' import { ResolveConfirmationButton } from './confirmation-button'
import { APIError, resolveMarket } from 'web/lib/firebase/api' import { APIError, resolveMarket } from 'web/lib/firebase/api'
import { ProbabilitySelector } from './probability-selector' import { ProbabilitySelector } from './probability-selector'
import { DPM_CREATOR_FEE } from 'common/fees'
import { getProbability } from 'common/calculate' import { getProbability } from 'common/calculate'
import { BinaryContract, resolution } from 'common/contract' import { BinaryContract, resolution } from 'common/contract'
import { formatMoney } from 'common/util/format'
export function ResolutionPanel(props: { export function ResolutionPanel(props: {
creator: User creator: User
@ -20,10 +18,10 @@ export function ResolutionPanel(props: {
}) { }) {
const { contract, className } = props const { contract, className } = props
const earnedFees = // const earnedFees =
contract.mechanism === 'dpm-2' // contract.mechanism === 'dpm-2'
? `${DPM_CREATOR_FEE * 100}% of trader profits` // ? `${DPM_CREATOR_FEE * 100}% of trader profits`
: `${formatMoney(contract.collectedFees.creatorFee)} in fees` // : `${formatMoney(contract.collectedFees.creatorFee)} in fees`
const [outcome, setOutcome] = useState<resolution | undefined>() const [outcome, setOutcome] = useState<resolution | undefined>()
@ -86,16 +84,16 @@ export function ResolutionPanel(props: {
{outcome === 'YES' ? ( {outcome === 'YES' ? (
<> <>
Winnings will be paid out to YES bettors. Winnings will be paid out to YES bettors.
{/* <br />
<br /> <br />
<br /> You will earn {earnedFees}. */}
You will earn {earnedFees}.
</> </>
) : outcome === 'NO' ? ( ) : outcome === 'NO' ? (
<> <>
Winnings will be paid out to NO bettors. Winnings will be paid out to NO bettors.
{/* <br />
<br /> <br />
<br /> You will earn {earnedFees}. */}
You will earn {earnedFees}.
</> </>
) : outcome === 'CANCEL' ? ( ) : outcome === 'CANCEL' ? (
<>All trades will be returned with no fees.</> <>All trades will be returned with no fees.</>
@ -106,7 +104,7 @@ export function ResolutionPanel(props: {
probabilityInt={Math.round(prob)} probabilityInt={Math.round(prob)}
setProbabilityInt={setProb} setProbabilityInt={setProb}
/> />
You will earn {earnedFees}. {/* You will earn {earnedFees}. */}
</Col> </Col>
) : ( ) : (
<>Resolving this market will immediately pay out traders.</> <>Resolving this market will immediately pay out traders.</>