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: quote both sides of the trade #114

Merged
merged 1 commit into from
Jul 5, 2023
Merged

feat: quote both sides of the trade #114

merged 1 commit into from
Jul 5, 2023

Conversation

marktoda
Copy link
Collaborator

@marktoda marktoda commented Jul 3, 2023

This commit requests a quote from both sides of every trade

This commit requests a quote from both sides of every trade
Copy link
Member

@ConjunctiveNormalForm ConjunctiveNormalForm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one q

// switch tokenIn/tokenOut
tokenIn: getAddress(this.tokenOut),
tokenOut: getAddress(this.tokenIn),
amount: this.amount.toString(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if it matter,s but if we simply re-use the amount, it should be possible for MMs to guess the side of real quote in some cases? for ETH<>USDC, amount=1 almost certainly implies direction is ETH -> USDC right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since its exactOutput the other way, its just as viable of a trade as exactIn with tokenIn/out flipped, no?

@marktoda marktoda merged commit 7d956b0 into main Jul 5, 2023
2 checks passed
@marktoda marktoda deleted the quote-both-sides branch July 5, 2023 14:23
willpote pushed a commit that referenced this pull request Jul 13, 2023
feat: quote both sides of the trade
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.

None yet

2 participants