Skip to content

Commit b5b8a30

Browse files
authored
Merge pull request #3012 from XRPLF/lptoken_freeze_rippled_5227
Hold for release 2.4 - Document impact of LP token freeze feature
2 parents 971c56b + cae450f commit b5b8a30

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/concepts/tokens/decentralized-exchange/automated-market-makers.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,35 @@ The AMM is designed so that an AMM's asset pool is empty if and only if the AMM
107107

108108
LP tokens use a special type of currency code in the 160-bit hexadecimal ["non-standard" format](../../../references/protocol/data-types/currency-formats.md#nonstandard-currency-codes). These codes have the first 8 bits `0x03`. The remainder of the code is a SHA-512 hash, truncated to the first 152 bits, of the two assets' currency codes and their issuers. (The assets are placed in a "canonical order" with the numerically lower currency+issuer pair first.) As a result, the LP tokens for a given asset pair's AMM have a predictable, consistent currency code.
109109

110+
### LP Token Freeze
111+
112+
If an LP token is associated with a liquidity pool that contains at least one frozen asset, the LP token is also frozen. This means:
113+
114+
1. The holder can't send the frozen LP token to other accounts.
115+
2. The holder can receive frozen LP tokens, but can't send them out (similar to frozen trust lines).
116+
117+
Frozen LP tokens affect the following transactions:
118+
119+
**Payment**
120+
121+
- An account can no longer send frozen LP tokens through direct payment.
122+
123+
**OfferCreate**
124+
125+
- Accounts are prohibited from creating offers that would sell frozen LP tokens.
126+
- Offers that contain frozen LP tokens cannot be consumed on the DEX.
127+
128+
**CheckCash**
129+
130+
- Cashing a check fails if it attempts to cash a frozen LP token from the sender.
131+
132+
**NFTokenCreateOffer**
133+
134+
- Buyers are prohibited from creating buy offers that use frozen LP tokens.
135+
136+
**NFTokenAcceptOffer**
137+
138+
- Buyers can't accept a sell offer if the offer requires the use of frozen LP tokens as payment.
110139

111140
## Trading Fees
112141

0 commit comments

Comments
 (0)