Skip to content

Commit 45e5c1a

Browse files
committed
Updates per review.
1 parent 402f3a0 commit 45e5c1a

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

docs/concepts/tokens/fungible-tokens/rippling.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,39 @@ labels:
77
---
88
# Rippling
99

10-
Rippling occurs when one holder sends issued currency to another holder of the same currency.
10+
Rippling is the _indirect movement_ of funds that occurs for any payment of fungible tokens (except when an issuing account exchanges tokens directly with another account). This includes when one holder sends tokens to another holder of the same token.
11+
12+
Rippling can automatically exchange tokens that have the same currency code, even if they have different issuers. This helps to facilitate longer and more complex payments between accounts.
1113

1214
## Example of Rippling
1315

14-
Issuers distribute currency to holders over trust lines. When a holder creates a trust line to an issuer for a specific currency, they are willing to accept payments of that issued currency. For example, in the chart below, Holder A and Holder B both have trust lines to the Issuer of the token USD.
16+
Issuers distribute currency to holders over trust lines. When a holder creates a trust line to an issuer for a specific token, they are willing to accept payments of that token. For example, in the chart below, Holder A and Holder B both have trust lines to the Issuer of the token USD.
1517

1618
[![Issuer with trust lines to two holders.](/docs/img/cpt-rippling1.png "Issuer with trust lines to two holders.")](/docs/img/cpt-rippling1.png)
1719

1820
The Issuer transfers 50 USD to Holder A, and 10 USD to Holder B. For these trust lines, the Issuer has a net balance of -60 USD.
1921

20-
[![Issuer sends currency to holders.](/docs/img/cpt-rippling2.png "Issuer sends currency to holders.")](/docs/img/cpt-rippling2.png)
22+
[![Issuer sends tokens to holders.](/docs/img/cpt-rippling2.png "Issuer sends tokens to holders.")](/docs/img/cpt-rippling2.png)
2123

2224
Since both accounts are willing to accept payments in USD tokens, Holder A can send a payment of 20 USD to Holder B. This appears to be a single transaction, but it actually involves two steps. Holder A sees their balance go down by 20 USD, Holder B sees their balance go up by 20 USD. Behind the scenes, though, Holder A’s side of the trust line to the Issuer is reduced by 20 USD. The Issuer’s side of the trust line is increased by 20 USD, bringing its net balance to -40 USD.
2325

2426
[![Holder A sends currency through the Issuer.](/docs/img/cpt-rippling3.png "Holder A sends currency through the Issuer.")](/docs/img/cpt-rippling3.png)
2527

2628
Then the Issuer side of the trust line to Holder B is reduced by 20 USD, and the account of Holder B is increased by 20 USD.
2729

28-
[![Holder B receives currency through the Issuer.](/docs/img/cpt-rippling4.png "Holder B receives currency through the Issuer.")](/docs/img/cpt-rippling4.png)
30+
[![Holder B receives tokens through the Issuer.](/docs/img/cpt-rippling4.png "Holder B receives tokens through the Issuer.")](/docs/img/cpt-rippling4.png)
31+
32+
The tokens are transferred through the Issuer, but ultimately the Issuer’s balance doesn’t change. This flow of tokens is known as _rippling_. Issuing accounts must allow rippling so that their holders can transfer tokens to one another.
2933

30-
The funds are transferred through the Issuer, but ultimately the Issuer’s balance doesn’t change. This flow of funds is known as _rippling_. Issuing accounts must allow rippling so that their holders can transfer funds to one another.
34+
Rippling can involve several accounts as the XRP Ledger finds a path to transfer the tokens. For example, the tokens might flow between two issuer accounts that have a trust line between them.
3135

32-
Rippling can involve several accounts as the XRP Ledger finds a path to transfer the funds. For example, the funds might flow between two issuer accounts that have a trust line between them.
36+
[![Holder A transfers tokens through Issuers A and B to get to Holder B.](/docs/img/cpt-rippling5.png "Holder A transfers tokens through Issuers A and B to get to Holder B.")](/docs/img/cpt-rippling5.png)
3337

34-
[![Holder A transfers currency through Issuers A and B to get to Holder B.](/docs/img/cpt-rippling5.png "Holder A transfers currency through Issuers A and B to get to Holder B.")](/docs/img/cpt-rippling5.png)
38+
Tokens might also flow through intermediary gateway accounts to reach a holder.
3539

36-
Other accounts such as liquidity providers and normal holders should not allow rippling. Rippling can lead to exploits where balances shift unexpectedly, funds are allocated at higher rates, and the holder ends up losing money on a transaction where they played no part.
40+
[![Holder A transfers tokens through Issuers A and B and Gateway X to get to Holder B.](/docs/img/cpt-rippling6.png "Holder A transfers tokens through Issuers A and B and Gateway X to get to Holder B.")](/docs/img/cpt-rippling6.png)
41+
42+
Other accounts, such as liquidity providers and normal holders, should not allow rippling. Rippling can lead to exploits where balances shift unexpectedly, tokens are allocated at higher rates, and the holder ends up losing value on a transaction where they played no part.
3743

3844
# The Default Ripple Flag
3945

@@ -57,4 +63,18 @@ In the case of two accounts that mutually trust each other, the No Ripple flag i
5763

5864
Using the HTTP / WebSocket APIs or your preferred client library, look up trust lines with the `account_lines` method. For each trust line, the `no_ripple` field shows whether the current address has enabled the No Ripple flag on that trust line. The `no_ripple_peer` field shows whether the counterparty has enabled the No Ripple flag.
5965

66+
## See Also
67+
68+
- **Concepts:**
69+
- [Paths](paths.md)
70+
- **Use Cases:**
71+
- [Stablecoin Issuer](../../../use-cases/tokenization/stablecoin-issuer.md)
72+
- **References:**
73+
- [account_lines method][]
74+
- [account_info method][]
75+
- [AccountSet transaction][]
76+
- [TrustSet transaction][]
77+
- [AccountRoot Flags](../../../references/protocol/ledger-data/ledger-entry-types/accountroot.md#accountroot-flags)
78+
- [RippleState (trust line) Flags](../../../references/protocol/ledger-data/ledger-entry-types/ripplestate.md#ripplestate-flags)
79+
6080
{% raw-partial file="/docs/_snippets/common-links.md" /%}

docs/img/cpt-rippling6.png

72.7 KB
Loading

0 commit comments

Comments
 (0)