How to test Reflect Finance code?

I have deployed the Reflect Finance code to Rinkeby Network and used Remix and the three accounts in Metamask.

I called the transfer() function to transfer from account1(deployer) → account2 and from account2 → account3 and again account3-> account2. The transactions were successful.

I wanted to see the reflection or balance change on the Metamask account but the value didn’t change for each transaction. Is there something else I need to do that the fees need to distributed to the Metamask accounts?

Check the function

balanceOf()

That will tell you the true balance.

Your shown balance should update the next time the address does a transaction that interacts with the contract.

Hi, thanks for your answer.

Can you also tell me on which part the coins are burnt? I am reading from different coin provider they burn coins but the code does not use the ERC20 burn function.

When the tokens are burned, that usually means they are sent to the burn address and subtracted from the total supply.

There are many different interpretations of what a burn truly is. In reflect, token owners can burn their own reflected tokens.

This function is

function reflect(uint256 tAmount) public {
        address sender = _msgSender();
        require(!_isExcluded[sender], "Excluded addresses cannot call this function");
        (uint256 rAmount,,,,) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        _tFeeTotal = _tFeeTotal.add(tAmount);
    }

I’ve check several coins and found following:

SafeMoon employs 3 simple functions: Reflection + LP acquisition + Burn In each trade, the transaction is taxed a 10% fee, which is split 2 ways.

  • 5% fee = redistributed to all existing holders
  • 5% fee is split 50/50 half of which is sold by the contract into BNB, while the other half of the

But in the source code there are comments like

3% fee auto add to the liquidity pool to locked forever when selling
2% fee auto distribute to all holders
With each trade there will be a burn

which contradicts itself or not?

There are many other coins that use the source code from reflect, but everyone writes something different. For example, the coin sanshu writes 1% burn and 1% distribution.

For both coins I couldn’t find the part of code where the the percentage of fees for liquidity or redistribution is declared.

Why not ask SafeMoon itself? Most people making clones don’t understand the code they are cloning so their comments they write won’t make sense either.

1 Like