I am trying to add a burn function into the reflect finance code - trying to burn x% and redistribute y%. I made a small edit to the transfer function and I feel it should work. Could you please look at this and let me know if I am missing something:
function transfer(address recipient, uint256 amount) public override returns (bool)
uint burnAmt = amount.mul(_burnFee)/100; // calculate the burn Amount
_transfer(_msgSender(), recipient, amount.sub(burnAmt)); // in current reflect code
_tTotal -= burnAmt; // reducing the total supply by burn amount. For this I had to make the tTotal number not constant
Transfer (_msgSender(), address(0), burnAmt); // tranferring burn amount to a zero address
This is my question too, Because, Due to the definition Total Supply is the current amount of a cryptocurrency that has already been mined or created. Unlike circulating supply, coins are not required to be available for use. This number also removes any coins that have been knowingly burned or destroyed. So, in rate calculation formula we should subtract that X% from tTotal ..
And I think after that we come up with a new formula ..
I do not think this can be done as easily as you did. As you know, even in a project like Safemoon, Tokens are not really burned. Rather, they are transferred to an address that also receives a profit.