Repository navigation
Betting Market: drop the user account, correct the parimutuel history - #247
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to the Betting Market chapter.
The user account is gone
quicknode/solana-program-examples#187 removed the per-wallet
Userindex and its 32-position cap. This PR brings the chapter in line:getProgramAccountswith amemcmpfilter), so there is no limit, and citestest_no_cap_on_open_bets_per_wallet.place_bet(): no longer adds the bet to a list.close_losing_bet(): only returns Carol's rent. The reference to the deletedtest_closing_a_bet_frees_a_slot_for_a_new_betis gone.Parimutuel history, fact-checked
Checks
npm run lint,node scripts/check-figure-geometry.mjsandnpm run build-pdfall pass.🤖 Generated with Claude Code
https://claude.ai/code/session_015fQ8KASdfsckQAyGYfezs8
Generated by Claude Code