def get_fee_fraction(db, feed_address):
    """Get fee fraction from last broadcast from the feed_address address.
    """
    cursor = db.cursor()
    broadcasts = list(cursor.execute(
        'SELECT * FROM broadcasts WHERE (status = ? AND source = ?) ORDER BY tx_index ASC'
        , ('valid', feed_address)))
    cursor.close()
    if broadcasts:
        last_broadcast = broadcasts[-1]
        fee_fraction_int = last_broadcast['fee_fraction_int']
        if fee_fraction_int:
            return fee_fraction_int / 100000000.0
        else:
            return 0
    else:
        return 0
