En los contratos aleatorios, una de las partes, o ambas recíprocamente, se comprometen a dar o hacer algo en consideración por algo que la otra parte debe dar o hacer en caso de que ocurra un evento incierto, o un evento que tendrá lugar en un tiempo no especificado. Esta categoría contractual carece de precedentes en el Derecho romano y en el Derecho histórico español, siendo relativamente nueva. Uno de los primeros autores que hace referencia a los contratos aleatorios es Samuel Pufendorf, y posteriormente se consolidan con Wolff y los franceses Domat y Pothier, siendo recogida la categoría del contrato aleatorio en el Código Napoleón, y pasando de ahí a nuestro Código civil.
In random contracts one of the parties, or both of them reciprocally, undertake to give or do something in consideration for something that the other party is to give or do in the event of occurrence of an uncertain event, or an event which shall take place in an unspecified time. This contractual category is unprecedented in Roman law and in Spanish historical law, being relatively new. One of the first authors who refers to random contracts is Samuel Pufendorf, and later they are consolidated with Wolff and the French Domat and Pothier, being collected the category of the random contract in the Napoleon Code, and moving from there to our Civil Code.