Title: A generalised model of self-fulfilling currency crises with a possible solution