We study a credit market with adverse selection. The market consists of entrepreneurs who seek to finance risky, variable-investment projects from financial intermediaries. The quality of the project is only known to the entrepreneur who owns it. High quality projects yield a higher expected return than low quality ones for a given amount of initial investment. Furthermore, each entrepreneur has his own wealth. Since financial intermediaries are unable to observe the true quality of a project, an adverse selection problem arises similar to Akerlof (1970). Contrary to Akerlof (1970), entrepreneurs can signal the quality of their projects through the design of the loan contract. A loan contract consists of an amount of funds to be invested, a share of the wealth of an entrepreneur to invest and the interest rate. In that sense, our model is in the spirit of Spence (1973) and Rothschild and Stiglitz (1976). The market is modelled as a signalling game similar to Spence (1973). In the first part, we characterise the least-costly-separating equilibrium. We show that, as expected, there is a distortion in the level of investment compared to the first-best. This distortion occurs only for the high-quality projects. Interestingly, the sign of the distortion depends on how the projects are ranked with respect to risk. In case they are ranked in a First Order Stochastic Dominance (FOSD) sense, we show that there is over-investment (compared to the first best) in equilibrium. In case they are ranked in a Second Order Stochastic Dominance (SOSD), sense there is under-investment in equilibrium. Over-investment is due to a "rat race" in which entrepreneurs of highquality projects try to signal themselves by undertaking excessive investment. On the contrary, under-investment is the usual credit rationing phenomenon that has been highlighted in many studies. We argue that this result has important implications with regards to the amplification of small productivity shocks on the aggregate economic activity. More precisely, we show that a small, type-specific positive or negative productivity shock can lead to a large discontinuous fall in investment. We then examine how entrepreneurial wealth influences aggregate investment. The most surprising, and perhaps the most interesting, result is that in some cases, there is an inverse relationship between the scarcity of wealth and aggregate investment. This means that when entrepreneurial wealth becomes scarcer, there is an increase in aggregate investment but a fall in welfare. The intuition behind this result is that, when there is over-investment in equilibrium, compared to the first-best, abundance of wealth allows entrepreneurs to move closer to the socially efficient level of investment, which entails less investment. A wealth squeeze accelerates the rat race and hence leads to more investment than it is socially efficient. [ABSTRACT FROM AUTHOR]