How to swap Chia NFT for NFT ?

4 minute read

The majority of Chia NFT trading on exchanges is done NFT for XCH. How does one trade NFT for NFT? How do Chia NFT swaps compare to Ethereum NFT swaps? Let’s dive in.

Update: 2022-07-16 As of Chia NFT to NFT does not work in Chia GUI or CLI v1.4. Below is an ideal example of how it should work based on information at the time.

Swapping Squiwormy NFT to Chia Ghost NFT

A while back I saw @CassFairiesClub post an image of a neat looking Chia Ghost NFT. I really liked the Chia Ghost #453 because of the blue yellow headband that reminded me of the Ukrainian flag. Chia Ghost #453

We agreed to attempt our own NFT to NFT exchange. The end goal is to see the Chia Ghost show up in my own wallet here: Chia Ghost #453

Cass generated the offer via CLI and sent the resulting file to me via my personal discord and posted it on Dexie. Chia Ghost #453 to Squiwormy #0027 swap

But wait! There is an offer already out for squiwormy #0027! What happens if the squiwormy gets sold first? Squiwormy #0027 is already for sale for 0.5 XCH

Turns out, that the first Chia offer accepted and processed on the blockchain invalidates the second Chia offer. Here’s how it looks. First I wanted to purchase squiwormy #0027 so that the Squiwormy funds get donated.

I downloaded the squiwormy #0027 offer from Dexie and accepted it via my Chia wallet. Chia client UI accepting offer

You’ll notice in Dexie updates as soon as the blockchain says the offer is in a Pending state. Dexie shows pending state

After the blockchain finishes the process for the purchase I also need to assign the NFT to my DID profile. Chia client assign NFT to DID

This should show the NFT in any marketplace that’s showing my DID galleries. At the time of writing this, I couldn’t get squiwormy to show up in my profile. Thus, we’ll move forward with the actual swap.

So what will happen when I download the NFT to NFT offer from Dexie? Chia Ghost #453 to Squiwormy #0027 swap

First, I downloaded the offer and placed it into my Chia wallet: Chia client assigns NFT to DID

For an unknown reason, the swap did not work. I waited 2 hours the first time, cleared transactions, and attempted a second time. That failed as well. This lead me to create a new offer using Chia CLI make_offer command

#squiwormy #0027
NFT_ID_TO_SEND="nft1hskzlv496czn8h8x237nvenfj9neyeup36m5x5v9z0y2w2zy8xnq6hw5c7"
#chia ghost #435
NFT_ID_TO_REQUEST="nft1gxjslxk4k3w4fe88rps63drgg7479lmvnxpufkqzarcpjew67ldq8vpwn8"

WALLET_FINGERPRINT="388938841"

chia wallet make_offer -f $WALLET_FINGERPRINT --offer $NFT_ID_TO_SEND:1 --request $NFT_ID_TO_REQUEST:1 -p offer_1_squiwormy_x_1_chiaghost.offer

This is the output:

Creating Offer
--------------

OFFERING:
  - 1 nft1hskzlv496czn8h8x237nvenfj9neyeup36m5x5v9z0y2w2zy8xnq6hw5c7 (1 mojos)
REQUESTING:
  - 1 nft1gxjslxk4k3w4fe88rps63drgg7479lmvnxpufkqzarcpjew67ldq8vpwn8 (1 mojos)
Offers for NFTs will have royalties automatically added.  Are you sure you would like to continue? (y/n): y
Confirm (y/n): y
Created offer with ID 0aeb9fb35ac888a563e315741d0ad0f3954f3ee8eceecdace3b7fbeda93a9b0f

After attempting to make_offer and take_offer several times with various NFTs, including NFTs between my own wallets, I’ve run out of things to try. I hope one day this tweet becomes a reality.

How to swap a Chia NFT for NFT

To swap one NFT for another, you only need to know the NFT ids and nothing else. The Chia blockchain does the rest!

At the time of writing, the NFT to NFT swap is only possible via command line (CLI) and I found an example here

