The paper presented a study on the relationship between credit money and economic instability. The issue is of primary importance because, as it is generally stated, lower variability of output and inflation has numerous economic benefits. We address this problem by means of an agent-based model and simulator, called Eurace, which is characterized by a complete set of interrelated markets and different types of interacting agents, modelled according to a rigorous balance-sheet approach. The dynamics of credit money is endogenous and depends on the supply of credit from the banking system, which is constrained by its equity base, and the demand of credit from firms in order to finance their production activity. Alternative dynamic paths for credit money have been produced by setting different firms' dividend policies. Results show the emergence of endogenous business cycles which are mainly due to the interplay between the real economic activity and its financing through the credit market. In particular, the amplitude of the business cycles strongly raises when the fraction of earnings paid out by firms as dividends is higher, that is when firms are more constrained to borrow credit money to fund their activity. This interesting evidence can be explained by the fact that the level of firms leverage, defined as the debt-equity ratio, can be considered ad a proxy of the likelihood of bankruptcy, an event which causes mass layoffs and supply decrease.