betting polls on wildcard

initial idea:

Anyone can come in and create a poll. You spend a min. 2k WILD (seed amount) to create a poll.

Specify answer choices — 2-5 options. Select time period: 1h / 4h / 12h / 24h

Anyone can come in and bet on any of the options.

At the end of the period, rewards are distributed to the top results.

Rewards payout varies based on how early you were, and how much market is there in the opposing pool.

The seed amount is partially used to create the market (equally for each option)

Creator and WILDCARD get a cut from the betting reward pool.

extra: Along with the custom in app UI. You can bet by tip casting: “a 100WILD” on a poll cast, we can find a way to put this on Warpcast and enable things there as well.

specs

market creation

  • 2000 $wild to create a poll under a cast
  • 2
  • time period options: 1h, 4h, 12h, 24h

betting mechanism

  • directly from web ui
    • tip or start bet in ui
  • warpcast
    • a 500 wild under bet message to vote
  • bet anywhere from 100$wild to max points

distribute winnings

  • options between multiple different mechanisms (deets below)
  • constant x% of the pot to wildcard
  • constant x% to the cast author

possible gamification options

  • token gated voting

time-weighted quadratic voting with dynamic odds

mechanism

  • combine time-weighted quadratic voting with dynamic odds
  • bets are square rooted and time-weighted ( since we have an end time )
  • odds update in real-time based on weighted bets
  • todo: multiplier

formulas

  • weighted bet: sqrt(bet_amount) * (1 + (time_left / total_time))
  • odds for option: total_pot / total_weighted_bets_on_option
  • winning option: highest sum of weighted bets
  • potential return: (individual_weighted_bet / total_weighted_bets_on_winning_option) * total_pot

incentivizes

  • early participation
  • strategic betting throughout poll duration
  • more distributed betting (reduces whale impact)

why its good

  • balances early participation advantage with ongoing strategic play
  • reduces extreme influence of large bets

ui stuff

  • ui must clearly show:
    • current standings
    • potential returns
    • time left
  • real-time updates as and when bets come in

  • late bets would be worth less
  • x * e^(-decay rate * (y-t))

binary options in price betting how does polymarket work


final spec:

final spec

betting / polls on wildcard product deets

  • types of bets:

    • binary options on casts with answer chosen by poll creator

    • buy a LONG / SHORT on a cast with it’s own separate market

    • oracle decided bets for price action of tokens, social credit etc determined by inhouse bet oracle APIs

  • buy it with WILD points / tokens supported in our app

  • default end market after 24h after first bet

  • toggle whether your bet trade is a public / private bet

  • tokens are distributed after the betting time expires based on the winning criteria decided by logic of the type of bet ( or for binary option bets, whenever the user selects the answer after the betting time expires )

  • max bet amount ( ? )

high level tasks:

  • request response data structures

  • write models based on that

  • endpoints for all apis

  • convertors for the api requests

  • implement checks for api endpoints according to flow ( privy, get_current_user etc )

  • implement util functions for helping with flow ( oracles, checks, data aggregators, point distributors, market makers etc )

  • implement flow of functions by referencing deposit and point systems

  • write out all queries for get requests

  • testing etc ship


  • priority of the bet types

  • exact flow of them

  • distribute and winner choosing math / mechanism

type 1. multi choice bet:

  • winning type: set by creator or set by “oracle api”

  • every BetOption has it’s own POOL, and BetTrades (users)

  • reward style: linear split

  • after winning option is chosen

    • we merge all the losing pools

    • split winning pool linearly

    • distribute lost points to win points

type 2. binary choice bet:

  • winning type: set by creator

  • every BetOption has it’s own POOL, and BetTrades (users)

  • reward style: AMM mechanism

  • at every bet placed, reward is already decided

    • a * b = k

    • a and b are the liquidity in either of the pools

pool of A = 5000

pool of B = 5000

k = 25M

trade 1:

  • bet A 1000$

  • new pool of A = 6000

  • new pool of B = k / new a

  • reward of trade 1: (old B - new B)

  • todo: check how uniswap takes protocol fees

  • todo: check how you can have more than 2 options with AMM

    • perl pools

    • polymarket


  • set by creator

  • set by oracle

    • / < % change in price of any particular token within x hours

    • social credit

      • which tickets will be traded most

      • which user gets most tips today

      • which ticket gets higher mc today

      • casts liked

      • did cast or not

      • highest scv of these fids ( multi option )

      • which user will get more likes / more followers / more engagement TODAY / specific time period

  • long / short on casts

    • math is same as binary option

    • winner is decided by pool size

    • frontend doesnt show it as “a bet” but as “super upvote / downvote” ( need new terms / design )

    • could be: hold down like button and swipe to select “how much you like it” and let go to be


top level:

  • api reqs to create / end ( only for certain types )

  • store trade expiry

    • this just stops trades coming in after expiry

    • distribution of tokens can happen later ( this can through cron / delayed jobs )

    • ^ execute function based on the bet



class BetType(models.TextChoices): BINARY_CHOICE = “BC”, “Binary” MULTI_CHOICE = “MC”, “Multi-Choice” LONG_SHORT = “LS”, “Long/Short”

class PayoutType(models.TextChoices): LINEAR = “LI”, “Linear” CONSTANT_PRODUCT = “CP”, “Constant Product”

class OutcomeDecider(models.TextChoices): CREATOR = “CR”, “Creator” ORACLE = “OR”, “Oracle” MAX_BETTED_OPTION = “MB”, “Max Betted Option”

bet typepayout type: Linearpayout type: Constant Productoutcome selector: CreatorOracleMax Betted Option
Binary
Multi Choice
Long Short