chia wallet make_offer -f wallet-fingerprint -o nft1u72s8payxfxljcdupr5nfqe0rjsfzqpux8z6vafjyy3ahd3vkj4sdw00ma:1 -r nft1y7aj90hvt4ypj0279jjj2m4hxr8pjjqsrcjfrj6a670t36wq7xxsnnje9f:1 -p offerfile.offer

It appears all you are doing is swapping an NFT for 1 mojo on both sending and receiving sides. I believe that’s acting as a non-custodial escrow. This offer essentially locks up the NFTs and allows anyone in the world to do the swap.

The output is of course a simple text file that can be uploaded to Dexie.space or OfferPool:

offer1qqph3wlykhv8nmvm09gpxac5cu55yydtd5g5t2pj3e26fzs6zgmwz5zpam9hqzz9cxpzggw8smwsmkvydje9uyd4tzk996yqpf24wpv5cdvv2ca532q9q8z52q2qzy2532p9qje65vw9u2fpgk9a2c3m645emhfl06ahl08eakdalmaaklhlhxwlat57n60tp4e7taa670drur63yrgemg4dfa5lcc5r4y3mxah5gc7k502uffge6tc6k3a3d74y0qnut7lnu2szr30mlagte6mzndvf63ct88whf6tx7vu78ac0t4nhhl6s2cwem0qy3zwwp4xgdylmcc48scurnzmj9ra64gwa75a6z2ce8scgt872t7elnxrm7pad8vmm8lehpnppht20r8l6qez30ua6gk6g954a4wwfcftcu4r9t449njq2cze97dee7lu6nuxjgv3qjyqcjr87rcepszrcsfswuhpvpvxv6uj7vpdlfz9f63r3yrfd7fer3q926umrqukyk7jcx7g34u55vp2jdxwvfz2zjyptpqy8cmcy2vqac7ztrvfct5qxxd963jpcpgqz23qrfws55peuggyazlp3ducepsvfas6zxyhyh35asdc229zy9egv30fr7pqt5py6r538zrz56r32n8j5w7nz7fjmztsupurhp7zte0wavnw8qmf0yqs0df98xh2avtd6r82mq7kjyell7509z5wlwtu5x36gcmcmmkkg5kjlm00jasnlws8squdkqrzkqryrqyzgr7fu9x8uhe7nsnc430zcpfcuq7rpnjvvv3mqp6hxpg2upchpzrm3pug04pk2y59z4nrp2yzjpmsl9jtl43d3vt74qncstjmqfvudgrwjyvrh87ms3jz4497mtqpc9daa98va8djm9pr3fe5rr7lgg9vtthrgg66685wrwdanvwpy5n62k25a83ycqpr6lk3sf5tkhqfwjczrgq7ymus0kr0dmykpwj563k47pph6c0rlut50u0wlej4eaxamz7k2nklcj2py0q57y9c5mqs7zt6qecu0sczrmtamfahs0a8gdf0hjl58ufqfahky2r43h3xed2m54ywrsd638etaskjckfxws7d2mfltesrwhkqts2gsgf3yxru67qunmlm74mgfyv393nathmy270r420wm423rf92nr7k4qe89zk6x5ef6uku6wer9kzn4vcyl5fa4ac547jpd7gugj54h93pkuxsdwxhenc86t5mykw6khahyda8ghdsaezsym6wfc6wtnxd72kxqn8d5mlfx5wy0z9ml7y6r40tlmy20kvrwujruusttaetahpf9hr6ds96j3f44hd0t8zkfra5am68g7nfv5a632vh88md22d33dlsasxwg52288e7h0kw9mh0tax48e99x7tmfu7x6ma9hlw5hu93flzdf38h32mpswn5mg2k2k2cn4yfj7emmaa480fysydsjkp553s8k3cpnd4lv3uex5r68s6mtdxdn7cw3v788ka52qmtte040tk74zmwxk0whfrqyvq4k6aj4ys7ayvqahkcpdje8sxvxedsrdsxqmq3qvpkja35syptycuz7gwymyksgnm0y8s5qafufzqcswsmzz5c6egvqp5xezj4guylq36skcdgqfurv08hgavt5nehmqr74ydrgru5s2qv08zss97fh3wrzfgkkpkm8jjeu64t4pvhjhgyv4y9x6eyt7aqhwxk6wve68myg5gl8erwa3wqy6gxpq9wg4spqpwnuzcsc3d2usxzzz3rqqgv0qx97szjcs39x2dquzysqq8ux2z0pg88ztmgvygpxe6ftkvsez9hpq9yw62vckquqtqv3c6p0tqnpfcfghgc9gzjysqqqgju58tqdv4gcd6gt2d9yu7q0h3fq47uyqh7rh5e3vk9yt7wyc2u9wcve25awjzqg6prvl77qdyuq35zxcla3kphkp86gcznzzqwm9d2zgzwcmcvxp7uhssgar2tejg6lkqal2ktwmt056t9vgzalttwe65yu67uay32ajd0aq3p466vjtrpclgevqd5ctth7c07zqvfhl8ej58accge9004ytj02z9ra4jkdlfervw853neze23unau5lsm0ez72lxx9zc7tufje2dse663uc7hl040qdh26tzj3y4kaewjn72v74e3wd9rxa9c20fuw33sv4wwzvzumqwm5u6ugqv48fsurgnpwdtjgh55h588suhfrz8tue6aqpmjft60dj737k4muqvedz5d8pw9l8hfnu6zrv6ugx6469n5fw4ky3yt9wakh4xcwft6wu2qdr4sujdxk4ucacal75pvh2lkud7mkyc4sd5x7wprd4w2uxnzg934s0ywhjnm8j7javeyhtenf55dr2rjl5lfk5454h3n8t377quruxpvmw4x6vcvtdrur2m2vcd943vlx3mukd3tx07h4j57erdh5rk4v9ku9r47jv550w397x08upvpuw870nvdcathdtccjtj0thw6j2zancf7s58e8s8easghmkhdlxm6d4teec4rlwd5u0kz06jz7tx0qr4ms7fl4e7lsr6l79pssn9rm3k

