Repository navigation
feat(bench): the first capture where both venues quote the same event - #71
Merged
Merged
Conversation
RequestIsSafeUnderConcurrentPublishAndDrain asserted served > 0: that at least one of 20,000 request() calls found a value in the slot. The drainer in the same test is a tight loop emptying that slot, so the assertion is a statement about scheduling, not about the code under test. It passed 200 consecutive local runs and failed once in CI under the BDE allocators on a loaded runner. Nothing is lost. That request() returns a present value is pinned deterministically by RequestReturnsTheCurrentValueWithoutSubscribing, and the assertion this test exists for - requests_served + requests_denied equals the number of calls made - is unaffected by who wins the race. A test that reddens the build at random teaches you to ignore red.
Ships a 23.6-minute cross-venue capture of the September 2026 FOMC decision on Kalshi and Polymarket, and the hand-paired registry it needs. This is the first capture in the repo that uses Kalshi's live feed at all: the adapter existed for months without ever connecting, and the first time it did, its books came back empty. The pairing is by hand because contracts-live.toml says it has to be - matching an outcome across venues is a judgement about resolution wording, and a wrong pairing poisons every number downstream. Each Kalshi outcome and its Polymarket question resolve on the same meeting and both close 2026-09-16. The prices corroborate it rather than merely permitting it: Kalshi's hold contract quoted 0.48/0.49 against Polymarket's 0.495. The result worth having is negative. On the hold contract the raw books cross on 1,383 of 2,328 two-sided updates, 59.4%, mean edge at the touch $1,083.49 - and every one of them loses money once Kalshi's taker fee is charged. The fee-aware sweep, free to take part of a crossed book, declines all 1,383. A naive scanner would report a 59% arbitrage rate on this feed. The caveat is bigger than the result and the doc leads with it: 59.7% of those samples were priced against a quote over 5 seconds old, because 218 Kalshi records in 23.6 minutes is not enough for both books to be fresh at once. An unknown share of the crossing is a stale-quote artifact. That does not change the fee conclusion, but it does mean this capture cannot support a claim about how often the venues genuinely cross, and it does not make one.
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.
Ships a 23.6-minute cross-venue capture of the September 2026 FOMC decision on
Kalshi and Polymarket, plus the hand-paired registry it needs.
This is the first capture in the repo that uses Kalshi's live feed at all.
The adapter existed for months without ever connecting, and the first time it
did, its books came back empty (fixed in #69).
The pairing is by hand
contracts-live.tomlleaveskalshiempty on purpose - matching an outcomeacross venues is a judgement about resolution wording, and a wrong pairing
poisons everything downstream. Each Kalshi outcome and its Polymarket question
resolve on the same meeting and both close 2026-09-16. The prices corroborate
it: Kalshi's hold contract quoted 0.48/0.49 against Polymarket's 0.495.
The result is negative, which is why it is worth having
On the hold contract the raw books cross on 1,383 of 2,328 two-sided
updates (59.4%), mean edge at the touch $1,083.49. Every one loses money
after Kalshi's taker fee:
A naive cross-venue scanner would report a 59% arbitrage rate on this feed.
The caveat is larger than the result
59.7% of those samples were priced against a quote over 5 seconds old,
stalest 60.8s. 218 Kalshi records in 23.6 minutes is not enough for both books
to be fresh simultaneously, so an unknown share of the crossing is a
stale-quote artifact.
That does not change the fee conclusion, but it means this capture cannot
support a claim about how often the venues genuinely cross - and the doc does
not make one. Lead-lag is reported as no signal for the same reason: 525
Kalshi moves, 0 confirmed follows, which at this update rate is absence of
data rather than absence of effect.