You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a solution gets settled using a flashloan the settlement contract will not be called directly. Instead a new helper contract (see #3217) will be called which in turn will call settle().
How exactly that will happen depends on the interface of the helper contract. Theoretically it could be as easy as preparing the underlying settle() call and passing the calldata to the helper but it might also be slightly different.
Unknown API details aside encoding the settlement needs to be aware of a few things:
if the solver explicitly returned which flashloan provider to use the driver has use it
if the solver didn't no provide anything the flashloan information can be looked up in the respective orders
if multiple flashloans are required the call will likely have to be wrapped (e.g. executeFlashLoan(executeFlashLoan(settle())) instead of executeFlashLoan(flashLoanDetails[], settlement)) but these details also depend on the exact helper API
the driver is still required to append the auction_id as metadata to the transaction. To not run into encoding issues these bytes need to be added to the end of the final calldata (not at the end of the inner settle() call).
Encoding happens in this function and all the necessary data should already be part of some of the arguments.
helper contract will be in contracts
data for 1 will be in auction.orders
data for 2 should be in solution
Test Plan
Depending on when this issue gets tackled we can either build a complete e2e test or just a unit test`
The text was updated successfully, but these errors were encountered:
the driver is still required to append the auction_id as metadata to the transaction. To not run into encoding issues these bytes need to be added to the end of the final calldata (not at the end of the inner settle() call).
This is not how the #3245 expects it. #3245 expects the auction_id to be at the end of the inner settle() call.
# 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 #3218.
Added a corresponding todo in the tests.
- [ ] A new config which enables the flashloans feature.
## How to test
New driver tests. Backward compatibility is checked with all the
existing and e2e tests.
## Related Issues
Fixes#3216
When a solution gets settled using a flashloan the settlement contract will not be called directly. Instead a new helper contract (see #3217) will be called which in turn will call
settle()
.How exactly that will happen depends on the interface of the helper contract. Theoretically it could be as easy as preparing the underlying
settle()
call and passing the calldata to the helper but it might also be slightly different.Unknown API details aside encoding the settlement needs to be aware of a few things:
executeFlashLoan(executeFlashLoan(settle()))
instead ofexecuteFlashLoan(flashLoanDetails[], settlement)
) but these details also depend on the exact helper APIauction_id
as metadata to the transaction. To not run into encoding issues these bytes need to be added to the end of the final calldata (not at the end of the innersettle()
call).Encoding happens in this function and all the necessary data should already be part of some of the arguments.
contracts
1
will be inauction.orders
2
should be insolution
Test Plan
Depending on when this issue gets tackled we can either build a complete e2e test or just a unit test`
The text was updated successfully, but these errors were encountered: