Skip to content

MPT (MPTokens) FAQ

Elliot Lee edited this page Feb 27, 2025 · 2 revisions

Multi-Purpose Tokens (MPTokens)

MPTokens will be an improved token mechanism on the ledger.


Specification Overview


Core Features

1. Payment and Regulatory Properties (MPT V1)

  • Direct Payment Support:
    Enables straightforward on-ledger payments.
  • Regulatory Controls:
    Certain flags on the issuance object enable regulatory features:
    • Authorization Required: (lsfMPTRequireAuth)
    • Clawback Capability: (lsfMPTCanClawback)
    • Freeze/Lock Capability: (lsfMPTCanLock)

2. Planned Enhancements (MPT V2)

  • DEX (Decentralized Exchange) Support:
    Enables trading directly on the ledger.
  • Escrow Functionality:
    Supports conditional transactions.

Technical Details

A. Balance and Amounts

  • 63-Bit Amount Field:
    • Maximum value: 0x7FFFFFFFFFFFFFFF
    • Note: The on-chain amount itself is not divisible.
  • AssetScale:
    • A separate Uint8 field (maximum value 255) provided for off-chain interpretation.
    • Allows issuers to define how the basic unit should be interpreted (e.g., for decimal places).

B. On-Chain Metadata

  • Storage Limit:
    • Up to 1024 bytes can be stored in the metadata field.
  • Usage:
    • Designed to store on-chain descriptive data about the token (such as icons, terms, or other metadata).
    • Not used for storing code; current ledger implementations do not support smart contracts.
  • Mutability:
    • Current Behavior: Metadata is immutable once set.
    • Future Considerations: There is discussion about enabling metadata mutability via transactions.
    • Important Note:
      • If the metadata includes a URL, the data behind that URL can change even though the URL itself is immutable.
  • Encoding Guidelines:
    • The metadata is stored as a binary blob.
    • You may encode your metadata as a minified JSON string or as a Data-URI (e.g., data:application/json;base64,...) provided it is ultimately converted to a HEX-encoded string.
    • Ledger implementations (e.g., current versions of rippled) do not decode this field; consistency in encoding/decoding is left to developers.
    • A proposal and discussion on serialization methods is available in the standards discussions.

C. Protocol Differences from Traditional IOU Tokens

  • Simplified Balance Tracking:
    • MPTokens track only one balance per token.
    • They eliminate debt relationships, trust limits, and rippling behavior inherent in IOU tokens.
  • Mathematical Simplicity:
    • Use of integer math (no floating point) simplifies development and reduces complexity.
  • On-Ledger Footprint & Performance:
    • MPTokens are designed to be significantly smaller on-ledger (up to 5× smaller for some tokens).
    • They exhibit performance characteristics that approximate native XRP payments, with higher throughput demonstrated in performance testing.

Use Cases

  • Token Metadata Storage:
    • Provide an authoritative source for token details such as icons, descriptions, terms, or other data.
  • Fractional Ownership:
    • Ideal for fractionalizing assets (e.g., real-world assets like property or vehicles).
    • Example:
      • An asset (such as a car or a $1B private equity fund) can be issued as an MPT with a defined maximum number of units (e.g., 10,000 units), allowing multiple parties to hold fractional interests.

Frequently Asked Questions (FAQs)

Q1: What differentiates MPTokens from traditional XRP IOU tokens?

  • A: MPTokens feature a simpler balance model without trustlines or debt relationships, use integer math (avoiding floating point issues), and include on-chain metadata. They also have a smaller on-ledger footprint and improved performance characteristics.

Q2: How divisible are MPTokens on-chain?

  • A: The token amount is stored in a 63-bit field (max 0x7FFFFFFFFFFFFFFF) and is not divisible on-chain. However, the issuer can define an AssetScale (Uint8, up to 255) off-chain to represent decimal precision.

Q3: Can the metadata associated with an MPT be changed?

  • A: Currently, the on-chain metadata is immutable. In future versions, there may be support for metadata mutability via transactions. Note that while the metadata blob itself is immutable, if it contains a URL, the content at that URL may change.

Q4: What is the size limit for on-chain metadata and how can it be encoded?

  • A: The metadata is limited to 1024 bytes. Developers can store any arbitrary data in this blob, such as a minified JSON string or a Data-URI (after converting to HEX). It is essential that the encoding method remains consistent between storage and decoding.

Q5: What are the planned enhancements for future versions of MPTokens?

  • A: Future iterations (MPT V2) are expected to introduce support for decentralized exchange (DEX) functionalities and escrow capabilities.
Clone this wiki locally