The Generalised Euler Equation and the Unilateral Default Problem