The Messenger of Allah ﷺ forbade the sale of gharar. This was because the people of the pre-Islamic era used to trade by selling the offspring of a she-camel's offspring still in the womb, so the Messenger of Allah ﷺ forbade that practice.
حدثنا محمد بن عبيد حدثنا محمد يعني ابن إسحاق عن نافع
نهى رسول الله ﷺ عن بيع الغرر وذلك أن الجاهلية كانوا يتبايعون بالشارف حبل الحبلة فنهى رسول الله ﷺ عن ذلك
Its chain of transmission is sahih, despite the omission that occurred at its beginning. It has been established in all three original manuscripts here that the Imam said, "Muhammad told us," meaning Ibn Ishaq. This is an error and impossible, for Ibn Ishaq died more than a decade before Ahmad was born. Ahmad's teachers from whom he narrates the hadith of Ibn Ishaq are numerous, so we could not determine with certainty the name of any one of them here. For that reason we placed dots between "told us" and "Muhammad, meaning Ibn Ishaq." This error is certainly the doing of the copyists.If we were able to determine the more likely reading, we would favor that the name of the teacher who dropped out of the chain is Muhammad bin Ubayd, for he is the one from whom Ahmad narrated the hadith that comes directly before this one. This preference is further confirmed by the fact that Imam Ahmad narrated this hadith as number 6307 from the two brothers, Yaala bin Ubayd and Muhammad bin Ubayd, and mentioned at the end there, "so the Messenger of Allah forbade ﷺ," then said, "Muhammad bin Ubayd said in his narration, habal al-habalah, so the Messenger of Allah forbade that." This means that Muhammad added to what his brother said the phrase "about that," and this addition is established here as well.This may support the conclusion that this hadith is from Muhammad bin Ubayd, indeed it almost reaches the level of certainty. But we are keen on precision and trustworthiness, so we could not add at the beginning of the chain "Muhammad bin Ubayd told us," because of the recklessness and boldness that this would involve. And knowledge is a trust.