SafeMoon rOwned and tOwned pool?

Looking at SafeMoon.sol contract here https://github.com/safemoonprotocol/Safemoon.sol/blob/main/Safemoon.sol. There are 2 ownership maps rOwned and tOwned depends on if the wallet address is excluded or not. It seems to need to maintain certain ratio between the 2 for transfer and liquidity.

tOwned is out of 1E24 total supply of SafeMoon Token.
rOwned is out of the remainder of uint256Max - 1E24.

Does it mean the token’s owner (dev) owns all of remainder? Why do they need to maintain these 2 different maps? Thanks

Yes, when the contract is deployed (safemoon clones) the tokens go directly to the holder by default. Then the dev usually does dxSale or locked liquidity. That’s the current trend. You could set the owner to something else using the below code

_rOwned[_msgSender()] = _rTotal;
is really
_rOwned[ADDRESS_THAT_GETS_THE_TOKENS] = _rTotal;

1 Like

Thanks for this thread @jirosaito and your reply, @Yoshiko . I’m finally able to piece together what these two mappings are trying to convey.

Anybody know what the t and r in front of them mean/stand for?
reflectionTotal and taxTotal, maybe? Or am I incorrect in assuming that?

1 Like

Looking at the .sol file I would guess
t stands for take
r stands for reflect

1 Like

Reading the code seems like _tOwned is to maintain excluded addresses (contract and owner), from reflection fees. But owner's address receive _rTotal amount to _rOwned at first, in constructor.

_rOwned[_msgSender()] = _rTotal;

where _rTotal is:

uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1000000000 * 10**6 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));

What is the purpose of giving a great amount of tokens to owners at first, but keep them excluded from fees/refection (basically the benefits from transfer)?
Does it happen to ensure a great amount to owners, in order to be able to burn, provide liquidity or sell in the future?