Send this offer via QR code to a friend, text message, or smoke signals. The blockchain will validate ownership and validity.

Chia vs Ethereum NFT to NFT swap

Let’s first dive into what I learned about Ethereum NFT swaps.

Based on a reasonably trusted source one can see that Ethereum NFT swaps do exist via OpenSea, Sudoswap, NFTTrader, and others. There are gotchas to almost each swap tool.

When searching the web for OpenSea NFT to NFT swap the only result I’ve found led to the OpenSea NFT transfer page. As you can see this doesn’t trade NFTs. This simply allows two trusted parties to send NFTs to each other.

Sudoswap and NFTTrader do appear to allow people to swap NFT for NFT on or via their platforms. At the time of writing this article, both mentioned NFT swap platforms allow bulk/basket of NFT to NFT swaps.

Let’s examine both a bit more in detail.

Blockchain native NFT <-> NFT swap True P2P
Chia yes yes
Ethereum no* no*

Compared to Chia’s offer files that allow P2P and natively on-chain NFT to NFT swaps the swaps on the Ethereum chain are neither. I did find Ethereum NFT swaps without fees and P2P via otc.Sudoswap.xyz. However, I haven’t found a method on Ethereum that allows generating an ETH offer locally and sending it via Twitter, Discord, or QR code.

There are a few marketplaces worth comparing and discussing, however:

marketplace Blockchain NFT <-> NFT swap Fee P2P
Dexie Chia yes 0 yes
OfferPool Chia yes 0 yes
OpenSea Ethereum no n/a no
Sudoswap.xyz Ethereum yes 0.5% yes*
otc.Sudoswap.xyz Ethereum yes 0 yes*
NFTTrader Ethereum yes 0.001 yes*

Again, while the Ethereum marketplaces claim P2P swaps most imply you still send a URL that links back to the marketplace. In Chia, you can create an offer file, as you’ll see below, that can be sent to anyone who can receive a text message. This implies no marketplace can dictate any fees for your trades.