When the Prophet ﷺ arrived in Madinah, the people were paying in advance for dates two and three years ahead. He said, "Whoever pays in advance for dates must do so for a known measure, a known weight, and a known term."
حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن ابن أبي نجيح عن عبد الله بن كثير عن أبي المنهال
قدم النبي ﷺ وهم يسلفون في التمر السنتين والثلاث فقال من أسلف في تمر فليسلف في كيل معلوم ووزن معلوم إلى أجل معلوم
Bukhari narrated it in the Book of Salam, Chapter on advance payment for a known weight, hadith no. 2240, 2241, and Muslim narrated it in the Book of Musaqah, Chapter on salam, hadith no. 1604, both from the hadith of Sufyan through this same chain.