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

ENG-3406: Add new bytes parameter to swap #64

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

PierreMkt
Copy link
Contributor

@PierreMkt PierreMkt commented Aug 11, 2024

This allows arbitrary data to be passed.
But it breaks the SDK so it needs to be merged alongside:

PierreMkt and others added 5 commits August 5, 2024 14:23
when encoded fee reduction flag is passed we reduce the fee percentage, execute the swap, then revert the fee reduction.
TODO: setting the reduced fee percentage needs to be done from the cowswap gpv2 contract
-Move fee reducing logic before calculating the getSellAmount if the order is Buy
-Move limit and kind variables inside _executeSwap. Otherwise stack is too deep in swap function
-reset adapter allowance before increasing it. Otherwise the allowance risks overflowing.
-Use vm.etch to assign the adapter code to the cowswap GPv2 address. This is needed because only the GPv2 contract can modify the swap fee.
compare amount out and gas usage with or without fee reduction
@PierreMkt PierreMkt self-assigned this Aug 11, 2024
PierreMkt and others added 2 commits August 16, 2024 15:37
add HardLimits to balancer capabilities
…reduction

ENG-3408: Balancer fee reduction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants