@staticmethod
def _effective_fee_rate(amt_sat, base, rate):
    """
        Calculates the effective fee rate: (base_fee + fee_rate * amt) / amt

        :param amt_sat: amount in sat
        :type amt_sat: int

        :param base: base fee in sat
        :type base: float

        :param rate: fee rate
        :type rate: float

        :return: effective fee rate
        :rtype: float
        """
    amt_msat = amt_sat * 1000
    assert not amt_msat == 0
    rate = (base + rate * amt_msat / 1000000) / amt_msat
    return rate
