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 sends flashloan hints #3244

Open
wants to merge 21 commits into
base: driver-fetches-appdata
Choose a base branch
from

Conversation

squadgazzz
Copy link
Contributor

@squadgazzz squadgazzz commented Jan 20, 2025

Description

The follow-up to #3242, which implements #3216 by using the fetched app-data and sending flashloan hints to solver along with the order. The solver then returns a solution with an optionally attached flashloan data. Encoding of this data will be implemented in another PR(#3218).

Changes

  • Driver sends flashloan hints to solvers as part of the auction orders.
  • Solver responds with a flashloan data, which is required to execute the solution properly.
  • New driver tests that check positive scenarios. Currently, it checks for successful responses only since encoding is expected to be implemented only in encode flashloan call in the driver #3218. Added a corresponding todo in the tests.

How to test

New driver tests. Backward compatibility is checked with all the existing and e2e tests.

Related Issues

Fixes #3216

@squadgazzz squadgazzz force-pushed the driver-sends-flashloan-tips branch from 7c64570 to bac86c0 Compare January 20, 2025 12:35
Copy link

Reminder: Please consider backward compatibility when modifying the API specification.
If breaking changes are unavoidable, ensure:

  • You explicitly pointed out breaking changes.
  • You communicate the changes to affected teams (at least Frontend team and SAFE team).
  • You provide proper versioning and migration mechanisms.

Caused by:

Comment on lines +316 to +328
- fullBuyAmount
- validTo
- kind
- owner
- partiallyFillable
- preInteractions
- postInteractions
- sellTokenSource
- buyTokenDestination
- class
- appData
- signingScheme
- signature
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR, but these are required in the code.

@@ -727,6 +779,7 @@ components:
required:
- kind
- order
- executedAmount
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@squadgazzz squadgazzz marked this pull request as ready for review January 21, 2025 11:20
@squadgazzz squadgazzz requested a review from a team as a code owner January 21, 2025 11:20
crates/app-data/src/app_data.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/dto/solution.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/dto/solution.rs Outdated Show resolved Hide resolved
@squadgazzz squadgazzz force-pushed the driver-sends-flashloan-tips branch from 400ebf3 to 4af3c34 Compare January 21, 2025 15:03
@squadgazzz squadgazzz marked this pull request as draft January 21, 2025 15:06
@squadgazzz squadgazzz marked this pull request as ready for review January 21, 2025 18:51
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

Successfully merging this pull request may close these issues.

2 participants