Commit Graph

94 Commits

Author SHA1 Message Date
mantikoros
eaab8191e3 fix dpm free response payout for single outcome 2022-03-15 16:05:52 -05:00
James Grugett
03ca84082a Merge branch 'main' into cfmm 2022-03-15 00:34:02 -05:00
mantikoros
64bde33f0d raise fees 2022-03-14 22:29:12 -05:00
mantikoros
f8db70f89b liquidity provision tracking 2022-03-14 22:26:04 -05:00
James Grugett
93287f8dc1
Answers in feed (#63)
* 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>
2022-03-14 15:29:32 -05:00
mantikoros
941d66b34c enable fees 2022-03-14 12:14:16 -05:00
mantikoros
f7c6688d4f correct price function 2022-03-14 11:50:28 -05:00
mantikoros
dce7639573 addCpmmLiquidity 2022-03-14 00:58:43 -05:00
mantikoros
062d4f88fd new cfmm: k = y^(1-p) * n^p 2022-03-11 16:04:08 -06:00
mantikoros
beedbed6ff set env to dev for user-testing purposes 2022-03-10 16:32:58 -06:00
mantikoros
48df0ac7ce calculateCpmmPurchase: deduct creator fee 2022-03-10 16:05:49 -06:00
James Grugett
c1a800f4c6 Fix initial point on graph 2022-03-10 15:58:44 -06:00
mantikoros
82b66a8d53 small fixes 2022-03-10 15:05:52 -06:00
mantikoros
8df7b0fbe6 Merge branch 'main' into cpmm 2022-03-10 15:02:30 -06:00
mantikoros
6b30ed4513 track fees on contract and bets; change fee schedule for cpmm markets; only pay out creator fees at resolution 2022-03-10 14:55:23 -06:00
mantikoros
b550bbe07d formatMoney: handle minus zero 2022-03-09 23:17:26 -06:00
mantikoros
3145966a3c share redemption 2022-03-09 11:35:21 -06:00
James Grugett
79bd299b68 Enforce max question length, description length, and tag length. 2022-03-09 11:08:57 -06:00
Austin Chen
da4ce99755
Merge Manifold for Teams infra into main codebase (#61)
* 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
2022-03-08 18:43:30 -08:00
mantikoros
ede0c0b397 turn on liquidity fee; turn off creator fee 2022-03-08 12:19:38 -06:00
mantikoros
d1b510c720 Merge branch 'main' into cpmm 2022-03-08 11:45:30 -06:00
mantikoros
1dfc108ae4 store initialProbability in contracts 2022-03-08 11:41:22 -06:00
mantikoros
4a0db10b20 use all bets for getFixedCancelPayouts 2022-03-08 11:32:03 -06:00
mantikoros
b05c4da0f2 liquidity fee 2022-03-07 17:49:55 -06:00
James Grugett
fe98a61e43 Fix leaderboard out of memory error with batchedWaitAll instead of Promise.all 2022-03-07 13:45:56 -08:00
James Grugett
ff92338873 Fix multi payout calculation! 2022-03-07 13:15:12 -08:00
mantikoros
5fe40786ca remove comment 2022-03-07 11:33:17 -06:00
mantikoros
845aefa6a8 liquidity provision tracking 2022-03-07 11:29:58 -06:00
mantikoros
9c5478d3d5 separate logic to payouts-dpm, payouts-fixed 2022-03-04 18:31:04 -05:00
mantikoros
a315f6d841 fix antes 2022-03-04 10:58:15 -05:00
mantikoros
660597f10b use deductFixedFees 2022-03-03 12:19:18 -05:00
mantikoros
a7e7fc0c90 getOutcomeProbabilityAfterBet 2022-03-03 12:06:24 -05:00
mantikoros
f40a65cc88 new bet: use calculateCpmmPurchase 2022-03-03 11:56:21 -05:00
mantikoros
f06ec7a170 calculate fixed payouts; bets list calculations 2022-03-03 11:40:10 -05:00
mantikoros
89f020ffcc use new calculations 2022-03-03 00:32:33 -05:00
mantikoros
61f30d4ab9 mechanism-agnostic calculations 2022-03-03 00:01:39 -05:00
mantikoros
42577b20a9 rename dpm calculations 2022-03-02 22:30:07 -05:00
mantikoros
e80926d201 rename 'calculate.ts' => 'calculate-dpm.ts' 2022-03-02 22:20:35 -05:00
mantikoros
b05d8b3d3c remove unnecessary property 2022-03-02 16:25:00 -05:00
mantikoros
a9ccca6458 Merge branch 'main' into cpmm 2022-03-02 16:22:16 -05:00
mantikoros
f830119023 cpmm initial commit: common logic, cloud functions 2022-03-02 16:12:27 -05:00
James Grugett
9e9535ce56 Subtract loans from leaderboard calculations 2022-03-01 21:23:37 -08:00
James Grugett
985cdd2537
🏦 Per-market loans! (#57)
* 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>
2022-03-01 21:31:48 -06:00
Austin Chen
8987a02975
Reapply Manifold for Teams config changes (#54)
* 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 🤦‍♂️
2022-02-26 23:29:33 -08:00
Austin Chen
492f777d0b Revert "Manifold for Teams: Support different Firestore dbs (#53)"
This reverts commit ebed7c15c0.
2022-02-26 22:19:16 -08:00
Austin Chen
ebed7c15c0
Manifold for Teams: Support different Firestore dbs (#53)
* Add Firebase config for TheoremOne

* Fix build

* Check in Firebase indexes

* Whitelist admins and new users by email
2022-02-26 22:08:50 -08:00
James Grugett
cb7c8ba7c2 Send email to market creator on new answer 2022-02-23 00:05:04 -06:00
James Grugett
7522b6af3c Send emails for new comments on markets you commented on or created. 2022-02-22 20:35:07 -06:00
James Grugett
fd846254a0 Implement resolving to multiple answers, weighted by probability 2022-02-20 01:26:33 -06:00
Austin Chen
a17342e55c
New, pretty user page (#48)
* 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
2022-02-17 17:16:58 -08:00