Since water ice is not thermodynamically stable against sublimation at the surface of an object located at ~5. AU, such layering seems consistent with past outgassing. In this work, we study the thermal history of Trojans after the formation of a dust mantle by possible past outgassing, so as to constrain the depth at which water ice could be stable. We find that it could have survived 100. m below the surface, even if Trojans orbited close to the Sun for ~10,000. years, as suggested by the most recent dynamical models. Water ice should be found ~10. m below the surface in most cases, and below 10. cm in the polar regions in some cases.