Files
system-design-101/data/guides/foreign-exchange-payments.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

2.0 KiB
Raw Permalink Blame History

title, description, image, createdAt, draft, categories, tags
title description image createdAt draft categories tags
Foreign Exchange Payments Learn how foreign exchange payments work when buying/selling internationally. https://assets.bytebytego.com/diagrams/0194-foreign-exchange.png 2024-03-10 false
payment-and-fintech
Payments
Foreign Exchange

The buyer pays in USD, and the European seller receives euros. How does this work?

This process is called foreign exchange.

Suppose Bob (the buyer) needs to pay 100 USD to Alice (the seller), and Alice can only receive EUR. The diagram above illustrates the process.

  1. Bob sends 100 USD via a third-party payment provider. In our example, it is Paypal. The money is transferred from Bobs bank account (Bank B) to Paypals account in Bank P1.
  2. Paypal needs to convert USD to EUR. It leverages the foreign exchange provider (Bank E). Paypal sends 100 USD to its USD account in Bank E.
  3. 100 USD is sold to Bank Es funding pool.
  4. Bank Es funding pool provides 88 EUR in exchange for 100 USD. The money is put into Paypals EUR account in Bank E.
  5. Paypals EUR account in Bank P2 receives 88 EUR.
  6. 88 EUR is paid to Alices EUR account in Bank A.

Now lets take a close look at the foreign exchange (forex) market. It has 3 layers:

  • Retail market. Funding pools are parts of the retail market. To improve efficiency, Paypal usually buys a certain amount of foreign currencies in advance.
  • Wholesale market. The wholesale business is composed of investment banks, commercial banks, and foreign exchange providers. It usually handles accumulated orders from the retail market.
  • Top-level participants. They are multinational commercial banks that hold lots of money from different countries.

When Bank Es funding pool needs more EUR, it goes upward to the wholesale market to sell USD and buy EUR. When the wholesale market accumulates enough orders, it goes upward to top-level participants. Steps 3.1-3.3 and 4.1-4.3 explain how it works.