You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/tokens/fungible-tokens/rippling.md
+28-8Lines changed: 28 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,33 +7,39 @@ labels:
7
7
---
8
8
# Rippling
9
9
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.
11
13
12
14
## Example of Rippling
13
15
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.
15
17
16
18
[](/docs/img/cpt-rippling1.png)
17
19
18
20
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.
19
21
20
-
[](/docs/img/cpt-rippling2.png)
22
+
[](/docs/img/cpt-rippling2.png)
21
23
22
24
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.
23
25
24
26
[](/docs/img/cpt-rippling3.png)
25
27
26
28
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.
27
29
28
-
[](/docs/img/cpt-rippling4.png)
30
+
[](/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.
29
33
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.
31
35
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
+
[](/docs/img/cpt-rippling5.png)
33
37
34
-
[](/docs/img/cpt-rippling5.png)
38
+
Tokens might also flow through intermediary gateway accounts to reach a holder.
35
39
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
+
[](/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.
37
43
38
44
# The Default Ripple Flag
39
45
@@ -57,4 +63,18 @@ In the case of two accounts that mutually trust each other, the No Ripple flag i
57
63
58
64
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.
0 commit comments