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:
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: