Commit Graph

165 Commits

Author SHA1 Message Date
Austin Chen
4c8b7bbc3d Hide buy button when market has closed 2022-03-17 17:15:07 -07:00
James Grugett
addc883440 Track seen contracts in feed. Order feed by seen time priority. 2022-03-17 02:29:19 -05:00
Austin Chen
e4c9508340 Show "Buy" and % directly in FR feed 2022-03-16 21:42:24 -07:00
Austin Chen
94f6f08784 Disable submissions without eating the comment after 1h 2022-03-16 19:55:03 -07:00
Austin Chen
9426cc2b94 Stop showing creator's trades in all cases 2022-03-16 19:37:43 -07:00
James Grugett
4847939e8c Filter out redemption bets from feeds 2022-03-16 17:55:11 -05:00
mantikoros
c183e00d47
Cfmm (#64)
* 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>
2022-03-15 17:27:51 -05:00
Austin Chen
1444d60e11 Visual touchups on FeedAnswerGroups 2022-03-15 13:11:14 -07:00
Austin Chen
f17c4ac40f Fix username link 2022-03-15 12:22:21 -07:00
James Grugett
db7eee495c Answer group feed: Always include answer of last bet. 2022-03-14 19:39:40 -05:00
James Grugett
a82b3577d4 Group older bets by 7-days 2022-03-14 17:11:10 -05:00
James Grugett
7ca0b3662f Small avatars for nested feed items 2022-03-14 16:56:53 -05:00
James Grugett
5524889d48 FR answer group: Choose one outcome for having a comment 2022-03-14 16:39:59 -05:00
James Grugett
f2d26b631d Filter out undefined answer 2022-03-14 16:08:08 -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