def METHOD_NAME(data, redeemed_amount):
    if data.token_supply[-1] == 0:
        return 0
    base_fee = (data.base_fee[-1] + (redeemed_amount / (2 * data.token_supply[-1]))) *params.D
    return base_fee