We develop a theory that links the U.S. dollar's valuation in FX markets to the convenience yield that foreign investors derive from holding U.S. safe assets. We show that this convenience yield can be inferred from the Treasury basis, the yield gap between U.S. government and currency-hedged foreign government bonds. Consistent with the theory, a widening of the basis coincides with an immediate appreciation and a subsequent depreciation of the dollar. Our results lend empirical support to models that impute a special role to the United States as the world's provider of safe assets and the dollar as the world's reserve currency.