0

When I add liquidity to my contract via a Uniswap V2 router, the router creates an LP token with the full set of functionalities.

Is it possible to create a subset of Uniswap V2 functionalities with Uniswap V2 router for the LP token so as to lower this transaction fee? Possibly by embedding the Uniswap V2 router in the contract itself.

I was inspired by this contract code that I happened to chance upon, as I can see the contract embeds the Uniswap V2 router LP token creation. When liquidity was added, it resulted in very low tx fees ($0.70) as can be seen from here liquidity add as compared to ~$10 normally. However, I believe that Uniswap V2 LP token creation cost was paid during the contract creation as the tx fee is really high as seen from here contract creation.

1 Answer 1

0

No, unfortunately adding liquidity for the 1st time to a contract does indeed deploy a new UniswapV2Pair contract for which you have to pay the gas fee. And you indeed guessed right, embedding the pair creation in the token contracts constructor just shifts the cost of creating that UniswapV2Pair contract from the 1st liquidity adding to the token contract deployment, so you'll end up paying those fees anyway.

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.