Last updated
Edit

Creating an Asset-backed Multi-purpose Token

(Requires the [MPToken amendment][] )

As a financial professional, I want to use multi-purpose tokens to create an asset-backed token in order to profit from resale transactions.

A multi-purpose token (MPT) is a compact and flexible object that offers the best aspects of fungible and non-fungible tokens. It is the next generation of tokenization on the XRPL. Notable features include:

  • MPTs store metadata directly on the XRPL blockchain, with the option of linking to additional off-chain data.
  • MPTs can have a fixed token supply, with a cap on the maximum number of tokens.
  • MPT issuers can collect transfer fees each time the token is traded.
  • MPTs can be non-transferable, for use cases such as airline credits.
  • MPTs also allow advanced compliance features.

To learn more, see Multi-purpose Tokens.

MPT Generator

MPT Generator Utility

You can download a standalone version of the MPT Generator as sample code.

In practice, you want to use an Issuer account configuration to issue an MPT, but you can try the form with a new, unconfigured account and the transaction works fine. A T-bill is one example of the many types of asset you can create and trade on the XRP Ledger.

Creating a US Treasury Bill as an MPT

A US Treasury bill (T-bill) is a short-term debt security issued by the US government. T-bills are considered a safe investment because they're backed by the US government. T-bills are appealing to investors in American states that have high income tax because the interest earned is exempt from state and local taxes. See Treasury Bills In Depth.

Creating an Issuing Account

You can use the Account Configurator to experiment with the settings for a T-bill issuing account in a sandbox environment. When you are satisfied with your configuration, you can create an account on XRPL Mainnet to begin trading.

To create a new MPT Issuer account:

  • In the Account Configurator utility, choose ledger instance Devnet.
  • Click Get New Account.
  • Choose account configuration template Issuer.

The form sets the standard flags for an Issuer account and displays additional configuration fields.

T-bill Issuer Account Configuration

ParameterValueDescription
DomainTOML domainURL to the server where your TOML file is stored. For an experimental account, you can enter any URL. When you configure the account, the domain is automatically converted to a hexidecimal string. If you reconfigure the account, you need to enter the original domain again.
Transfer Rate1005000000A value between 1000000000 and 2000000000 representing the percentage value you collect when a holder transfers one of your issued tokens. A Transfer Rate of 1005000000 returns .5% of the transfer value to this account. See Transfer Rate.
Tick Size5Round offers to this many significant digits. Valid values are 3 to 15, or 0 to disable.
Signer Accountsaccount addressesAccounts that have a vote regarding approval of transactions for this account.
Signer WeightsintThe weight of each signer's signature, relative to other signers.
Signer QuorumintThe required minimum value of signer weights to approve a transaction.

Note
In practice, configuring signers for your issuing account is a best practice. To reduce complexity, this example does not use signer configuration.

Issuer Account Flag Settings

Use the sliders to configure the standard suggested flag settings. Overall, you want holders of your T-bill to be able to trade with other holders, so rippling is an essential function. You want to be careful about what other accounts are able to send to your account, so you should disallow most types of transfers. One exception is trust lines, which you do want other accounts to be able to create to your issuing account.

FlagPurpose
defaultRippleAllow transfers to third-party holders by default.
depositAuthRequire authorization for another account to deposit to this account.
disallowIncomingCheckPrevent other accounts from sending checks to this account.
disallowIncomingNFTokenOfferPrevent other accounts from sending NFTokenOffers to this account.
disallowIncomingPayChanPrevent other accounts from creating Payment Channels to this account.
disallowIncomingXRPPrevent other accounts from sending XRP to this account.

Once you've set your preferred values in the account configurator, click Configure Account to finish preparing your account to issue T-bills.

Generating a US Treasury Bill as a Multi-purpose Token

You can represent a US Treasury Bill (T-bill) on the XRPL by creating a multi-purpose token. The example below shows random possible values you might use as a starting point. Adjust as needed for your use case.

MPT Generator Example

ParameterValueDescription
Asset Scale2The difference, in orders of magnitude, between a standard T-bill unit and the corresponding fractional unit.
Maximum Tokens500000The maximum number of this T-bill MPT that will ever be issued by this account.
Transfer Fee314Fee collected when the T-bill MPT is transferred to another account.

As an example, you might set the following flags when creating your T-bill MPT.

FlagDescription
Can TransferA holder can transfer the T-bill MPT to another account.
Can TradeA holder can trade the T-bill MPT with another account.

Token Metadata

The metadata you provide is what distinguishes your token from other MPTs. The following JSON definition shows sample configuration information for a T-bill. Copy and paste the data, or your own metadata, into the Token Metadata field.

{
    "Name": "US Treasury Bill Token",
    "Identifier": "USTBT",
    "Issuer": "US Treasury",
    "IssueDate": "2024-03-25",
    "MaturityDate": "2025-03-25",
    "FaceValue": 1000,
    "InterestRate": 2.5,
    "InterestFrequency": "Quarterly",
    "Collateral": "US Government",
    "Jurisdiction": "United States",
    "RegulatoryCompliance": "SEC Regulations",
    "SecurityType": "Treasury Bill",
    "ExternalUrl": "https://example.com/t-bill-token-metadata.json"
  }

Once you've set your preferred values, click Generate Transaction to see the transaction syntax for your settings. The Flags field displays the sum of the flags you've selected, and the MPTokenMetadata is converted to a hexidecimal string.

Generated syntax for MPTokenIssuanceCreate transaction

To create your T-bill MPT, click Send Transaction. When your transaction succeeds, a link to the record in the XRPL Explorer is displayed in the result field.

Success link appended to the code field.

Follow the link and scroll down to find the MPTokenIssuanceCreate transaction for your new T-bill in the Explorer.

Explorer record of the new T-bill MPT.

Click Gather MPT Information to copy the account information and MPT Issuance ID to the result field. Copy the information and save it to send the MPT to another account as shown in Sending MPTs.

Account and MPT ID in the result field.