Skip to content

Dynamic MPT Reference

The Dynamic MPT amendment does not create any new data types, but it modifies several transactions and the MPTokenIssuance ledger entry.

  • Transactions:
    • MPTokenIssuanceCreate - The new MutableFlags field specifies which fields or flags are mutable after issuance.
    • MPTokenIssuanceSet - Several new fields let you update mutable metadata and transfer fees, and enable MPT issuance flags that were declared mutable.
  • Ledger Entries:

(Requires the DynamicMPT amendment )

MPTokenIssuanceCreate Transaction Changes

To allow future changes to specific fields or flags of a token, issuers must clearly specify which ones should be mutable when creating the MPTokenIssuance object.

Example JSON

This example creates an MPT issuance with mutable metadata:

{
  "TransactionType": "MPTokenIssuanceCreate",
  "Account": "rNFta7UKwcoiCpxEYbhH2v92numE3cceB6",
  "AssetScale": 4,
  "TransferFee": 0,
  "MaximumAmount": "50000000",
  "MutableFlags": 65536, // tmfMPTCanMutateMetadata
  "MPTokenMetadata": "464F4F",
  "Fee": "12",
  "Flags": 122,
  "Sequence": 99536574
}

MPTokenIssuanceCreate Fields

MPTokenIssuanceCreate transactions can include the following new field:

FieldJSON TypeInternal TypeRequired?Description
MutableFlagsNumberUInt32NoA bitwise combination of flags indicating which fields may be modified after issuance, and which MPT issuance flags may be enabled after issuance. See MPTokenIssuanceCreate Mutable Flags.
Warning

Only the specified fields and flags may be declared mutable; all other fields remain immutable.

MPTokenIssuanceCreate Mutable Flags

The following flags are stored in the MutableFlags field, which is separate from the Flags field of the MPTokenIssuanceCreate transaction. MPT issuance flags that are declared mutable are one-way: they can be enabled after issuance via MPTokenIssuanceSet, but once enabled they cannot be disabled. Mutable fields (MPTokenMetadata and TransferFee) can always be modified.

Flag NameHex ValueDecimal ValueDescription
tmfMPTCanEnableCanLock0x000000022If enabled, the MPT's Can Lock flag, which gives the issuer the power to lock/unlock holders' balances, can be enabled after issuance.
tmfMPTCanEnableRequireAuth0x000000044If enabled, the MPT's Require Auth flag, which indicates that individual holders must be authorized, can be enabled after issuance.
tmfMPTCanEnableCanEscrow0x000000088If enabled, the MPT's Can Escrow flag, which indicates that the token can be placed in escrow, can be enabled after issuance.
tmfMPTCanEnableCanTrade0x0000001016If enabled, the MPT's Can Trade flag, which indicates that individual holders can trade their balances using the XRP Ledger DEX or AMM, can be enabled after issuance.
tmfMPTCanEnableCanTransfer0x0000002032If enabled, the MPT's Can Transfer flag, which indicates that tokens held by non-issuers can be transferred to other accounts, can be enabled after issuance.
tmfMPTCanEnableCanClawback0x0000004064If enabled, the MPT's Can Clawback flag, which indicates that the issuer can claw back value from individual holders, can be enabled after issuance.
tmfMPTCanMutateMetadata0x0001000065536If enabled, the MPTokenMetadata field, which stores additional information about the token, can be modified.
tmfMPTCanMutateTransferFee0x00020000131072If enabled, the TransferFee field, which determines the fee percentage charged on transfers between users, can be modified.

Error Cases

The following failure conditions have been added to the MPTokenIssuanceCreate transaction:

Error CodeDescription
temDISABLEDThe MutableFlags field is present but the DynamicMPT amendment is not enabled.
temINVALID_FLAGThe MutableFlags field contains an invalid value.

MPTokenIssuanceSet Transaction Changes

When updating mutable fields, issuers can change the field value to any allowed value. When enabling MPT issuance flags that were declared mutable, issuers can only enable them; mutable flags are one-way and cannot be disabled by MPTokenIssuanceSet once enabled.

Example JSON

This example updates the MPT metadata:

{
  "TransactionType": "MPTokenIssuanceSet",
  "Account": "rNFta7UKwcoiCpxEYbhH2v92numE3cceB6",
  "MPTokenIssuanceID": "05EECEBE97A7D635DE2393068691A015FED5A89AD203F5AA",
  "MPTokenMetadata": "575C5C", // Updated metadata from `464F4F` to `575C5C`
  "Fee": "10",
  "Flags": 1,
  "Sequence": 99536577
}

MPTokenIssuanceSet Fields

MPTokenIssuanceSet transactions can include the following new fields:

FieldJSON TypeInternal TypeRequired?Description
MPTokenMetadataStringBlobNoNew metadata to replace the existing value. Setting an empty value removes the field. Only valid if lsmfMPTCanMutateMetadata was set when creating the MPTokenIssuance object.
TransferFeeNumberUInt16NoThe new transfer fee value. Setting this to zero removes the field. Only valid if lsmfMPTCanMutateTransferFee was enabled when creating the MPTokenIssuance object. See Transfer Fee Rules.
MutableFlagsNumberUInt32NoEnable MPT issuance flags that were declared mutable when creating the MPTokenIssuance object. See MPTokenIssuanceSet Mutable Flags.

MPTokenIssuanceSet Mutable Flags

The following flags are stored in the MutableFlags field, which is separate from the Flags field of the MPTokenIssuanceSet transaction. All of these flags are one-way: each one only enables an MPT issuance flag that was declared mutable at creation. Once enabled, the underlying MPT issuance flag cannot be disabled by MPTokenIssuanceSet.

