XRPLF / xrpl-dev-portal

Source code for xrpl.org including developer documentation
https://xrpl.org
Other
521 stars 1.01k forks source link

Confusion in RIPPLING #954

Open adityaqilin opened 3 years ago

adityaqilin commented 3 years ago

https://xrpl.org/rippling.html This mentions: Rippling is an essential part of issued currencies, because it allows users who trust the same issuer to send issued balances to each other with the issuer as a passive intermediary. In a sense, rippling is like a passive, two-way currency exchange order with no limit and a 1:1 exchange rate for two currencies with the same currency code but different issuers. This is confusing as it appears contradictory.

Our use case is that people whom we have issued currencies can exchange within one another but CANNOT exchange with the same currency issued by somebody else. HOW do we ensure this? Writing here after searching for hours.

mDuo13 commented 3 years ago

There are three ways to exchange currencies that have the same currency code but different issuers.

  1. A "market maker" account (or several of them) trusts two or more issuers and allows rippling on those trust lines. Other users' transactions can ripple through that account, which causes the market maker's balances to shift freely between all trust lines of the same currency code. Optionally, the market maker uses QualityIn/QualityOut settings to adjust its valuation of those issued currencies from face value; otherwise, the transactions swap all currencies with the same code at a 1:1 ratio.
  2. A "market maker" account (or several of them) trusts two or more issuers, but does not allow rippling on those trust lines. The market maker explicitly creates Offers in the decentralized exchange to trade the chosen currencies. (Yes, you can trade currencies with the same code but different issuers.) With this approach, the market maker sets explicit rates and limits on each pair of issued currencies.
  3. A market maker account (or several) that holds one of the issued currencies creates Offers in the decentralized exchange to buy/sell that currency for XRP. A corresponding market maker (or several) does the same thing to connect each other issued currency to XRP. Autobridging connects those Offers into a synthetic order book that links each issued currency to each other through XRP.
mDuo13 commented 3 years ago

Related: #724