Commit Graph

114 Commits

Author SHA1 Message Date
James Grugett
54221f623c Merge branch 'main' into server-feed 2022-04-30 10:15:44 -04:00
Austin Chen
a6de0ec695 Add missing charity logos 2022-04-30 08:09:57 -04:00
Marshall Polaris
17b5345d82
Fix HTTP charity logo links (#113) 2022-04-30 07:44:11 -04:00
Sinclair Chen
73fc67955d
Send M$ to Charity & txns (#81)
* 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>
2022-04-29 19:35:56 -04:00
James Grugett
10e5916dc6 Merge branch 'main' into server-feed 2022-04-29 17:19:51 -04:00
mantikoros
5cb6ee3bca daily free markets' liquidity provided by @ManifoldMarkets 2022-04-29 15:58:01 -04:00
mantikoros
5f86637ca5 raise ante to M$100 2022-04-29 15:53:13 -04:00
James Grugett
39ebf79978 Remove contract's lastUpdatedTime 2022-04-28 00:46:29 -04:00
James Grugett
f357b6e92e Update contract's lastBetTime and lastCommentTime on new bets and comments. 2022-04-28 00:45:36 -04:00
James Grugett
57fb9baed6 Schedule updating user recommendations. Compute using tf-idf. 2022-04-27 21:27:31 -04:00
mantikoros
bfbcde4dfc remove fees for sold shares 2022-04-22 12:26:47 -05:00
mantikoros
a7c422e69e change ante to M$ 50 2022-04-21 12:59:12 -05:00
mantikoros
004969aa66
user-added liquidity provision panel (#90)
* user-added liquidity provision panel

* AddLiquidityPanel: handle loading, errors

* ContractInfoDialog: don't show add liquidity when market is closed

* ContractInfoDialog: hide add liquidity for FR
2022-04-21 12:58:12 -05:00
James Grugett
1af0740f10 Fix explore on dev 2022-04-21 12:43:57 -05:00
Boa
7b70b9b3bd
Free comments (#88)
* 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
2022-04-21 11:09:06 -06:00
James Grugett
7847a9e781 Track latency of feed and portfolio page. 2022-04-21 01:00:08 -05:00
James Grugett
01e43abd17 Add factors to weight new contracts higher, contracts with unseen comments, and contracts with prob closer to 50% 2022-04-20 16:37:01 -05:00
James Grugett
3c6369726e Add weekly activiation rate 2022-04-19 01:47:58 -05:00
James Grugett
280ae97070 Track clicks from feed 2022-04-19 00:16:08 -05:00
James Grugett
9c74f88b4a
Improve Free response UI (#78)
* 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
2022-04-18 18:02:40 -05:00
mantikoros
7abc11c146 getInitialProbability: use totalShares to calculate prob for ported contracts 2022-04-18 17:15:25 -05:00
mantikoros
790aec9baf
Cfmm migration (#80)
* 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
2022-04-18 17:02:53 -05:00
James Grugett
8a59ab3180 Tweak current investment calculation 2022-04-13 22:28:29 -05:00
James Grugett
2a3593c269 Fix profit calculation for dpm sales 2022-04-13 20:42:47 -05:00
James Grugett
bfb708d477 Fix profit calculation for cpmm sales. Change totalValue to investment value excluding sales 2022-04-13 17:25:32 -05:00
James Grugett
6ac361fdb9 Fix lodash import for cloud functions 2022-04-13 12:44:47 -05:00
James Grugett
ec49a73c74
Algo feed (#77)
* Implement algo feed

* Remove 'See more...' from feed items

* Fix problem with useUpdatedContracts.

* Tweak some params
2022-04-09 18:10:58 -05:00
mantikoros
2fe71731e4 create: fixed ante of $100 2022-04-09 13:51:22 -05:00
James Grugett
619644d6dd Run binary search until max precision 2022-04-05 16:00:26 -05:00
James Grugett
feb276ccfa Defensive break in binary search 2022-04-05 15:16:51 -05:00
James Grugett
f749eb1df8 Log views of contracts in feed 2022-04-04 22:28:38 -05:00
mantikoros
18bba89507 raise min ante to M$50 2022-04-04 10:47:29 -05:00
James Grugett
5dcd43f5b2 Refactor tricky bet calculations to one function 2022-04-03 14:48:53 -05:00
James Grugett
ce76a9754b Fix sell to pay back loans 2022-03-31 00:54:42 -05:00
James Grugett
80fe88a68a Constrain possible sell solutions by the size of the opposite sell pool. 2022-03-29 22:12:21 -05:00
James Grugett
3eb0bb1711 Throw error if sell conditions don't hold 2022-03-29 21:30:04 -05:00
James Grugett
ed5f69db7a
Sell shares panel (#69)
* 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.
2022-03-29 14:56:56 -05:00
Austin Chen
419a3106e8 Revert "Format large money amounts with 'k' and 'm'"
This reverts commit b7d39eaafd.
2022-03-25 15:54:15 -07:00
Austin Chen
b7d39eaafd Format large money amounts with 'k' and 'm' 2022-03-25 15:31:46 -07:00
James Grugett
7d8a87615a Embed market: dynamically adjust graph height 2022-03-24 12:03:17 -05:00
James Grugett
69e142e279 Make volume a non-optional field of contract 2022-03-23 00:09:47 -05:00
James Grugett
6b61d7209d Compute volume for contracts. Show volume instead of liquidity for cpmm. 2022-03-22 23:49:15 -05:00
Austin Chen
087e5f89fd Revert "formatPercent: always show at least one sig fig"
This reverts commit ae0cb4fc8c.
2022-03-22 16:53:23 -07:00
James Grugett
09da7fcb7c Add weekly active users chart. Put daily active first. 2022-03-21 17:42:12 -05:00
mantikoros
075804bb70 Revert "formatPercent: only show decimal to at most 2 places"
This reverts commit aebb4c5483.
2022-03-19 12:32:22 -05:00
mantikoros
aebb4c5483 formatPercent: only show decimal to at most 2 places 2022-03-19 12:30:30 -05:00
mantikoros
ae0cb4fc8c formatPercent: always show at least one sig fig 2022-03-19 11:23:01 -05:00
Austin Chen
d6a751d9a2 Show decimals on 98%+ 2022-03-18 20:02:04 -07:00
Austin Chen
7d5d945a20 Show 1 decimal point on probability tails 2022-03-18 19:12:50 -07:00
James Grugett
2937c0d891 Fix free response mkt payout to default to last probabilities if resolutions not specified 2022-03-18 14:59:06 -05:00