Over 4 million subprime loans were originated in 2006, bringing the total value of outstanding subprime loans over a trillion dollars. A few months later the subprime crisis began, with soaring foreclosure rates and hundreds of billions, perhaps trillions, of dollars in losses to borrowers, lenders, neighborhoods and cities, not to mention broader effects on the US and world economy. In this Article, I focus on the subprime mortgage contract and its central design features. I argue that these contractual design features can be explained as a rational market response to the imperfect rationality of borrowers. Accordingly, for many subprime borrowers loan contracts were not welfare maximizing. And to the extent that the design of subprime mortgage contracts contributed to the subprime crisis, the welfare loss to borrowers, substantial in itself, is compounded by much broader social costs. Finally, I argue that a better understanding of the market failure that produced these inefficient contracts should inform the ongoing efforts to reform the regulations governing the subprime market.