summaryrefslogtreecommitdiffstats
path: root/lib/openjfx/api-ms-win-core-processthreads-l1-1-0.dll
diff options
context:
space:
mode:
authorKostya <mail@sartin.in>2026-09-07 16:03:14 +0300
committerKostya <mail@sartin.in>2026-09-07 16:03:14 +0300
commit8d7cecd9cf9fb2b0b45607b8efd7ca8f19a89fc6 (patch)
treed88cfe032a7e8f632077ab439cfd0618c1e1421f /lib/openjfx/api-ms-win-core-processthreads-l1-1-0.dll
parent1cf436ccd3efd45d67749102363b9a7f0d242c54 (diff)
downloadguess-market-8d7cecd9cf9fb2b0b45607b8efd7ca8f19a89fc6.tar.gz
guess-market-8d7cecd9cf9fb2b0b45607b8efd7ca8f19a89fc6.tar.xz
guess-market-8d7cecd9cf9fb2b0b45607b8efd7ca8f19a89fc6.zip
service: add sell orders, event lifecycle and order book matching
Carry the order side from the context through risk, the trading mechanisms, fulfillment and settlement, so users can sell shares as well as buy them. The order book now matches priced limit orders from named users, rests any unfilled remainder, and prevents self-trades. In a binary market with minting enabled, a buy can also match a bid on the other option to mint a new YES/NO pair, and a sell can match an ask there to merge a pair back into the pool. LMSR gains a sell that refunds the cost difference from the pool. Add createEvent and openEvent to the catalog. Events start as DRAFT and only take the market maker's subsidy when they are opened, which fails if the market maker can't cover it. Add LocalAccountContext to expose user ledgers. Tighten the risk checks: reject orders from blocked accounts, on events that aren't ACTIVE, and at prices outside (0, d). Sells need enough unreserved shares; buys need enough balance to cover commission and cash already committed to resting bids. Settlement now cancels resting orders, pays out on shares still held rather than shares ever bought, sends order book commission to the market maker, and returns unused LMSR subsidy. Events also track per-user cash flow, so the event detail can list participants with their holdings, fees and P&L next to the order books.
Diffstat (limited to 'lib/openjfx/api-ms-win-core-processthreads-l1-1-0.dll')
0 files changed, 0 insertions, 0 deletions