Tutorial: How to Circumvent RMRK UIs and the Fundamental Flaws of RMRK
These applications aim to provide users with an easy way to interact with and manipulate RMRK NFTs and they have helped thousands engage with the powerful technology that RMRK NFTs are. However, due to RMRK’s design, it is fundamentally impossible to build a user interface that cannot be completely undermined by the technically savvy. This article will teach you how to submit remarks manually on the Kusama blockchain in order to stay on the cutting edge of interfacing with RMRK NFTs.
First, allow me to briefly describe how RMRK works. The core developers have built a “consolidator” that essentially looks for certain “notes” made on the Kusama blockchain. These “notes” are called remarks and they are built into substrate blockchains like Kusama, Polkadot, and even Kusama parachains like Karura, Moonriver, and Bifrost.
To better understand RMRK let’s look at an example. Here’s one remark that triggered the purchase of the Kanaria Super Founder #4 for 1,600 KSM:
This remark translates to,
Hey RMRK, I want to BUY a 2.0.0 NFT with the ID 8949162-e0b9bdcc456a36497a-KANBIRD-KANS-00000004.
Of course, submitting this remark alone would not buy the Kanaria Super Found #4, it needs to be accompanied by a balance transfer to the owner of the NFT. RMRK checks to see if the associated balance transfer is actually going to the wallet that owns the RMRK NFT. If this remark and a sufficient balance transfer occur in something called a Utility batchAll(calls) then RMRK will recognize the buyer as the new owner.
But take a look at the transaction that actually purchased this Super Founder: 0x15d1a106280f7a814080ce75c95664ecd048091188d55aedbda6e22fc904cd9a. You can see that there are two balance transfers in the transaction: one for 1,520 KSM and one for 80 KSM. In reality, the Kanaria Super Founder #4 was listed for 1,520 KSM and the Kanaria application displayed the price with a 5% fee that the builders of Kanaria take for providing the interface. Just take a look at the remark that listed the Super Founder:
The original owner told RMRK,
Hey RMRK, I want to LIST a 2.0.0 NFT with the ID 8949162-e0b9bdcc456a36497a-KANBIRD-KANS-00000004 for 1520000000000000 picoKSM.
The RMRK LIST function uses picoKSM since Kusama’s granularity is limited to 12 decimal places. Thus 1,520,000,000,000,000 (1.52 quadrillion) picoKSM = 1,520 KSM. Imagine if the buyer knew that they could have manually submitted the extrinsic as to not include the 5% service fee; they would have saved a whopping $30,000 (assuming KSM =$375).
You might argue that the Kanaria team deserves these service fees because they have slaved over creating a super slick interface. I would agree! I commend Kanaria to the highest degree for being able to create a well-functioning user interface for the common crypto holder to interact with RMRK NFTs; they are the builders so it is their fundamental right to implement whatever fees they want. But it is my fundamental right to tell you that you do not have to pay these fees if you do not want to, especially if you feel like Singular or Kanaria App has failed you.
Recently, there was a massive clamor for Zeitgeit’s early access NFT collection on RMRK. There was so much traffic that it became virtually impossible to buy the NFTs on Singular. This caused some people to lose KSM because Singular prepared BUY transactions for multiple individuals for the same NFT.
One collection is utilizing flaws in Singular to release their NFTs in a way that makes it impossible to buy them on Singular. The first release in the collection caused 5 individuals to lose their KSM because they attempted to buy it on Singular. Essentially, Singular prepared BUY transactions that became outdated since the collection owner relisted the NFT faster than Singular could prepare the BUY transactions.
As long as it is impossible to build a user interface for RMRK that can prepare and submit a BUY transaction within 6 seconds, every RMRK UI will be fundamentally flawed.
This is because a new Kusama block is written every 6 seconds, so anyone who knows how to submit remarks directly to the Kusama blockchain can always list, relist, send, burn, or buy an NFT within 6 seconds.
How to manually submit a BUY transaction to avoid service fees and to buy NFTs quickly.
Step 1: Determine the owner, identifier, version, and listed price of NFT you wish to buy.
Let’s assume you want to buy this beautiful NFT of my face. To find the address of the owner, simply look at the “Owned by” section on the page.
You will find that my KSM address is GqC37KSFFeGAoL7YxSeP1YDwr85WJvLmDDQiSaprTDAm8Jj. Save this for later.
Next you will need to find the identifier, version, and listed price. The ID is built into the Singular URL: https://singular.rmrk.app/collectibles/7441154-bc486ed2f30f59f974-ACS-ADAM_CLAY_STEEBER_FACE-0000000000000001 but incase the URLs become encoded in the future, you can always find the ID by observing the LIST transactions for the NFT. To do this, navigate to the “History” tab on the NFT to find the date it was last listed.
You will discover that the last time I listed this NFT was on August 29th. So all you have to do is go to the Subscan extrinsics page for the wallet and find the remark. Make sure you narrow the search parameters!
Sometimes the remark will be displayed as a series of numbers and letters. This is simply the byte format of the remark. You can easily decode the remark with this tool.
So, we now have the following information:
- Owner: GqC37KSFFeGAoL7YxSeP1YDwr85WJvLmDDQiSaprTDAm8Jj
- Version: 1.0.0
- Identifier: 7441154-bc486ed2f30f59f974-ACS-ADAM_CLAY_STEEBER_FACE-0000000000000001
- List Amount: 980000000000 picoKSM, or 0.98 KSM
Step 2: Create the BUY remark.
The format for RMRK to recognize a command is the following:
Notice that each section of the remark is separated by TWO colons. If you submit a remark that contains an error with a balance transfer, RMRK WILL NOT recognize the command and YOU WILL lose your KSM in the balance transfer. With that said, to purchase my face NFT the remark will look exactly like this:
Notice that for a BUY remark there are no command-specific parameters because you are simply telling RMRK that you want to buy the NFT. There is no need to tell RMRK the price because that is implied by the owner’s LIST remark and the balance transfer that will accompany your BUY remark.
Once you have created the remark, you will need to encode it into byte format to submit it directly on-chain. To do this, use the aforementioned tool to convert the UTF-8 text to byte format (no spaces).
We get the following byte format for the BUY remark:
Step 3: Build the extrinsic on Polkadot JS App
We now have all the necessary information to manually submit our Utility batchAll(calls) on the Kusama blockchain! But before we do that, be sure to check the following on the Polkadot JS App:
- Is your wallet’s metadata updated?
- Are you connected to the Kusama network?
- Do you have enough transferrable KSM in your account to buy the NFT?
- Are you 100% certain that you made NO ERRORS with the remark or the information about the NFT? TRIPLE CHECK. Even the most innocent error will result in you losing your KSM; coding is merciless.
Once you have checked that everything is correct and updated and that you have enough KSM in your account to purchase the NFT, navigate to the “Extrinsics” page under the “Developer” dropdown menu. Once you have navigated to this page and are under the “Submission” tab, select the account you wish to use to buy the NFT under the “using the selected account” dropdown menu. Then select “utility” under the “submit the following extrinsic” dropdown menu. Once you select “utility” navigate to the dropdown menu on the right and select “batchAll(calls).” Your page should now look something like this:
You will need to add two items to your batch. To do this simply click “Add item” twice. The first item should be the remark. To include it in your batch, select “system” under the “0: Call: Call” dropdown menu. To the right of this, make sure to select “remark” in the dropdown menu. You will then see a blank field titled “remark: Bytes.” This is where you will paste the remark in byte format, but make sure to include “0x” before the byte-formatted remark. In this example you will paste the following:
The second item should be the balance transfer. Select “balances” under the “1: Call: Call” dropdown menu. To the right select “transfer(dest,value).” Underneath you will see a dropdown menu titled “dest: MuliAddress (LookupSource).” Select “Id.” Then paste the address of the current owner of the NFT; in this example it would be GqC37KSFFeGAoL7YxSeP1YDwr85WJvLmDDQiSaprTDAm8Jj. Finally, input the value to be transferred: it can be any amount greater than or equal to the listed amount. Make sure you select the appropriate denomination on the right: the default is “KSM” but you can switch to “pico” to make things consistent. Your screen should now look something like this:
Go ahead and try to prepare this transaction. If you’ve done everything correctly you should get the exact same “encoded call data” as I did:
If you submit this batch of calls then RMRK would recognize your address as the new owner of the NFT, provided that no one else has purchased it and that the listed price remains less than or equal to 0.98 KSM.
Some Fundamental Flaws in RMRK
The biggest issue with RMRK NFTs is that they are not tokens, they are a series of specifically formatted notes written on the Kusama blockchain that refer to pinned IPFS assets. I suppose you could consider the hash(es) of the IPFS file(s) as the “token(s)” but no one can possess a hash like they can a token. However, RMRK protocol allows people to track the de facto ownership of the asset(s) represented by the IPFS hash(es).
The reason this is an issue is because RMRK depends completely on the functionality of Kusama remarks. Here are a few things that are 100% possible with remarks:
- Two BUY remarks+balance tranfers from different addresses for the same NFT occur in the same block.
- A BUY remark+balance transfer for an NFT from a buyer and a SEND/BURN remark from the owner occur in the same block.
- A BUY remark+balance transfer for an NFT from a buyer and a LIST remark from the owner occur in the same block when the BUY is greater than or equal to the old listed amount but less than the new listed amount.
- Two or more LIST remarks for the same NFT for different listing amounts occur in the same block.
Kusama transaction prioritization is complex and does not necessarily depend solely on the timing of when a transaction is signed and submitted. So these issues might be solved by looking at which of two (or more) conflicting RMRK transactions occur first in a block, but is that fair? A coding wizard could create a hyper-prioritized BUY transaction just one block after the initial listing of a highly coveted NFT to undermine everyone: only another coding wizard could stand a chance. This is not ideal for the layman because RMRK UIs are too slow to compete with well designed scripts.
For this reason, RMRK as it is now is not scalable.
Imagine millions of individuals submitting RMRK transactions; chances are that a small portion of them will be doing so with automated processes. This creates a highly technical game where the winners are the ones who can best prioritize transactions. This might not be an issue for collections with moderate demand, but it certainly is not an edge case since extremely popular NFT collections emerge on a regular basis.
This is not to say that RMRK is broken or worthless.
I want to be clear, I completely support RMRK and I believe it has more potential than any NFT technology in the crypto space. I am absolutely impressed with what the core team has been able to accomplish thus far and I am certain that they are aware of these potential issues. It is because I care that I spent so much time writing this article in the hopes of arming newcomers against the initiated. I also want people to understand exactly how this beautiful technology works because it is an elegant solution to expensive transaction fees and static NFTs.
Do I still use Singular to transact NFTs? Yes, unless there is fierce competition or I’m buying something exorbitantly expensive. That’s because I enjoy the convenience of not needing to prepare my transactions manually. Singular, Kodadot, and Kanaria App are incredible technologies that make it very easy to interface with RMRK NFTs. However, you should know that using a RMRK UI puts you at a great disadvantage against those who know how to manually submit their RMRK extrinsics.
Post Script: some warnings
If you do decide to start interfacing with RMRK NFTs manually, you need to understand that there is nothing protecting you from making mistakes. Here’s a list of ways you can really screw up and lose your KSM:
- You make a spelling/syntax error.
- You submit a balance transfer that’s too low, or unnecessarily too high.
- The owner relists the NFT under your nose for a price higher than your manually prepared BUY transaction.
- Someone else buys the NFT before you’re able to submit your BUY transaction.
- YOU MAKE A F*CKING SPELLING/SYNTAX ERROR.
- You’re connected to the wrong network and submit your remark to the wrong chain.
- Your BUY transaction send your KSM to the wrong address.
- The owner burns the NFT under your nose before your BUY transaction.
- You, uh, make a spelling/syntax error.
If you want to play it safe, just use Singular or Kodadot. Submitting extrinsics manually is like turning off your targeting computer while attacking the Death Star. Unless you’re a Jedi you’re probably going to get smoked at some point.
Be cautious, be wary, be risky, be safe. Thanks for reading.