0

I know how to implement a tax/fee on each transaction.

What I'd like to know is where to send the tokens? Is the liquidity pool simply an address I can redirect the taxes to? Do I have to use some Uniswap library?

Thanks!

0

You can't simply add tokens to your pool. A pool always consists of two different assets. If you only add one type of assets, the pool's balance goes wrong and arbitrators will screw it up (assuming the token has enough liquidity).

You should add both of the assets at the same time, at the right ratio. So you need to convert some of the fee tokens to the other asset (even maybe by using your own pool) and then deposit those together.

For the Uniswap interaction you should use the Router contract: https://uniswap.org/docs/v2/smart-contract-integration/trading-from-a-smart-contract/

2
  • Hi Lauri, thanks for the reply. Can you explain what you mean when you say even maybe by using your own pool? – maximedupre May 6 at 20:06
  • Well, nothing stops you from swapping the asset in your own pool - the pool certainly has the other asset you need – Lauri Peltonen May 7 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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