Skip to content

Calc amount in/out #44

@Lanskih90

Description

@Lanskih90

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions