* basic market categories
* use tags to store market category
* display category in market
* display full category
* category selector component on feed
* Move feed data fetching to new file
* Decrease batch size for updating feed to prevent out-of-memory error
* Compute and update category feeds!
* Show feeds based on category tabs
* Add react-query package!
* Use react query to cache contracts
* Remove 'other' category
* Add back personal / friends to feed categories
* Show scrollbar temporarily for categories
* Remove 5 categories, change geopolitics to world
* finance => economics
* Show categories on two lines on larger screens
Co-authored-by: James Grugett <jahooma@gmail.com>
* deduct market ante from profits
* display creator fees in stats
* show creator earnings in stats
* separate out creator, liquidity fees in payouts and deduct from profits
* include creator payout in resolution emails
* deduct liquidity from profits
* hide cost tooltip if daily free market
* deduct market ante from profits
* display creator fees in stats
* show creator earnings in stats
* separate out creator, liquidity fees in payouts and deduct from profits
* Store view counts & last viewed time
* Schedule updating user recommendations. Compute using tf-idf.
* Update contract's lastBetTime and lastCommentTime on new bets and comments.
* Remove contract's lastUpdatedTime
* Remove folds activity feed
* Implement getFeed cloud function
* Hook up client to use getFeed
* Script to cache viewCounts and lastViewTime
* Batched wait all userRecommendations
* Cache view script runs on all users
* Update user feed each hour and get feed from cache doc.
* Delete view cache script
* Update feed script
* Tweak feed algorithm
* Compute recommendation scores from updateUserFeed
* Disable lastViewedScore factor
* Update lastCommentTime script
* Comment out console.log
* Fix timeout issue by calling new cloud functions with part of the work.
* Listen for contract updates to feed.
* Handle new user: use default feed of top markets this week
* Track lastUpdatedTime
* Tweak logic of calling cloud functions in batches
* Tweak cloud function batching
* Add components for CPM landing and charity pages
* Remove misc.ts to fix build
* Set up cloud function for writing txns
* More plumbing for txns
* Fix up API call
* Use Date.now() to keep timestamps simple
* Some styles for charity list page
* Hard code charities data
* Pass charity data to charity page
* Update txn type
* Listen for charity txns
* Handle txn to non-user by burning it
* Read txns for charity card and charity page.
* Set images to object contain
* Clean up txn types
* Move pic to top of card. Other misc styling.
* Update charity short & long descriptions
* Add `token` and `category` to Txn
* Fix breakages
* Show Charity link in the sidebar
* Fix typing issues
* Fix not reading from the right type
* Switch out icon
* Also show Charity icon on mobile
* Update copy
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: James Grugett <jahooma@gmail.com>
* 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
* cfmm migration script
* save dpm shares, pool
* formatMoney: use floor instead of round
* migrate cfmm: use sale amount as shares for sold bets
* migration: make up fake share qty for sold shares
* migration: also convert resolved markets
* migration: don't migrate resolved markets after all
* migration: error checking
* 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.
* 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
* 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>
* Reapply Manifold for Teams config changes
* Add Firebase config for TheoremOne
* Fix build
* Check in Firebase indexes
* Whitelist admins and new users by email
* Fix typo 🤦♂️
* 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>
* script init for stephen dev
* market close emails
* order of operations
* template email
* sendMarketCloseEmail: handle unsubscribe
* remove debugging
* marketCloseEmails: every hour
* 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 custom feed of contracts from folds your follow or have bet on.
* Add tw-elements UI library
* Add loading spinner while feed loads
* Switch from onSnapshot to our listenForValues, which doesn't set with partial cached values
* Change home tags to communities
* Remove tw-elements for now
* 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
* 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