If you Baton Pass a Substitute to a Pokemon like Yanmega and Stealth Rocks are on the field, who takes the hazard damage, Substitute or Yanmega?
Yanmega takes the damage
source: Baton passing experience