Flag NameHex ValueDecimal ValueDescription
tmfMPTSetCanLock0x000000011Enables the MPT's Can Lock flag, which allows the token to be locked both individually and globally. Once enabled, this flag cannot be disabled.
tmfMPTSetRequireAuth0x000000022Enables the MPT's RequireAuth flag, which requires individual holders to be authorized to hold the token. Once enabled, this flag cannot be disabled.
tmfMPTSetCanEscrow0x000000044Enables the MPT's Can Escrow flag, which allows holders to place balances into escrow. Once enabled, this flag cannot be disabled.
tmfMPTSetCanTrade0x000000088Enables the MPT's Can Trade flag, which allows holders to trade balances on the XRPL DEX. Once enabled, this flag cannot be disabled.
tmfMPTSetCanTransfer0x0000001016Enables the MPT's Can Transfer flag, which allows tokens to be transferred to non-issuer accounts. Once enabled, this flag cannot be disabled.
tmfMPTSetCanClawback0x0000002032Enables the MPT's Can Clawback flag, which allows the issuer to claw back tokens. Once enabled, this flag cannot be disabled.
Tip

Re-setting an MPT issuance flag that is already enabled is valid and has no additional effect.

Transfer Fee Rules

The ability to modify the TransferFee depends on two flags:

  • lsfMPTCanTransfer: must already be enabled to allow any non-zero TransferFee. Note that this flag can be enabled through tmfMPTSetCanTransfer if lsmfMPTCanEnableCanTransfer is set. Once enabled, it cannot be disabled.
  • lsmfMPTCanMutateTransferFee: must be enabled at creation of the MPT issuance to allow any modification of the TransferFee field.
Note

If the MPT's transfer fee and Can Transfer flag are both mutable, you can enable Can Transfer first, then modify the transfer fee in a second transaction.

The following table describes how setting a zero or non-zero transfer fee through the MPTokenIssuanceSet transaction behaves, based on the existing state of the MPTokenIssuance object on-ledger. The first two columns represent the ledger state (lsfMPTCanTransfer and lsmfMPTCanMutateTransferFee), while the third column represents the TransferFee value being set in the transaction.

Can TransferCan Mutate Transfer FeeTransfer Fee ValueResultDescription
DisabledEnabledZeroRemoves the TransferFee field.
DisabledDisabledZeroNot allowed to modify TransferFee.
DisabledEnabled/DisabledNon-zeroAlways invalid regardless of mutability.
EnabledEnabledNon-zeroModifies the TransferFee field.
EnabledDisabledNon-zeroNot allowed to modify TransferFee.
EnabledEnabledZeroRemoves the TransferFee field.
EnabledDisabledZeroNot allowed to modify TransferFee.

Error Cases

The following failure conditions have been added to the MPTokenIssuanceSet transaction:

Error CodeDescription
tecNO_PERMISSIONThe sender does not have permission to modify the specified field or flag. For example:
  • The MutableFlags field attempts to modify a flag that was not declared as mutable during creation.
  • The MPTokenMetadata field is provided but lsmfMPTCanMutateMetadata was not set during creation.
  • The TransferFee field is provided but lsmfMPTCanMutateTransferFee was not set during creation.
  • A non-zero TransferFee is specified but lsfMPTCanTransfer is not currently enabled on the issuance.
temDISABLEDThe MutableFlags, MPTokenMetadata, or TransferFee is present but the DynamicMPT amendment is not enabled.
temBAD_TRANSFER_FEEThe TransferFee exceeds the maximum allowed value of 50,000.
temINVALID_FLAGThe MutableFlags field contains an invalid value, including 0.
temMALFORMEDThe transaction is malformed. For example:
  • The Holder field is provided when mutating the MPT issuance.
  • The Flags field is set when mutation fields (MutableFlags, MPTokenMetadata, or TransferFee) are present.
  • The MPTokenMetadata field exceeds the maximum length of 1024 bytes.

MPTokenIssuance Entry Changes

MPTokenIssuance ledger entries can include the following new field:

FieldJSON TypeInternal TypeRequired?Description
MutableFlagsNumberUInt32NoIndicates which fields of this token issuance can be modified after creation, and which MPT issuance flags can be enabled after creation. See MPTokenIssuance Mutable Flags.

MPTokenIssuance Mutable Flags

The following flags are stored in the MutableFlags field, which is separate from the Flags field of the MPTokenIssuance ledger entry:

Flag NameHex ValueDecimal ValueDescription
lsmfMPTCanEnableCanLock0x000000022Allows the Can Lock flag to be enabled after issuance.
lsmfMPTCanEnableRequireAuth0x000000044Allows the Require Auth flag to be enabled after issuance.
lsmfMPTCanEnableCanEscrow0x000000088Allows the Can Escrow flag to be enabled after issuance.
lsmfMPTCanEnableCanTrade0x0000001016Allows the Can Trade flag to be enabled after issuance.
lsmfMPTCanEnableCanTransfer0x0000002032Allows the Can Transfer flag to be enabled after issuance.
lsmfMPTCanEnableCanClawback0x0000004064Allows the Can Clawback flag to be enabled after issuance.
lsmfMPTCanMutateMetadata0x0001000065536Allows the MPTokenMetadata field to be modified.
lsmfMPTCanMutateTransferFee0x00020000131072Allows the TransferFee field to be modified.

Amendment Information

AmendmentDynamicMPT
Amendment ID58E92F338758479C06084E1B6BA366BAD8F75E5329A7F0EEAFFFDA51E5106B7F
StatusIn Development
Default Vote (Latest stable release)No
Pre-amendment functionality retired?No