Skip to content
Discussion options

You must be logged in to vote

Below is the core logic addLiquidity function, Considering the checks in this function, the function will add liquidity using amountBDesired to get the equivalent value needed for amountADesired which should work as that should be the half amount that is remained after the first swap.

 /**
     * 
     * @param tokenA erc20 token that we want to add to the liquidity pool
     * @param tokenB erc20 token that we want to add to the liquidity pool
     * @param amountADesired the amount of tokenA that we desire to add to the liquidity pool
     * @param amountBDesired the amount of tokenB that we desire to add to the liquidity pool
     * @param amountAMin the minimum amount of tokenA that w…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@EngrPips
Comment options

@LanceAddison
Comment options

@EngrPips
Comment options

@LanceAddison
Comment options

@EngrPips
Comment options

Answer selected by LanceAddison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants