MAYAName Guide

Create and manage a MAYAName to earn fees and monitor your integration.


MAYANames are MAYAChain's vanity address system that allows affiliates to collect fees and track their user's transactions. MAYANames exist on the MAYAChain L1, so you will need a MAYAChain address and $CACAO to create and manage a MAYAName.

MAYANames have the following properties:

  • Name: The MAYAName's string. Between 1-30 hexadecimal characters and -_+ special characters.

  • Owner: This is the MAYAChain address that owns the MAYAName

  • Aliases: MAYANames can have an alias address for any external chain supported by MAYAChain, and can have an alias for the MAYAChain L1 that is different than the owner.

  • Expiry: MAYAChain Block-height at which the MAYAName expires.

  • Preferred Asset: The asset to pay out affiliate fees in. This can be any asset supported by MAYAChain.

Create a MAYAName

MAYANames are created by posting a MsgDeposit to the MAYAChain network with the appropriate memo and enough $CACAO to cover the registration fee and to pay for the amount of blocks the MAYAName should be registered for.

  • Registration fee: tns_register_fee_rune on the Mimir endpoint. This value is in 1e10, so 10000000000 = 1 $CACAO

  • Per block fee: tns_fee_per_block_rune on the same endpoint, also in 1e10.

For example, for a new MAYAName to be registered for 10 years the amount paid would be:

amt = tns_register_fee_rune + tns_fee_per_block_rune * 10 * 5256000

5256000 = avg # of blocks per year

The expiration of the MAYAName will automatically be set to the number of blocks in the future that was paid for minus the registration fee.

Memo Format

Memo template is: ~:name:chain:address:?owner:?preferredAsset:?expiry

  • name: Your MAYAName. Must be unique, between 1-30 characters, hexadecimal and -_+ special characters.

  • chain: The chain of the alias to set.

  • address: The alias address. Must be an address of chain.

  • owner: MAYAChain address of owner (optional).

  • preferredAsset: Asset to receive fees in. Must be supported be an active pool on MAYAChain. Value should be asset property from the Pools endpoint.

Example: ~:AALUXX:BTC:bc1Address:mayaAddress:BTC.BTC

This will register a new MAYAName called AALUXX with a Bitcoin alias of bc1Address owner of mayaAddress and preferred asset of BTC.BTC.

You can use Asgardex to post a MsgDeposit with a custom memo. Load your wallet, then open your MAYAChain wallet page > Deposit > Custom.

View your MAYAName's configuration at the MAYAName endpoint:


Renewing your MAYAName

All MAYAName's have a expiration represented by a MAYAChain block-height. Once the expiration block-height has passed, another MAYAChain address can claim the MAYAName and any associated balance in the Affiliate Fee Collector Module (Read Preferred Asset for Affiliate Fees ), so it's important to monitor this and renew your MAYAName as needed.

To keep your MAYAName registered you can extend the registration period (move back the expiration block height), by posting a MsgDeposit with the correct MAYAName memo and $CACAO amount.



(Chain and alias address are required, so just use current values to keep alias unchanged)

$CACAO Amount:

cacao_amt = num_blocks_to_extend * tns_fee_per_block

(Remember this value will be in 1e10, so adjust accordingly for your transaction)

Preferred Asset for Affiliate Fees

Starting in THORNode V116, affiliates can collect their fees in the asset of their choice (choosing from the assets that have a pool on THORChain). In order to collect fees in a preferred asset, affiliates must use a THORName in their swap memos.

How it Works

If an affiliate's THORName has the proper preferred asset configuration set, the network will begin collecting their affiliate fees in $RUNE in the AffiliateCollector module. Once the accrued RUNE in the module is greater than PreferredAssetOutboundFeeMultiplier* outbound_fee of the preferred asset's chain, the network initiates a swap from $RUNE -> Preferred Asset on behalf of the affiliate. At the time of writing, PreferredAssetOutboundFeeMultiplier is set to 100, so the preferred asset swap happens when the outbound fee is 1% of the accrued $RUNE.

Configuring a Preferred Asset for a THORName

  1. Register your THORName following instructions above.

  2. Set your preferred asset's chain alias (the address you'll be paid out to), and your preferred asset. Note: your preferred asset must be currently supported by THORChain.

For example, if you wanted to be paid out in USDC you would:

  1. Grab the full USDC name from the Pools endpoint: ETH.USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48

  2. Post a MsgDeposit to the THORChain network with the appropriate memo to register your THORName, set your preferred asset as USDC, and set your Ethereum network address alias. Assuming the following info:

    1. THORChain address: thor1dl7un46w7l7f3ewrnrm6nq58nerjtp0dradjtd

    2. THORName: ac-test

    3. ETH payout address: 0x6621d872f17109d6601c49edba526ebcfd332d5d

    The full memo would look like:


You will also need a THOR alias set to collect affiliate fees. Use another MsgDeposit with memo: ~:<thorname>:THOR:<thorchain-address> to set your THOR alias. Your THOR alias address can be the same as your owner address, but won't be used for anything if a preferred asset is set.

Once you successfully post your MsgDeposit you can verify that your THORName is configured properly. View your THORName info from THORNode at the following endpoint:

The response should look like:

  "affiliate_collector_rune": "0",
  "aliases": [
      "address": "0x6621d872f17109d6601c49edba526ebcfd332d5d",
      "chain": "ETH"
      "address": "thor1dl7un46w7l7f3ewrnrm6nq58nerjtp0dradjtd",
      "chain": "THOR"
  "expire_block_height": 22061405,
  "name": "ac-test",
  "owner": "thor1dl7un46w7l7f3ewrnrm6nq58nerjtp0dradjtd",
  "preferred_asset": "ETH.USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48"

Your THORName is now properly configured and any affiliate fees will begin accruing in the AffiliateCollector module. You can verify that fees are being collected by checking the affiliate_collector_rune value of the above endpoint.

Last updated