Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Implement BadTokenMonitor in the driver #3092

Open
MartinquaXD opened this issue Oct 30, 2024 · 0 comments
Open

chore: Implement BadTokenMonitor in the driver #3092

MartinquaXD opened this issue Oct 30, 2024 · 0 comments

Comments

@MartinquaXD
Copy link
Contributor

Background

The driver needs a new component that tries to figure out which tokens are not correctly supported by the driver.
Instead of using a test based on trace_callMany (current approach) we should implement heuristics in the driver that associates reverting solutions with the tokens involved.

If a token occurs very frequently in solutions that fail to simulate the likelihood of it being the cause for it (e.g. by taking fees when the solver doesn't expect it) is very high.
So after the driver encoded and simulated a solution it should associate all involved tokens either with success or failure. If a token reaches a configurable threshold of failures it should be considered unsupported. This is a very simple heuristic and might need to be improved as we go.

Details

Because each solver might support different kinds of tokens we need 1 such component per solver.
The component should have 2 modes: enabled and logOnly. That way we can see how the component would behave without it actually affecting the driver until we are confident it's working well.
Orders trading tokens that are considered unsupported should be filtered out by the driver.
There should be a way to manually specify a list of unsupported and supported tokens as an escape hatch in case the solution causes issues in the future.
The component should initially run in logOnly mode for all solvers.

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

No branches or pull requests

1 participant