manifold/web/hooks
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
..
use-admin.ts Merge Manifold for Teams infra into main codebase (#61) 2022-03-08 18:43:30 -08:00
use-answers.ts Free response (#47) 2022-02-17 17:00:19 -06:00
use-bets.ts Feed updates: 1. Order by any bet instead of top 10 & comments 2. No resolved contracts 3. Show loading while fetching recent bets clientside so order preserved 4. Don't change order from new bets 2022-02-25 01:59:53 -06:00
use-comments.ts Get static props of just data for feed: active contracts, their bets & comments. 2022-01-14 18:16:32 -06:00
use-contract.ts Merge Manifold for Teams infra into main codebase (#61) 2022-03-08 18:43:30 -08:00
use-contracts.ts Add explore tab on home feed that shows random inactive markets. 2022-02-27 13:37:11 -08:00
use-find-active-contracts.ts Answers in feed (#63) 2022-03-14 15:29:32 -05:00
use-focus.ts Cfmm (#64) 2022-03-15 17:27:51 -05:00
use-fold.ts Show followed folds first 2022-03-13 11:55:05 -07:00
use-preserve-scroll.ts Preserve scroll on back 2022-01-14 18:43:00 -06:00
use-propz.ts Merge Manifold for Teams infra into main codebase (#61) 2022-03-08 18:43:30 -08:00
use-sort-and-query-params.tsx Store users's last sort in localstorage 2022-03-13 14:46:09 -07:00
use-user-bets.ts 🏦 Per-market loans! (#57) 2022-03-01 21:31:48 -06:00
use-user.ts User profile (#44) 2022-02-03 21:04:56 -06:00
use-users.ts Surface user emails in /admin 2022-01-24 00:48:10 -06:00
use-window-size.ts Shorter graph on mobile 2022-01-18 17:10:21 -06:00