Private NFTs, is it Myth🔮 or Math🧑💻?
Mr.FreemanLet me ask you something, Do you think it's possible that I transferred an NFT on TON blockchain, without anyone realizing which NFT got transferred or who transferred it and to whom it got transferred?
The answer is surprisingly YES.
But how? Look here, this is what a private transfer using zero-knowledge looks like on block explorers.

Ah, should I have to explain zero-knowledge again??? Haven't you read my last article?
It’s a mathematical technique where you can prove a claim without revealing any extra information.
So in our case, the claim is that I own an NFT. And, I want to prove my claim to the contract or anyone I want, without revealing my wallet or my Token ID!
⚙ What does simple NFT look like in TON Blockchain?

This is how your NFTs look like. A collection contract deploys NFT item contract for each token ID in the collection.
When you want to transfer your NFT item, you'll send a transaction to your NFT item contract (with your wallet) and change the owner in the data cell of the NFT item(you should be the owner of NFT item to do this).
So anyone can see who transferred which NFT item and sent it to whom.
🦄 What does Private NFT look like in TON Blockchain?
Assume that there is a magic black box, where everyone will put their NFT item(Lock🔒) inside it. And every owner has a key🔑.
So there are N locks in the bag. Also, there are N keys in the hands of N owners.
Each keyholder can do 2 things:
- They can send a key 🔑 and open their NFT item(lock🔒) and get their NFT item out of the magic black box( Reveal Ownership). Now their NFT item can be seen on their wallets(like normal NFTs) but they can later lock it again and send it back to the magic black box(Hide Ownership)
- They can send a key 🔑 and a new lock🔒 , open the old lock(🔓) of their NFT item, and lock it again with a new lock( Private Transfer)
This magic black box is inside the NFT collection contract code, and the magic is ZK.
Important notes
- Keys🔑 and Locks🔒 are for one-time use.
- if you want to privately transfer your NFT to someone, you need to ask them to generate a Key🔑 and a Lock🔒. They'll give you the 🔒 and keep the 🔑 safe. You'll use your key to unlock the 🔓 and lock it with a new 🔒(only the new owner can unlock it now).
- To have privacy the private transfer is done by the relayers(you'll generate the proof and instructions and relayers only broadcast it and earn their fee with $TONNEL)- Don't worry, relayers CAN NOT change even 1 bit of your payload and if they do, the transaction will be reverted!
- No one can detect which locks are for which NFT item!
- you can generate proof to show that you own an NFT with your 🔑 and you can share the proof with anyone and they can verify your claim very easily.
- Keys🔑 and Locks🔒 are generated on the user's device(client side)
- Owner of private NFTs on Explorers and GetGems is the magic black box( NFT Collection Smart Contract)
✍️ Why?? What's the point of all of this?
You might ask why should I hide my ownership and how can this be useful. Have you ever checked someone's wallet and saw their TON and Jetton and their NFTs? Probably someone also did that to your wallet too! They can see your Anonymous Telegram Number NFTs(is it really anonymous?), or your other NFTs in your wallet.
With ZK NFT protocol you can ensure your privacy and also keep your ownership on your token! you can transfer your NFT privately many times and as long as you don't need it in your wallet you can keep it inside the magic black box.
👀But what if I want to sell my NFT privately?
Currently, you can only transfer it directly, or reveal the ownership and sell it on Getgems.
But soon you'll be able to sell your NFT within the magic black box!
A ZK NFT Marketplace 👀
You'll be able to sell your NFT by using a fully private trade. If you have used the TONNEL pools, you can guess how it's gonna work.
- Buyer will deposit TON inside the magic black box.
- Buyer will use his 🔑 and generate proof for that TON and indicate in that proof which token Id he wants to buy with this key
- Buyer will give this proof to the seller, seller will send this proof alongside his NFT ownership 🔑 and boom. Magic black box will do the ZK magic and transfer NFT privately and withdraw funds to the given address of seller.
No one can see which NFT was traded!
🎯 Step by Step Tutorial of TONNEL ZK NFT
Let's see how the user flow is in the @Tonnel_Network_bot, you probably have a key that looks like this:
X_****......****
This key has two parts, the first part(X) is your NFT Item Id(Token Id), and the second part is a random 256-bit number.

First, let's test our key with "Get Ownership Proof🔑".

But if you check this NFT on GetGems, the owner of this NFT is not me! The owner is the magic black box(NFT Collection contract). So, Let's reveal it and use my key to receive my NFT in my wallet.
Click on "Reveal NFT🔓" to generate a proof and then send it to the magic black box to get our NFT out of the box!


Send this with any wallet that you want(Blockchain Fee will be 0.15 TON).

Now My NFT is revealed, it can be traded on GetGems or on any wallet that supports normal NFTs.
Now I want my NFT to be private again. So I'll click on "Hide NFT🔐" and send my NFT to the magic black box and also put my lock in the payload!

Now let's check our new key with the "Get Ownership Proof🔑"

Now let's see the real magic. My friend wants my NFT, let's send this NFT privately!
First, he has to go to the bot menu and choose "Receive NFT Privately📥", he will select the Token Id that he wants to receive.(Token Id of my NFT is 0, so he has to generate a key for NFT#0.

He'll send me his Lock🔒:
28130062361133656274424993060288891828020480916586846447905858301672604917114
Now I'll select the "Send Your NFT Privately📤" and enter my Key🔑 and his Lock🔒, this will generate a proof and broadcast it using relayers to keep you anonymous!

After a few minutes, he can check the "Get Ownership Proof" to see if his key is active!

If I check my old key, the bot will respond like this:

📌Some Additional Resources




📖 Source Code of Func Contract and Circom circuits
. . . . . . . . . . . . . . .
Please follow us on our social channels to get the latest updates on TONNEL Network
Twitter: https://twitter.com/tonnel_network
Telegram Channel: https://t.me/tonnel_en
Telegram Channel(Russian): https://t.me/tonnel_ru
Telegram Chat(English): https://t.me/tonnel_chat
Telegram Chat(Russian): https://t.me/tonnel_chat_ru
Website: https://tonnel.network
Email: freeman@tonnel.network