Adding burn in reflect finance code

Hi All
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

return true;
}

I do not have a full source code, so I am not sure for your function _transfer(), and what does the variable _tTotal mean? Does it just mean the total supply?

Thank you for your response.

Yes _tTotal means total supply.

The entire source code for reflect finance is at https://github.com/reflectfinance/reflect-contracts/blob/main/contracts/REFLECT.sol

It is tough to read since there are no comments.

Hi,
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 ..

Check this:

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.