The Prophet ﷺ came to Medina and the people used to pay in advance the price of dates to be delivered within two or three years. He said (to them), "Whoever pays in advance the price of a thing to be delivered later should pay it for a specified measure at specified weight for a specified period."
قَدِمَ النَّبِيُّ ﷺ الْمَدِينَةَ وَهُمْ يُسْلِفُونَ بِالتَّمْرِ السَّنَتَيْنِ وَالثَّلاَثَ فَقَالَ مَنْ أَسْلَفَ فِي شَىْءٍ فَفِي كَيْلٍ مَعْلُومٍ وَوَزْنٍ مَعْلُومٍ إِلَى أَجَلٍ مَعْلُومٍ