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

driver fetches flashloan hints for orders #3215

Open
Tracked by #3213
MartinquaXD opened this issue Jan 7, 2025 · 0 comments
Open
Tracked by #3213

driver fetches flashloan hints for orders #3215

MartinquaXD opened this issue Jan 7, 2025 · 0 comments
Assignees

Comments

@MartinquaXD
Copy link
Contributor

MartinquaXD commented Jan 7, 2025

A user is able to create an order with arbitrary metadata by attaching it to the appdata.
To build a system that is easily extensible and doesn't require every piece of metadata that protocol is supposed to understand to the auction we'll make it the responsibility of the driver to fetch the appdata, parse, and understand it.

That means the driver should fetch /v1/app_data/<app_data_hash> for every order and cache them in memory. The content associated with the hash will never change so we only need to worry about evicting entries that didn't get used for a long time (i.e. orders that already got settled).
Also this cache should be shared across all connected solvers as this data is not solver specific.
Finally the cache should not store the raw appdata JSON strings but rather parsed rust structs so that the driver can already use the contained metadata easily.
Fetching the content of missing appdata hashes can probably be done as part of the auction pre-processing (since this is done once per auction for all solvers to share) but please use good judgement to decide on the actual implementation.
Afterwards the parsed AppData should be added to the domain Order struct.

For parsing the AppData the app-data crate should be used. For this issue it's not necessary that the app-data crate already is able to parse the new data. Once that is implemented the driver will be able to parse it right away.

@MartinquaXD MartinquaXD changed the title driver fetches flashloan hints for orders (no dependencies) driver fetches flashloan hints for orders Jan 7, 2025
@squadgazzz squadgazzz self-assigned this Jan 16, 2025
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

2 participants