Clawback Support
Enabling clawback for IOUs to meet regulatory requirements
- Authors
- Nikolaos D. Bougalis, Shawn Xie
- Created
- 2023-03-04
- Updated
- 2026-12-02
- Discussion
- XRPLF/XRPL-Standards/discussions/94
1. Abstract¶
Although the XRP Ledger offers rich support for tokens (a.k.a. IOUs or issued assets), including offering issuers the ability to freeze issuances, in order to meet regulatory requirements, some issuers need to be able to go further, by having the ability to "clawback" their issued assets. Issued tokens can be clawed back by an issuer if, and only if, lsfAllowTrustLineClawback is set.
:bangbang: This proposal deals only with issued assets. The proposed clawback support cannot be used to claw back XRP.
2. Motivation¶
Jurisdictions may require issuers of digital assets to have a way to recover funds in certain circumstances. The Clawback feature can provide a way to comply with these regulations.
3. Specification¶
This proposal introduces no new on ledger structures. It introduces one new transaction: Clawback. This transaction will require an amendment. The proposed name is Clawback.
3.1. Ledger Entry: AccountRoot¶
3.1.1. Object Identifier¶
The object identifier of this ledger entry does not change.
3.1.2. Fields¶
The fields of this ledger entry do not change.
3.1.3. Flags¶
This proposal introduces 1 additional flag for the Flags field of AccountRoot:
| Flag Name | Flag Value | Description |
|---|---|---|
lsfAllowTrustLineClawback |
0x80000000 |
Issued tokens can be clawed back by an issuer if, and only if, this flag is set. |
Clawback is disabled by default. The account must set this flag through an AccountSet transaction.
3.1.4. Ownership¶
The ownership of this ledger entry does not change.
3.1.5. Reserves¶
The reserves of this ledger entry do not change.
3.1.6. Deletion¶
The deletion rules of this ledger entry do not change.
3.1.7. Invariants¶
- After
lsfAllowTrustLineClawbackhas been successfully set, it cannot be reverted: IF<AccountRoot>.FlagshaslsfAllowTrustLineClawbackset THEN<AccountRoot>'.FlagshaslsfAllowTrustLineClawbackset.
3.1.8. RPC Name¶
The RPC name of this ledger entry does not change.
3.1.9. Example JSON¶
The JSON format of this ledger entry does not change.
3.2. Transaction: AccountSet¶
3.2.1. Fields¶
The fields of this transaction do not change.
3.2.2. Flags¶
| Flag Name | Flag Value | Description |
|---|---|---|
asfAllowTrustLineClawback |
TODO: content pass. | Sets lsfAllowTrustLineClawback on the account. |
3.2.3. Transaction Fee¶
The fee for this transaction does not change.
3.2.4. Failure Conditions¶
3.2.4.1. Protocol-Level Failures¶
- The account attempts to set
lsfAllowTrustLineClawbackand its owner directory is not empty, meaning it has trustlines, offers, escrows, payment channels, or checks (tecOWNERS). - The account attempts to set
lsfAllowTrustLineClawbackwhilelsfNoFreezeis set, because clawback cannot be enabled on an account that has already disclaimed the ability to freeze trustlines (tecNO_PERMISSION). - Reversely, the account attempts to set
lsfNoFreezewhilelsfAllowTrustLineClawbackis set (tecNO_PERMISSION).
3.2.5. State Changes¶
- When the transaction sets
asfAllowTrustLineClawback, setslsfAllowTrustLineClawbackon the account. After this flag has been successfully set, it cannot reverted, and the account permanently gains the ability to clawback on trustlines.
3.2.6. Example JSON¶
The JSON format of this transaction does not change.
3.3. Transaction: Clawback¶
The Clawback transaction modifies a trustline object. The transaction supports all the existing "common" fields for a transaction.
3.3.1. Fields¶
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| TransactionType | Yes | string | UINT16 | Clawback |
Indicates the new transaction type Clawback. The integer value is 30. The recommended name is ttCLAWBACK. |
| Account | Yes | string | ACCOUNT | N/A | Indicates the account which is executing this transaction. |
| Amount | Yes | object | AMOUNT | N/A | Indicates the amount being clawed back, as well as the counterparty from which the amount is being clawed back from. |
3.3.1.1. Account¶
The account MUST be the issuer of the asset being clawed back. Note that in the XRP Ledger, trustlines are bidirectional and, under some configurations, both sides can be seen as the "issuer" of an asset. In this specification, the term issuer is used to mean the side of the trustline that has an outstanding balance (i.e. 'owes' the issued asset) that it wishes to claw back.
3.3.1.2. Amount¶
It is not an error if the amount exceeds the holder's balance; in that case, the maximum available balance is clawed back.
:bangbang: The sub-field issuer within Amount represents the token holder's address instead of the issuer's.
3.3.2. Flags¶
The universal transaction flags that are applicable to all transactions (e.g., tfFullyCanonicalSig) are valid. This proposal introduces no new transaction-specific flags.
3.3.3. Transaction Fee¶
TODO: content pass.
3.3.4. Failure Conditions¶
3.3.4.1. Data Verification¶
- The amount is zero (
temBAD_AMOUNT). - The counterparty listed in
Amountis the same as theAccountissuing this transaction (temBAD_AMOUNT).
3.3.4.2. Protocol-Level Failures¶
- Issued tokens can be clawed back by an issuer if, and only if,
lsfAllowTrustLineClawbackis set. The transaction is attempted whilelsfAllowTrustLineClawbackis unset (tecNO_PERMISSION). - There doesn't exist a trustline with the counterparty or that trustline's balance is
0(tecNO_LINE).
3.3.5. State Changes¶
- Adjusts the balance of the trustline accordingly.
- If instructed to, changes relevant flags.
- If possible (i.e. if the
Clawbacktransaction would leave the trustline in the "default" state), removes the trustline.
3.3.6. Example JSON¶
{
"TransactionType": "Clawback",
"Account": "rp6abvbTbjoce8ZDJkT6snvxTZSYMBCC9S",
"Amount": {
"currency": "FOO",
"issuer": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"value": "314.159"
},
"Flags": 1,
"Fee": 10,
"Memos": [
{
"Memo": {
"MemoType": "526561736f6e",
"MemoData": "5468697320636c61776261636b2077617320617574686f72697a6564206279204a6f652e"
}
}
],
}
In execution, this transaction would claw back at most 314.159 FOO issued by rp6abvbTbjoce8ZDJkT6snvxTZSYMBCC9S and held by rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW. If rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW did not have a trustline set up or that trustline's balance is 0 then the error tecNO_LINE would be returned and a fee would be consumed.
4. Rationale¶
Clawback is disabled by default and requires the issuer to have an empty owner directory (i.e., no existing trustlines, offers, etc) before the issuer is allowed to enable this feature. This design prefers a cautious approach where the issuer needs to take overt action to enable clawback capabilities. This helps ensure that token holders are aware of the possibility of clawback before they choose to hold any particular token.
4.1. Advantages and Disadvantages¶
Advantages
- Issuers that are restricted from issuing on ledger because of regulatory requirements requiring the ability to clawback funds will be able to issue tokens.
- By being able to "clawback" issuers can ensure that the "on-chain" view is representative of the balance.
- Compared to other on-ledger features (e.g. freeze), clawback is minimal and trivial to implement.
Clawbackis disabled by default, this gives token holders more confidence that they won't be clawed back randomly.
Disadvantages
- Introduces an additional transaction, along with the complexity that comes with that.
- Issuers now get additional power, which may be concerning to token holders.
- Requires additional documentation, including highlighting the fact that clawback cannot be applied to XRP.
5. Backwards Compatibility¶
No backward compatbility issues found
5.1. Compatibility with Automated Market Maker (XLS-30)¶
The Automated Market Maker (AMM) gives an account the ability to deposit issued tokens into AMM instance pool, in the form of LPToken. As of the current Clawback spec, it only allows an issuer to claw back the funds that are spendable. This would mean that the AMMCreate transaction will error if either of the tokens' issuers enabled the lsfAllowTrustLineClawback flag on their account.
If clawing back from an AMM instance pool is required, such change will need a separate specification.
5.2. Compatibility with Escrow & Paychannels (XLS-34)¶
The XLS-34 gives an account the ability to "lock" issued tokens into an escrow or paychannel, in the form of LockedBalance. As of the current Clawback spec, it only allows an issuer to claw back the funds that are spendable. This would mean that the funds deposited into an Escrow or Paychannel cannot be clawed back.
If clawing back tokens from an Escrow or Paychannel is required, such change will need a separate specification.
6. Test Plan¶
Test cases need to ensure the following:
- The account that signs and submits
Clawbacktransaction must be the token issuer - Token issuer cannot clawback from themselves
Clawbackadheres to account flagslsfAllowTrustLineClawback,lsfGlobalFreezeandlsfNoFreeze- The issuer is only able to claw back the specific amount of funds that specified in the transaction, but can't exceed the maximum amount of funds the holder has
- Test that the
Clawbackfeature does not interfere with any other features of the token, such as Offers
7. Security Considerations¶
TODO: content pass.