Reflect finance variables?

Not sure, but here's my train of thought.

When it takes the reflect fee during a transfer....

function takeReflectFee(uint256 reflectFee, uint256 taxFee) private {
        _rTotal = _rTotal.sub(reflectFee);      // subtracts the fee from the reflect totals
        totalFeeAmount = totalFeeAmount.add(taxFee);    // adds to the toal fee amount
    }

It subtracts from the rTotal and increases the totalFeeAmount.

If we look for totalFeeAmount we find it being used in one other function ......

function deliverReflectTokens(uint256 tAmount) public {   
        address sender = _msgSender();          
        require(!isAccountExcludedFromReward[sender],"Excluded addresses cannot call this function");
        (uint256 rAmount, , , , , ,) = getTaxAndReflectionValues(tAmount);
        reflectTokensOwned[sender] = reflectTokensOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        totalFeeAmount = totalFeeAmount.add(tAmount);
    }

This implies that in order to get the Reflect Tokens then the user needs to call this function.

But I don't get how that actually delivers it nor how the function actually works.

1 Like