2

I'm trying to understand smart contracts. Now I do understand the basic template. However, many token's I see on the internet use different code. Many of them have a different way of storing balances and supply. Example: https://github.com/HogeFinance/token/blob/main/contract.sol. In this contract you see the supply is kept in these 2 lines

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

and balances are kept in these 2 lines

mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;

What does the t and r stand for and why do they use 2 variables?

Skywalker
  • 51
  • 3

0 Answers0