0039 XLS-39d: Clawback #94
Replies: 7 comments 26 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I like this. I'm curious how this would work for the more advanced IOU functionality? Things like Escrow, PayChan and/or AMM (assuming they are passed). |
Beta Was this translation helpful? Give feedback.
-
I think the selected text below should not be |
Beta Was this translation helpful? Give feedback.
-
I'd like to propose an inverted flag: instead of disabling Clawback ability as an issuer with I think this is a better way to grandfather in existing issuances / issuer accounts. This way existing issuers can only enable it once. Blackholed accounts used to issue tokens instead of IOUs cannot enable. Otherwise blackholed accounts will forever show as being able to Clawback, which may worry users. While they can't (blackholed), showing the issuing account as being able to is confusing. Opposed to showing the existing (blackholed) accounts cannot Clawback, and also: cannot enable (blacholed). |
Beta Was this translation helpful? Give feedback.
-
The The tantalizing thing is that the canonical/binary format does not have a particular attachment to the fields' names, so it should be possible to implement aliases for field names. It's totally plausible we could reuse the field ID for I would even consider changing the field name to be I guess in the end it only matters if we're concerned about running out of 256-bit "uncommon field" IDs. If we aren't, it's not necessary to reuse identifiers across transactions, but it does feel like this scenario is niche enough that might be worth the awkwardness of "InvoiceID" as a field name to conserve more IDs for the future. We're not that close to running out of 256-bit fields yet, but they are one of the types we have the most of (second only to UInt32's) so it might be a prudent bit of future-proofing. |
Beta Was this translation helpful? Give feedback.
-
Another understated detail of this proposal is that it adds a way to disable the Auth flag of a trust line. Currently there is no way to revoke authorization of a trust line. I'm still not sure why it was designed that way, but I'm fairly certain it was a choice. Maybe @JoelKatz or someone can clarify why. In the absence of a counterargument I'm fine with adding that ability to clawbacks, but for consistency I think it would also make sense to modify TrustSet to add a flag to remove auth from a trust line too. (If this is controversial, maybe that flag should also be locked away if have No Freeze turned on.) |
Beta Was this translation helpful? Give feedback.
-
I have updated the updated version of this spec in this pull request The major change from the original spec here is that It's still open to whether we still want to keep this flag or not, but I think for the sake of good design, both clawback and freeze should be bundled together as they are related for compliance. In a real world use case, token holder's trustline will be frozen first, then the issuer has the option to claw back from them. |
Beta Was this translation helpful? Give feedback.
-
Updated: XLS-39 Clawback Specification
1. Clawback Support
1.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.
support cannot be used to claw back XRP.
1.1.1. Advantages and Disadvantages
Advantages
Disadvantages
1.2. Creating and Transferring Tokens on XRPL
1.2.1. On-Ledger Data Structures
This proposal introduces no new on ledger structures.
Transactions
This proposal introduces one new transaction:
Clawback
:The
Clawback
transactionThe
Clawback
transaction modifies a trustline object, by adjusting the balance accordingly and, if instructed to, by changing relevant flags. If possible (i.e. if theClawback
transaction would leave the trustline is in the "default" state), the transaction will also remove the trustline.The transaction supports all the existing "common" fields for a transaction.
Transaction-specific Fields
TransactionType
string
UINT16
Indicates the new transaction type
NFTokenMint
. The integer value is30
. The recommended name isttCLAWBACK
.Account
string
ACCOUNT ID
Indicates the account which is executing this transaction. 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 oustanding balance (i.e. 'owes' the issued asset) that it wishes to claw back.
Amount
object
AMOUNT
Indicates the amount being clawed back, as well as the counterparty from which the amount is being clawed back from. It is not an error if the amount exceeds the holder's balance; in that case, the maximum available balance is clawed back. It is not an error if the amount is zero; in this case, the transaction does not claw back any funds but may adjust flags, as indicated by the
Flags
field.It is an error if the counterparty listed in
Amount
is the same as theAccount
issuing this transaction; the transaction should fail execution withtemBAD_AMOUNT
.Flags
number
UINT32
Specifies the flags for this transaction. The universal transaction flags that are applicable to all transactions (e.g.,
tfFullyCanonicalSig
) are valid. This proposal introduces the following new, transaction-specific flags:Reference
string
UINT256
An optional 256-bit value, serving as a reference to such other data as the issuer deems appropriate to associate with this
Clawback
operation.In addition, the issuer can include a memo with the transaction. Care should be taken by issuers since transactions (and therefore the memos included in them) are publicly accessible.
Example
Clawback
transactionExecution
In executing, this transaction would claw back at most 314.159 FOO issued by
rp6abvbTbjoce8ZDJkT6snvxTZSYMBCC9S
and held byrsA2LpzuawewSBQXkiju3YQTMzW13pAAdW
. IfrsA2LpzuawewSBQXkiju3YQTMzW13pAAdW
did not have a trustline set up or that trustline was set to0
then the errortecNO_LINE
would be returned and a fee would be consumed.1.3. Account Root modifications
This proposal introduces 1 additional flas for the
Flags
field ofAccountRoot
:lsfNoClawback
0x02000000
1.3.1
lsfNoClawback
Issuers may wish to disclaim the ability to claw back assets. They can do so by setting this flag using the
AccountSet
transaction, which should be augmented to allow the flag to be set. Like thelsfNoFreeze
flag, once set thelsfNoClawback
flag cannot be unset.1.4 Amendment
This transaction will require an amendment. The proposed name is
XLS-39-Clawback
.Beta Was this translation helpful? Give feedback.
All reactions