We examine the implications of central bank digital currency (CBDC) for credit supply and financial stability using a monetary general equilibrium model. The introduction of deposits in CBDC account decreases credit supply by banks, raising the nominal interest rate and lowering a bank's reserve-deposit ratio. This increases the likelihood of bank panic in which banks exhaust cash reserves. However, once the central bank can lend all the deposits in CBDC account to banks, an increase in the quantity of CBDC which does not require reserve holdings can enhance financial stability by increasing credit supply and lowering nominal interest rate.