Making use of a structural model that allows for optimal liquidity management, we study the role that repos play in a bank׳s financing structure. In our model the bank׳s assets consist of illiquid loans and liquid reserves and are financed by a combination of repos, long-term debt, deposits and equity. Repos are a cheap source of funding, but they are subject to an exogenous rollover risk. We show that the use of repos inflicts two types of indirect (“shadow”) costs on the bank׳s shareholders: first, it induces the bank to maintain higher liquid reserves in order to alleviate the additional default risk; second, it adds to the cost of long-term debt financing. These shadow costs limit the bank׳s appetite for cheap but unstable repo funding. This effect is, however, weakened under poor returns on risky assets, access to deposit funding and the depositor preference rule. We also analyze the impact of a liquidity coverage ratio, payout restrictions and a leverage ratio on the bank׳s financing choices and show that all these tools are able to curb the bank׳s reliance on repos.