How is the rest of the world making the US an interest free loan by holding US currency? In the book &quot;Macroeconomics&quot; by Olivier Blanchard &amp; David R. Johnson, the following appears:

In yet other countries, people who have emigrated to the United
States bring home U.S. dollar bills; or tourists pay some transactions
in dollars, and the bills stay in the country. This is, for example,
the case for Mexico or Thailand.
The fact that foreigners hold such a high proportion of
the dollar bills in circulation has two main macroeconomic
implications. First, the rest of the world, by being willing
to hold U.S. currency, is making in effect an interest-free
loan to the United States of $500 billion

By holding US bills of 500 billion, the rest of the world is making the US an interest free loan of $500 billion---could you please explain me how?
Think about what a loan is in terms of purchasing power.  You give a bank your signature on a loan contract and they give you something that will allow you to buy real stuff (houses, cars, whatever).  You enjoy this real stuff for some time. Then at the end you have to give the bank something that will allow them to buy real stuff, only more of it.  I'm calling it "something" instead of "dollars" for a reason I will explain below.

In the foreign exchange case, the US gives other countries pieces of paper, which are essentially IOUs.  They give the US either real stuff, which is then enjoyed, or they give the US their currency, which is immediately spent on real stuff.  The US doesn't hoard their currency.  Time passes and at the end they give back the IOU's in exchange for some real stuff.  Only instead of giving back more real stuff than was originally given, the US gives back less (because of inflation).

I called dollars "something" in the loan example and "IOUs" in the macro example because dollars take on a different role in each case.  In the loan, the dollars represent real purchases that are made immediately. In the macro example, the dollars take the place of the loan contract.  They don't buy any real stuff until the end of the transaction.

You can think of it another way by ignoring the dollars.  Foreigners give the US electronics and clothes and stuff in exchange for nothing.  After a while the US gives them back food and machines or whatever, only what the US gives back is worth less than the electronics and clothes it was given.  That's a zero interest (or negative interest) loan.

By the way, it's not just foreigners.  Whoever holds currency has given up something valuable (time, materials, land, etc.) in exchange for paper.  As long as that paper is under your mattress, you are not consuming and the paper is becoming worth less than it was.  You've made a negative interest loan.