I've read https://www.stellar.org/developers/guides/concepts/list-of-operations.html#create-passive-offer but I can't quite wrap my head around the purpose of a passive offer. Can anyone explain their use with a real world example?
The link provides purpose in a nutshell:
Passive offers allow market makers to have zero spread. If you want to trade EUR for USD at 1:1 price and USD for EUR also at 1:1, you can create two passive offers so the two offers don’t immediately act on each other.
As in the example above, with normal offers those two offers would cancel each other out and you would be left with, i.e. EUR/USD 0.9999:1 and USD/EUR 1:1.
- Let's say you have EUR@Deutchebank and EUR@Swedbank, and they have a mutual contract in-between to accept each others EURs. In that case, from their perspective both EUR assets are identical, thus they most likely will put up 1:1 passive offers to ease the exchange for themselves and their clients.
- There may be reasons for smart contracts to provide offers between two assets at zero-spread exchange rate, so that people could always exchange one asset for other and back without losses. With normal offers that's impossible, because smart contract's both offers would cancel each other out. Hence the passive offer to make this possible.