The Messenger of Allah ﷺ resided in Medina for ten years, offering the sacrifice each year.
حدثنا أحمد بن منيع وهناد قالا حدثنا ابن أبي زائدة عن حجاج بن أرطاة عن نافع
أقام رسول الله ﷺ بالمدينة عشر سنين يضحي
[Its chain of transmission is daif]. Ahmad recorded it in 2/38 from the hadith of Ibn Abu Zaida through this route, and see the previous hadith for the defect.