-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amendment fixFrozenLPTokenTransfer
: Prohibit transfer of LPToken when an asset is frozen
#5227
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5227 +/- ##
=======================================
Coverage 78.1% 78.2%
=======================================
Files 790 790
Lines 67562 67607 +45
Branches 8160 8161 +1
=======================================
+ Hits 52791 52837 +46
+ Misses 14771 14770 -1
|
caa857c
to
7a0d1d7
Compare
7a0d1d7
to
efa1823
Compare
fixFrozenLPTokenTransfer
: Prohibit transfer of LPToken when an asset is frozen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks functionally fine to me. Just left some comments about style, code coverage and redundant header files included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just replied one comment. it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me
@bthomee commit msg: Prohibit LPToken holders from sending LPToken to others if they have been frozen by one of the assets in AMM pool We can use the amendment name for the descripton/title |
High Level Overview of Change
New Definition
If a liquidity pool token (LPToken) is associated with a liquidity pool that contains at least one asset that is regularly frozen, the LPToken itself is considered "frozen". This means:
The holder cannot send the frozen LPToken to others. (The frozen status restricts the holder from transferring the LPToken to another wallet)
The holder can still receive frozen LPTokens. (If someone sends frozen LPTokens to the holder, they can still receive them, even though they cannot send them out)
This behavior is similar to how regular frozen IOUs work: you can receive them, but you cannot send them to others while they are frozen.
Background
Prior to this amendment, a blacklisted account that owns frozen LPTokens could still transfer them through mechanisms such as Payments, Checks, Offers, or NFTs. This loophole allowed the recipient of these LPTokens to redeem or withdraw the underlying assets of the pool, bypassing the restrictions that should have applied to the blacklisted account. This behavior undermines the freezing mechanism's integrity and creates inconsistencies in asset control.
Note: this amendment only works with the existing regular freeze, and has no correlation with deep-freeze
Example
Amendment changes
This amendment ensures that frozen LPTokens cannot be transferred. Below are the changes to specific transaction types:
Payments
OfferCreate
CheckCash
NFTokenCreateOffer
NFTokenAcceptOffer
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)