We examine the optimal amount of user anonymity in a central bank digital currency in the context of bank lending. Anonymity, defined as the lender’s inability to discern an entrepreneur’s actions that enable fund diversion, influences the choice of payment instrument due to its impact on a bank’s lending decisions.