Skip to content

Betting Market: drop the user account, correct the parimutuel history - #247

Merged
mikemaccana merged 2 commits into
mainfrom
claude/vibrant-davinci-v85r1n
Oct 4, 2026
Merged

mikemaccana merged 2 commits into
mainfrom
claude/vibrant-davinci-v85r1n

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Two follow-ups to the Betting Market chapter.

The user account is gone

quicknode/solana-program-examples#187 removed the per-wallet User index and its 32-position cap. This PR brings the chapter in line:

  • Bet accounts: the paragraph now describes one account per bet. It says a wallet app lists someone's open bets by filtering bet accounts on the bettor's address (getProgramAccounts with a memcmp filter), so there is no limit, and cites test_no_cap_on_open_bets_per_wallet.
  • place_bet(): no longer adds the bet to a list.
  • Claims: no longer remove an index entry.
  • close_losing_bet(): only returns Carol's rent. The reference to the deleted test_closing_a_bet_frees_a_slot_for_a_new_bet is gone.
  • Failure modes: the Slot exhaustion item is removed.
  • Figures: the account map, place-bets, settlement and Alice's claim figures lose the user-index boxes, and the bet boxes move up into the gap. Alice's claim renumbers its steps from three to two, and its rent-refund arrow follows the moved box. Maria's setup note drops "user-index".

Parimutuel history, fact-checked

  • Oller: devised the mutual system in 1867. His 1865 office ran lottery-style pools.
  • "The tote": marked as the British and Commonwealth name.
  • The 1891 law: cited by its date, 2 June 1891.
  • Spread abroad: Churchill Downs had parimutuel machines by 1878.
  • Prediction markets: Polymarket and Kalshi are no longer called "a similar model". The line now says they also have no bookmaker but match outcome shares on an order book rather than pooling stakes.

Checks

npm run lint, node scripts/check-figure-geometry.mjs and npm run build-pdf all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_015fQ8KASdfsckQAyGYfezs8


Generated by Claude Code

Mike MacCana added 2 commits October 4, 2026 17:35
quicknode/solana-program-examples#187 removed the per-wallet User index,
its 32-position cap, TooManyBets, and slot recycling in
close_losing_bet(). The chapter now says a wallet's open bets are found
by filtering bet accounts on the bettor's address, citing
test_no_cap_on_open_bets_per_wallet; Carol's close_losing_bet() only
returns her rent; the Slot exhaustion failure mode goes. The four
figures lose the user index boxes, the bet boxes move up into the gap,
and Alice's claim renumbers its steps.

Claude-Session: https://claude.ai/code/session_015fQ8KASdfsckQAyGYfezs8
Oller devised the mutual system in 1867 (his 1865 shop ran lottery-style
pools); the tote is the British and Commonwealth name; the 2 June 1891
law banned bookmakers and left authorized pari-mutuel as the only legal
horse bet; Churchill Downs had parimutuel machines by 1878. Polymarket
and Kalshi do not pool stakes: they run order books, so the line says
what they share (no bookmaker) and how they differ.

Claude-Session: https://claude.ai/code/session_015fQ8KASdfsckQAyGYfezs8
@mikemaccana
mikemaccana merged commit 12b9811 into main Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant