Repository navigation
Say plainly that deepening the critbit tree only adds a minor cost - #171
Merged
Merged
Conversation
The paragraph said a doubling-price attacker grows a path by a level per order, which reads as unbounded. The key sets the ceiling: prices fill its top 64 bits, so they can add at most 64 levels, and at that depth an insert, fill, or cancel costs under 15,000 extra compute units. The two companion tests that prove it join the chapter's test list. Claude-Session: https://claude.ai/code/session_01RQ5RZgoQjVK36qSjqUSq6X
mikemaccana
force-pushed
the
claude/peaceful-tesla-k0gp10
branch
from
September 23, 2026 03:07
8c10530 to
2306654
Compare
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.
Deepening the order book's tree is cheap for everyone else. An attacker can place asks at doubling prices to make one path 64 levels deep, but no deeper. At that depth, each insert, fill, or cancel costs under 15,000 extra compute units, out of a default budget of 200,000 per instruction. The attack makes some transactions slightly more expensive. It can't make them fail.
The paragraph now says exactly that, in 46 words instead of 147:
The two companion tests that measure it join the chapter's test list:
doubling_prices_build_the_deepest_path_prices_allowanddeepest_path_adds_little_compute_to_insert_fill_and_cancel.Merge after quicknode/solana-program-examples#164, which adds those tests.
npm run lint,node scripts/check-figure-geometry.mjs, andnpm run build-pdfall pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01RQ5RZgoQjVK36qSjqUSq6X