1

This is about Uni V2 pools.

So usually we call the function addLiquidity to add liquidity, but the function decides how many tokens should be added depending on the reserves.

What if we directly send the tokens? How does that not affect the price of token.

Suppose the liquidity is 1000: 1000 for two tokens, token1, and token2 and suddenly I sent 10k token2 using a normal ERC20 transfer, how does this not affect the price?

2 Answers 2

2

Uniswap V2 is using the reserve amounts for calculation, not token balances. When you send the tokens directly to the pool's address, uniswap actually does not know you are doing this, because you are interacting with the token contracts, not uniswap's contracts, i.e. updating your balance and the balance of the pool's address in the token contract.

1
  • Does that mean, if someone sends tokens to uniswap pool without calling addLiquidity, then those tokens are locked forever? Because there's no track for those? Commented May 10 at 6:40
1

Transferring tokens directly won't effect the price until you call either the sync or mint functions. That will update the reserves which will update the price.

That's ultimately how the token swaps effect the price anyway.

3
  • Does that mean, if someone sends tokens to uniswap pool without calling addLiquidity, then those tokens are locked forever? Because there's no track for those? Commented May 10 at 6:40
  • You can send the tokens and use the mint function, which will mint your your LP tokens. But if you call sync, then it just updates the pool status and there is no way to remove that liquidity.
    – CathalMF
    Commented May 10 at 13:44
  • However most likely, if you send tokens directly to the Pool on mainnets they will automatically get removed by bots using the Skim function. The skim function removes any tokens which dont match the balance of the pools.
    – CathalMF
    Commented May 10 at 13:45

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.