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