* Allow free comments with optional bets
* Send emails for comments without bets
* Refactor to share logic
* No free comments on free response questions
* Minor fixes
* Condense line
* Add legend to free response graph
* Hide answers panel unless resolving. Correctly order answers
* No gray background for add answer & resolve panel. Tweak spacing
* Max answer length 240 chars
* Show answer text in resolution for market page, card instead of number.
* Remove remaining answer #'s. Refactor outcome/resolution labels.
* Move answer panel back up
* Tweak spacing
* Update placement of bet button on mobile for FR answer feed item
* Fix reversed feed for binary markets
* Show multi resolve options
* Clean up unused parts of answer item
* Lighten resolve buttons
* Show answer text in market resolve email
* Revert "Reverting side navbar for now"
This reverts commit a90441d9d5.
* Use padding instead of margin for bg color
* Use a slideout menu on mobile
* Remove "wide" page option
* Stick right sidebar on page bottom
* Darken bg on hover
* Copy in nav from TailwindUI
* Split up nav files
* Hook up sidebar options to the current page
* Tweak padding
* Insert a right sidebar on folds & contracts
* Keep column always centered
* Remove markets and folds from top navbar
* Extract out sidebaricon; link to /about
* Rename to "useFollowedFoldIds"
* Cache followed folds in localstorage
* Remove unused mobile sidebar (for now)
* Remove unused code
* Remove sidebar from landing page
* Tweak resolution panel styling
* Remove the top navbar entirely
* Completely remove the old navbar
* Add "more" and profile link
* Rearrange sidebar ordering
* Remove unused component
* Add Sign In button for logged-out users
* Remove extra options for signed-out users
* Split BuyAmountInput out of AmountInput
* Buy and sell tabs. Compute some sell info
* In progress
* BuyPanel & SellPanel with banner above that shows current shares and toggle button
* Remove "Remaining balance"
* Bring back 'Place a trade'. Tweaks
* Sell shares cloud function.
* Sell all shares by default. Switch back to buy if sell all your shares.
* Cache your shares in local storage so sell banner doesn't flicker.
* Compute sale value of shares with binary search to keep k constant.
* Update bets table to show BUY or SELL
* Fixes from Stephen's review
* Don't allow selling more than max shares in cloud function
* Use modal for sell shares on desktop.
* Handle floating point precision in max shares you can sell.
* Show a top5 leaderboard on resolved markets
* Only show profitable traders
* Include sales in profits
* Copy Leaderboard styling
* Also show the top comment and trade
* Fix padding for solo bets
* Only show both comment & bet if they differ
* cpmm initial commit: common logic, cloud functions
* remove unnecessary property
* contract type
* rename 'calculate.ts' => 'calculate-dpm.ts'
* rename dpm calculations
* use focus hook
* mechanism-agnostic calculations
* bet panel: use new calculations
* use new calculations
* delete markets cloud function
* use correct contract type in scripts / functions
* calculate fixed payouts; bets list calculations
* new bet: use calculateCpmmPurchase
* getOutcomeProbabilityAfterBet
* use deductFixedFees
* fix auto-refactor
* fix antes
* separate logic to payouts-dpm, payouts-fixed
* liquidity provision tracking
* remove comment
* liquidity label
* create liquidity provision even if no ante bet
* liquidity fee
* use all bets for getFixedCancelPayouts
* updateUserBalance: allow negative balances
* store initialProbability in contracts
* turn on liquidity fee; turn off creator fee
* Include time param in tweet url, so image preview is re-fetched
* share redemption
* cpmm ContractBetsTable display
* formatMoney: handle minus zero
* filter out redemption bets
* track fees on contract and bets; change fee schedule for cpmm markets; only pay out creator fees at resolution
* small fixes
* small fixes
* Redeem shares pays back loans first
* Fix initial point on graph
* calculateCpmmPurchase: deduct creator fee
* Filter out redemption bets from feed
* set env to dev for user-testing purposes
* creator fees messaging
* new cfmm: k = y^(1-p) * n^p
* addCpmmLiquidity
* correct price function
* enable fees
* handle overflow
* liquidity provision tracking
* raise fees
* Fix merge error
* fix dpm free response payout for single outcome
* Fix DPM payout calculation
* Remove hardcoding as dev
Co-authored-by: James Grugett <jahooma@gmail.com>
* Compute answer group feed items
* Refactor feed code into 5 files under feed directory.
* Convert to typed ActivityItems
* Use feed "mode". Clean up cases.
* Implement feed answer groups!
* FR: Use nested comments/bets under answers for contract page. filter more items out of FR feed.
* Linkify answer text on activity feed
* Default feed excluded tags are case insensitive
* Show followed folds first
* Allow filtering your trades
* Store users's last sort in localstorage
* Use avatar of user that submitted answer and name instead of pencil icon. Spacing. Show up to 3 comments in asnwer group.
* Don't reveal market creator's bets
* Fix communites feed to be abbreviated
* Remove complicated answer group logic
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
* Add dev target for TheoremOne
* Restrict signups to theoremone.co emails
* Add new indices
* Forbid reads from unauthenticated users
* Client-side render pages that need auth
These pages are now client-side rendered:
- /home
- /leaderboards
- /market/...
- /fold/...
* Hide 404 for private Manifolds
* Brand instance for TheoremOne
* Hide "Add Funds" and "Personalize your feed"
* "M$" => "T$"
* Hide Discord & About Page too
* Update placeholders for teams
* Update firestore.indexes.json
* Switch /analytics to propz
* Migrate per-env code into common/
* More migrations to PROJECT_ID
* Conditionally use SSG depending on public vs private instance
* Fix props to be empty object
* Move more logic into access
* Spin out config files for each environment
* Generify most of the customizable brand stuff
* Move IS_PRIVATE_MANIFOLD to access.ts
* Rename access.ts to envs/constants.ts
* Add "dev:dev" alias
* Rever firestore rules to existing settings
* Fixes according to James's review
* Trim activity feed: show only items from last 24 hours, remove contract description, shorter width.
* Preserve feed ordering based on initial fetch of bets
* Add see more button, description to explore items
* Loan backend: Add loanAmount field to Bet, manage loans up to max loan amount per market -- buy, sell, and resolve.
* Loan frontend: show your loan amount in bet panel, answer bet panel
* Resolve emails include full payout not subtracting loan
* Exclude sold bets from current loan amount
* Handle bets table for loans. Sell dialog explains how you will repay your loan.
* Floor remaining balance
* Fix layout of create answer bet info
* Clean up Sell popup UI
* Fix bug where listen query was not updating data.
* Reword loan copy
* Adjust bet panel width
* Fix loan calc on front end
* Add comment for includeMetadataChanges.
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
* Show bio, banner, and social links on user page
* Minor tweaks
* Allow edits to their user page
* Fix build; add a white ring around users
* From userpage, link to /profile (which is always editable now)
* Update userpage SEO
* Clean up Profile menu
* Fixes according to Stephen's code review
* Answer datatype and MULTI outcome type for Contract
* Create free answer contract
* Automatically sort Tailwind classes with Prettier (#45)
* Add Prettier Tailwind plugin
* Autoformat Tailwind classes with Prettier
* Allow for non-binary contracts in contract page and related components
* logo with white inside, transparent bg
* Create answer
* Some UI for showing answers
* Answer bet panel
* Convert rest of calcuate file to generic multi contracts
* Working betting with ante'd NONE answer
* Numbered answers. Layout & calculation tweaks
* Can bet. More layout tweaks!
* Resolve answer UI
* Resolve multi market
* Resolved market UI
* Fix feed and cards for multi contracts
* Sell bets. Various fixes
* Tweaks for trades page
* Always dev mode
* Create answer bet has isAnte: true
* Fix card showing 0% for multi contracts
* Fix grouped bets feed for multi outcomes
* None option converted to none of the above label at bottom of list. Button to resolve none.
* Tweaks to no answers yet, resolve button layout
* Show ante bets on new answers in the feed
* Update placeholder text for description
* Consolidate firestore rules for subcollections
* Remove Contract and Bet type params. Use string type for outcomes.
* Increase char limit to 10k for answers. Preserve line breaks.
* Don't show resolve options after answer chosen
* Fix type error in script
* Remove NONE resolution option
* Change outcomeType to include 'MULTI' and 'FREE_RESPONSE'
* Show bet probability change and payout when creating answer
* User info change: also change answers
* Append answers to contract field 'answers'
* sort trades by resolved
* Don't include trailing !:,.; in links
* Stop flooring inputs into formatMoney
* Revert "Stop flooring inputs into formatMoney"
This reverts commit 2f7ab18429.
* Consistently floor user.balance
* Expand create panel on focus
From Richard Hanania's feedback
* welcome email: include link to manifold
* Fix home page in dev on branches that are not free-response
* Close emails (#50)
* script init for stephen dev
* market close emails
* order of operations
* template email
* sendMarketCloseEmail: handle unsubscribe
* remove debugging
* marketCloseEmails: every hour
* sendMarketCloseEmails: check undefined
* marketCloseEmails: "every hour" => "every 1 hours"
* Set up a read API using Vercel serverless functions (#49)
* Set up read API using Vercel serverless functions
Featuring:
/api/v0/markets
/api/v0/market/[contractId]
/api/v0/slug/[contractSlug]
* Include tags in API
* Tweaks. Remove filter for only binary contract
* Fix bet probability change for NO bets
* Put back isProd calculation
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: mantikoros <95266179+mantikoros@users.noreply.github.com>
* Set up read API using Vercel serverless functions
Featuring:
/api/v0/markets
/api/v0/market/[contractId]
/api/v0/slug/[contractSlug]
* Include tags in API
* add id, userId to comment
* change user info cloud function and script; move cleanUsername to common
* change user info script
* fix rules
* add fund button: useLocation hook
* profile page
* merge
* profile stuff
* avatar uploading to storage bucket
* changeUserInfo: use transaction
* Styles for profile page
* Edit mode for profile, and more styles
Co-authored-by: James Grugett <jahooma@gmail.com>
* Show a popup for betting on the Activity feed
* Replace the popup with a YES/NO selector
* Autofocus the bet amount
* Hide BetRow when not appropriate
* Make bet modal larger on desktop
* Default to YES if no bet choice has been made yet
* Fold type, fold page, query for fold contracts
* Tsconfig: target esnext, nounused locals: false
* Store tags in field on contract. Script to update contract tags
* Show tags on fold page
* Load all fold comments server-side to serve better feed
* Fix the annoying firebase already initialized error!
* Add links to /edit and /leaderboards for fold
* Page with list of folds
* UI for creating a fold
* Create a fold
* Edit fold page
* Move hot & closing markets to All Markets
Soon to be named "Explore"
* Set up a question box on the homepage
* Show Leaderboards by default instead of Create
* Support full contract creation from homepage
* Force mt-0 on /markets
* Move description into info tooltip
* Add hint to ask a question
* Initialize close date to 1 week from today
* Add a promo section for logged-out users
* Add hashtags, remove mobile padding
* Rewrite promo copy
* Store hotContracts as static props
* Simple leaderboards
* Filter out SG from traders. Center leaderboard. Use Nextjs Image.
* Add leaderboards menu option
* Put leaderboards side-by-side on large screens
* Add medal emoji
* Admin page using gridjs
* Move hook into separate file
* Link to each user's Manifold and Firestore /user entry
* Gate admin access to Austin/James/Stephen
* Don't leak the existence of /admin
* Add a custom 404 page that directs to Discord.
* Fix broken window.location.href on NextJS server
* initial commit
* antes
* rename path, compute to contractPath, contractMetrics
* merge
* Include antes as bets; more calculations
* fees on estimated winnings
* mkt payout calculation
* contract: remove startPool, add phantomShares
* Merge branch 'main' into new-dpm
* dpm migration script
* my service account
* Tracks all market activity on a single page
* Support both global and per-contract feeds
* UI tweaks
* Include contract description in activity feed
* Show activity feed on Create page
* new logo
* Switch out mantis for crane in logos
* White svg on dark background. Align correctly on landing page.
* Mobile navbar: hide your name, write out Manifold Markets
Co-authored-by: mantikoros <sgrugett@gmail.com>
* Run OpenGraph server on dev port 3001
* Cut '%' since frontend already passes it
* Use the generated card in markets
* Rename to ogCardProps
* Don't show creator avatar url, for now
* Remove bad comment
* Start customizing opengraph image
* Fix cover image size to 1200x630
* Design a text-based, dynamic preview card
* Load designed html into template.ts
Remove twemoji for now too
* Take in params to configure Manifold card
* Switch back to hardcoded png for default case
* basic working payments
* Select funds amount and prettier funds button / dialog
* Add funds page and nav menu option
* Format funds amount. Use ghost button for back.
* Add mantic dollars description
* Improve styles of add funds page
* about styling
* change faq => about
* change default font to Courier
* header sign out menu item; remove user card
* keep logo font
* fix header issue
* stripe webhook: handle repeat events
* Make add funds button a gradient
* add funds referer url
* Fix add funds page after merge
* Slight VisD tweaks
* Update add funds button position. Mantic => Manifold
* Remove Add funds menu option for now.
* Set up product ids and endpoint for stripe prod
* Swap back order in profile menu
Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
* Preview a slimmed-down version of /Create
* Rework dropdown to be on bottom
* Parse the close time as just before midnight
* Prevent invalid contracts from being created
* Prevent trading after contract has closed
* sell bet
* dev mode
* single-pot no-refund payoff; bet selling
* Increase default fetch size 25 -> 99
* Fix about page numbering
* Don't flash no markets when loading on tag page.
* Change Title to use body font
* Make a bunch of predictions at once (#9)
* Set up a page to make bulk predictions
* Integrate preview into the same card
* List created predictions
* Make changes per James's comments
* Increase the starting balance (#11)
* Remove references to paying for our Mantic Dollars
* Update simulator to use new calculations
* Change simulator random to be evenly random again
* Sell bet UI
* Migrate contracts and bets script
* Add comment to script
* bets => trades; exclude sold bets
* change sale formula
* Change current value to uncapped sell value.
* Disable sell button while selling
* Update some 'bet' to 'trade'
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: jahooma <jahooma@gmail.com>
* Run prettier
* Fix package-lock
* Use an off-white background, darker text
* Use indigo for headings instead of green
* Add box shadows to all cards
* Remove unused component
* Extract out a title component
* Fix typo
* Add Firestore package and config
* Upload basic Firebase Auth code
* Basic ability to sign in and view profile
* Move html head content to Next's _document
* Apply dark theme to all DaisyUI components
* Add contract page
* Smaller width bet input
* Allow users to create new contracts
* Add back listenForContract
* Add some buttons
* Add Row, Col, and Spacer components
* Implement skeleton ContractPage
* Apply dark theme to all DaisyUI components
* Fix hooks lints (#3)
* Add background to bet panel
* Sort contracts by creation time
* Link to market creation from header
* List your markets on account page
* Set fullscreen black background
* Correctly set seeds on new contracts
* Code cleanups
* Gratuitously cool font
* Add creator name, fix ordering
* Use Readex Pro as body font
* Fixes according to code review
Co-authored-by: jahooma <jahooma@gmail.com>
* Add Firestore package and config
* Upload basic Firebase Auth code
* Basic ability to sign in and view profile
* Move html head content to Next's _document
* Apply dark theme to all DaisyUI components
* Add contract page
* Smaller width bet input
* Add some buttons
* Add Row, Col, and Spacer components
* Implement skeleton ContractPage
* Apply dark theme to all DaisyUI components
* Fix hooks lints (#3)
* Add background to bet panel
* Changes based on review comments
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
* Preview bid results; toggle bid type
* Code cleanup: move hooks to where they're used
* Extract header to separate component
* Fix & reactify according to James's review
* Remove unnecessary useMemo
* Hack Chartjs type
* Add some notes on DX Todos
* Move non-page elements to lib/