Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
The pull request successfully simplifies the token deny-listing logic by replacing the complex ListBasedDetector with a lightweight DenyListedTokens struct backed by a HashSet. This change significantly improves performance by making token filtering synchronous and removing unnecessary async overhead and instrumentation. The removal of allowed_tokens and base_tokens from the configuration is consistent with the simplified intervention strategy. No critical issues were found, and the code adheres to the repository's stricter feedback guidelines.
jmg-duarte
approved these changes
Feb 13, 2026
Contributor
jmg-duarte
left a comment
There was a problem hiding this comment.
Approved assuming the HashMap mentioned in the description is replaced with the HashSet that is actually in the code
8a97494 to
690c403
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Originally the orderbook and autopilot tried to detect tokens with unsupported behavior with sophisticated simulations.
Since then we:
Today the only thing we actually make use of is a list of tokens that are actually deny listed. Those should probably be revisited as well but for now I decided to only simplify the code we have today while keeping feature parity.
Changes
ListBasedDetectorinto a simple wrapper around a HashSetThis simplification should also drastically reduce the ~30ms we currently spend on filtering out orders that trade deny-listed tokens.

How to test
existing e2e tests