def difficulty_cutoff(source):

    diff = btcnet_info.get_difficulty(source.coin)
    btc_diff = btcnet_info.get_difficulty(source.coin)
    if not diff:
        return 0
        #while not diff:
        #    gevent.sleep(0)
        #    diff = btcnet_info.get_difficulty(source.coin)

    diff = float(diff)
    btc_diff = float(btc_diff)

    #Propositional Hopping
    if source.payout_scheme in ['prop']:
        return diff * 0.435

    #Score Hopping
    if source.payout_scheme in ['score']:
        c = source.mine.c if source.mine and source.mine.c else 300
        c = float(c)
        hashrate = float(source.rate) / (10. ** 9) if source.rate else 1
        hopoff = btc_diff * (0.0164293 + 1.14254 / (1.8747 * (btc_diff / (c * hashrate)) + 2.71828))
        return hopoff
returns the difficulty cut off for the pool
dataset/ETHPy150Open c00w/bitHopper/bitHopper/Logic/ServerLogic.py/difficulty_cutoff