Burn and static reflection on every trade functions to include in my smart contract

Hi @Egoleg , welcome to the forums this is quite a complicated and a somewhat philosophical question you are asking.

In your question you say

include a 11% tax on every transactions (4% redistributed to all holders of the token + 7% burned)

But then you say

I would also need a function to prevent from burning the whole supply to 0 cause this a long term project.

This a contradiction. When using a burn address you are making a deflationary token. But because you are using %, it won't ever go to 0 because it's taking less of an amount each time. But the point remains the same, if this is a long term token, then at some point you may reach supply issues. Some tokens opt to have a mint function based on what amount is being burned. It's really up to your vision on what you want to do. Personally I disagree with deflationary and burn tokenomics.

Also is there a special function to allocate a % of the total supply to the founders of the project or should I do it manually at the launch?

This is up to you. When you deploy, where do you want your total supply to go? Does it go all to the owner, as it is typically done, then the owner disperses. Or does it go to holders that you have already decided?

I don’t know how to write those functions properly

Then it's time to learn. Start with the basics of how to implement basic total supply and then experiment with splitting the total supply among a userbase upon deployment. The tutorials are great here and the template ERC20 token has all the functionality you need.

The hot project of the month is SafeMoon, which uses a combination of LIQ and RFI.

It has functionality you are desiring. If you are determined to take a tax and send it directly to the burn address then add a tax that specifically does that, using the RFI mechanisms.

Also read this if you haven't already.

I hope this helps, and if you have specifics on why your function working, or how a function works then we will help answer that.

4 Likes