I don't understand, smb explain me how to work amountIn and amountOut?

For example:

I have 10bnb, I want to another token for 1 bnb, it means amountIn = 1bnb I understand it. But, I can't understand amountOut, It means, amountOut = price of other token or it 1bnb/price token

1 Answer 1


Check the uniswap documentation https://docs.uniswap.org/protocol/V2/reference/smart-contracts/router-02#swapexacttokensfortokens, PancakeSwap uses Uniswap v2 contract so the same documentation applies.

Given an input to calculate the expected output you could call getAmountsOut.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.