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

Calc amount in/out #44

Open
Lanskih90 opened this issue Mar 18, 2024 · 0 comments
Open

Calc amount in/out #44

Lanskih90 opened this issue Mar 18, 2024 · 0 comments

Comments

@Lanskih90
Copy link

Hi,
How can I calculate in a contract the amount of Token 1, how much do I need to give to get 1000 Tokens 2 ?
For example, I want to buy in the pool WETH/USDC - 3 WETH, how can I calculate the exact amount USDC that I need to pay?
I looked through DODO v2 contracts and didn't find such a function... UniswapV2 has functions getAmountIn and getAmountOut for this, perhaps DODO v2 has similar functions?

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

No branches or pull requests

1 participant