In this paper, we argue for a regulatory framework under which a bank's required level of equity capital depends on the equity capital of its peers. Such banking-on-the-average rules are transparent and could also be combined with the current regulatory framework. In addition, we argue that banking-on-the-average rules ensure the build-up of bank equity capitals in booms and thus avoid excessive leverage. Prudent banks can impose prudency on other banks. In a simple model of a banking system, we show that a banking-on-the-average framework can deliver the socially optimal solution because it induces banks to abstain from gambling. Moreover, it alleviates socially harmful consequences of conventional equity-capital rules, which may induce banks to excessively cut back on lending or liquidate desirable long-term investment projects in downturns