Among the policy responses to the global financial crisis, the international provision of US dollars via central bank swap lines stands out. This paper studies the build-up of stresses on banks' balance sheets that led to this coordinated policy response. Using the BIS international banking statistics, we reconstruct the worldwide consolidated balance sheets of the major national banking systems. This allows us to investigate the structure of banks' global operations across their offices in various countries, shedding light on how their international asset positions are funded across currencies and counterparties. The analysis first highlights why a country's "national balance sheet", a residency-based measure, can be a misleading guide to where the vulnerabilities faced by that country's national banking system (or residents) lie. It then focuses on banking systems' consolidated balance sheets, and shows how the growth (since 2000) in European and Japanese banks' US dollar assets produced structural US dollar funding requirements, setting the stage for the dollar shortage when interbank and swap markets became impaired.