- For protocols like Balancer and Curve, which expect funds to be in the router at the time of swap, we must support also transferring funds from the user into the router. Doing this in the router would mean we are dealing with transfers in two different places: in the router main methods and in the executors. To avoid this, we are now performing transfers just in the executors, and two transfer types have been added to support transfers into the router.
TODO:
- Add this for Balancer and Curve (only added for USV4 atm).
- TODO consider renaming TRANSFER_FROM and TRANSFER_PERMIT2 to include "pool" in the name
With this, we don't need the univ3 specific method in the router contract. This should be flexible enough for most protocols that integrate
TODO: is this safe enough??
--- don't change below this line ---
ENG-4411 Took 1 hour 52 minutes
Took 4 minutes
Took 5 minutes
Construct the uniswap v4 specific objects inside the executor
The swap test in the executor alone doesn't work anymore because of the callback data prepended to the rest of he calldata
--- don't change below this line ---
ENG-4222 Took 4 hours 0 minutes
Took 40 seconds