0

I am building a contract from scratch and I was wondering if is possible to do one of the following situations:

  1. Use part of the taxes to reward the lp holders, for instance lets say I have 3% tax and I want to distribute it to all lp holders, just to motivate them to provide liquidity

  2. Automatically create an lp pool for each transaction, this means:

  • I buy 1 eth that is equivalent to 1000 of my tokens
  • I have 10% taxes to make the liquidity stronger
  • I want to use 5% of the eth to exchange it for my token and 5% of eth to create an LP and hold it under the owners account, so it can't be sell

I am struggling to find more details on how these operations work, I understand that AddLiquidityETH works when you want to automate the process of creating the first LP, but I am not sure if I can automate one of the two steps I am proposing in this thread. The second one is highly desirable for me, but I would be happy with the first one

I would appreciate any advice Best regards

1 Answer 1

0

OK, so by reading your question, you are looking to know if these things are possible and for some advice.

  1. This is definitely possible yes! You just write a function into your token contract that does this. You can look at tokens that already does this and take motivation from them. Just keep in mind gas costs.

  2. This is completely possible as well. It can be seen as a variant of the above method but instead of distributing the tokens to holders, it is distributed to an LP pool.

Now to answer the bullet points:

  • I buy 1 eth that is equivalent to 1000 of my tokens - Yes, possible as well. This we call a crowdsale contract where you set a certain rate where users can buy your tokens.
  • I have 10% taxes to make the liquidity stronger - Yes, possible as well. Just code this into your token contract. I would suggest making this a dynamic variable and not fixed so that you can change it at any time.
  • I want to use 5% of the eth to exchange it for my token and 5% of eth to create an LP and hold it under the owners account, so it can't be sell - Yes, possible and already answered above,

Although I do not condone this token or have any relation to it, but if I remember correctly, SafeMoon does all this that you have stated above. So you can fork the token and make the neccesary changes that you want.

Hope this helps!

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.