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

feat: added min residual token transfers for A & B tokens #5

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

Conversation

NelsonGaldeman
Copy link
Contributor

@NelsonGaldeman NelsonGaldeman commented Jan 17, 2023

The transferResidual can be based on an amount, like transferResidualMinTokenA and transferResidualMinTokenA, and if the token residual is higher than the specified amount send the residual to the swap executor. This is better than using a boolean and having to estimate the transfer residual that will be left, with this you can specify and only do it when you know you won't spend more gas on the residual transfer than needed. Also, the transferResidual is not tested.

…of boolean

Allows the dapp to decide if the extra gas on the transfer is worth over the residual tokens value by setting a minimum
contracts/Zap.sol Outdated Show resolved Hide resolved
@NelsonGaldeman
Copy link
Contributor Author

Thanks for the reviews guys, once #4 is merged I'll rebase and merge this one too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants