Skip to content

documents new vaultClawback functionaliy#422

Open
Tapanito wants to merge 9 commits intoXRPLF:masterfrom
Tapanito:tapanito/XLS-65-vault-clawback
Open

documents new vaultClawback functionaliy#422
Tapanito wants to merge 9 commits intoXRPLF:masterfrom
Tapanito:tapanito/XLS-65-vault-clawback

Conversation

@Tapanito
Copy link
Collaborator

Extends the VaultClawback transaction to allow the Vault Owner to force burn depositor shares when the vault has no assets remaining.

Problem

A vault can become permanently stuck when Vault.AssetsTotal and Vault.AssetsAvailable are both zero, but shares still exist. This situation may arise when a loan issued for the total of the vault's assets defaults. In this state:

Deposits cannot settle the balance
The Vault object becomes non-deletable

Solution

The VaultClawback transaction can now be submitted by:

Asset Issuer (existing functionality): Clawback funds from the vault, specifying Amount as the vault's asset (IOU or MPT).

Vault Owner (new functionality): Force burn worthless shares when both Vault.AssetsTotal and Vault.AssetsAvailable are zero. The Amount must be specified as the vault's share (MPT), and partial burns are not permitted—the Vault Owner must burn all shares held by the Holder.

Changes

Updated VaultClawback transaction description to document both use cases
Added Amount field documentation clarifying the expected asset type per submitter
Updated failure conditions to authorize Vault Owner and enforce the zero-asset requirement

##### 3.3.1.1 Failure conditions
- **Asset Issuer**: The `Amount` must be specified as the Vault's asset type (IOU or MPT). The transaction will clawback up to `Amount` of assets from the `Holder`'s shares, sending the funds to the Issuer's account.

- **Vault Owner**: The `Amount` must be specified as the Vault's share type (MPT), where `mpt_issuance_id` matches `Vault.MPTokenIssuanceID`. Since the Vault Owner can only submit this transaction when `Vault.AssetsTotal` and `Vault.AssetsAvailable` are both zero, no assets are transferred—only shares are destroyed. Partial burns are not permitted, the Vault Owner must burn all shares held by the `Holder`. The `Amount` can be specified as either:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make it simpler by just making amount absent in this case? This would imply burning all shares assuming all other conditions are met.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I improved the documentation to reflect that the Amount can either be inferred based on who is submitting the transaction (owner or issuer), or explicitly provided.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I improved the documentation to reflect that the Amount can either be inferred based on who is submitting the transaction (owner or issuer), or explicitly provided.

IIRC, Amount needs to be explicitly specified if the owner is the issuer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right, see from the spec:

- If the Vault Owner and Asset Issuer are the same entity, the `Amount` must be explicitly provided.

@Tapanito Tapanito requested a review from ximinez January 14, 2026 09:47
@Tapanito Tapanito requested a review from gregtatcam January 14, 2026 09:48
- The `Scale` parameter is provided.

- The `Asset` is `MPT`:
- The `Scale` parameter is provided.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer an error condition?


The `Amount` field is an `STAmount` that specifies the quantity and type of asset to clawback. Its interpretation depends on who submits the transaction:

- **Asset Issuer**: The `Amount` must be the Vault's asset type (IOU or MPT). The transaction claws back up to `Amount` of assets from the `Holder`'s shares, sending the funds to the Issuer's account. Partial clawback is supported.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Asset Issuer**: The `Amount` must be the Vault's asset type (IOU or MPT). The transaction claws back up to `Amount` of assets from the `Holder`'s shares, sending the funds to the Issuer's account. Partial clawback is supported.
- **Asset Issuer**: The `Amount` must be the Vault's asset type (IOU or MPT). The transaction claws back up to `Amount` of assets from the `Holder`'s shares, burning the funds. Partial clawback is supported.

##### 3.3.1.2 Failure conditions

- `VaultID` is zero or empty.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need empty lines between each failure condition. Also, they should be numbered.

- The transaction claws back or burns all funds, up to the total the `Holder` owns.
- If the Vault Owner and Asset Issuer are the same entity, the `Amount` must be explicitly provided.

##### 3.3.1.2 Failure conditions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
##### 3.3.1.2 Failure conditions
##### 3.3.1.2 Failure Conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants