We develop a theory that links the U.S. dollar’s valuation in FX markets to foreign investors’ demand for U.S. safe assets. When the convenience yield that foreign investors derive from holding U.S. safe assets increases, the U.S. dollar immediately appreciates, thus lowering the foreign investors’ expected future return from owning U.S. safe assets. The foreign investors’ convenience yield can be inferred from the wedge between the yield on safe U.S. Treasury bonds and currency-hedged foreign government bonds, which we call the U.S. Treasury basis. Consistent with the theory, we find that a widening of the U.S. Treasury basis coincides with an immediate appreciation and a subsequent depreciation of the U.S. dollar. Shocks to news about current and future convenience yields accounts for 54.2% of the quarterly innovations in the dollar. Our results lend empirical support to recent theories of exchange rate determination which impute a special role to the U.S. as the world’s provider of safe assets and to the dollar, the world’s reserve currency.