In a cyclotron-based proton therapy facility, the energy changes are performed by means of a degrader of variable thickness. The interaction of the proton beam with the degrader creates energy tails and increases the beam emittance. A precise model of the degraded beam properties is important not only to better understand the performance of a facility already in operation, but also to support the development of new proton therapy concepts. The exact knowledge of the degraded beam properties, in terms of energy spectrum and transverse phase space, depends on the model used to describe the proton interaction with the degrader material. In this work the model of a graphite degrader has been developed with four Monte Carlo codes: three conventional Monte Carlo codes (FLUKA, GEANT4 and MCNPX) and the multi-purpose particle tracking code OPAL equipped with a simplified Monte Carlo routine. From the comparison between the different codes, we can deduce how the accuracy of the degrader model influences the precision of the beam dynamics model of a possible transport line downstream of the degrader.