-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Ekubo Integration #126
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Ekubo's callbacks be directly integrated into TychoRouter.sol
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this PR!
Regarding this:
Should Ekubo's callbacks be directly integrated into TychoRouter.sol?
This is discouraged if you can make the callback work with the handleCallback
method in the executor - which seems to be the case here. No changes to the main TychoRouter
necessary.
Could you please update your branch with the main branch - we have recently pushed a fix that should make CI run properly in external contribution PRs now.
Other than this - I would recommend to add an integration test on for the executor contract which uses data encoded by the swap encoder. Would it be possible for you to add one for the EkuboExecutor
? See simple examples here:
testSwapIntegration
in BalancerV2ExecutorTest
testMultipleSwapIntegration
in UniswapV4ExecutorTest
Slightly related: Do I need the direct callback implementations on the executor itself (
Done, but seems like there are still issues. |
You're right to point out that the executor will only be callable through One thing that I'd like to double check - does this work through the router? We need to make sure the callback data starts with the executor address in that case:
I'll take over this PR to double check this - thanks! About the CI - this should be fixed soon, we are working on this internally. |
I just noticed that the executor doesn't use permits to pay Ekubo Core. |
Sure - that would be a big help! |
Nevermind, I see that the router uses the permit to transfer tokens to itself before calling the executor's swap function. |
In conjunction with propeller-heads/tycho-protocol-sdk#172 and propeller-heads/tycho-simulation#173