Bitcoin Forum
December 11, 2024, 07:27:49 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Building a NFT Game with BTC. Where Do I even start?  (Read 607 times)
JustAnOtherLoser (OP)
Jr. Member
*
Offline Offline

Activity: 37
Merit: 16


View Profile
December 25, 2021, 12:46:17 AM
 #21

Now if there could be an open application layer built on top of LN that including NFT funtionality (have no idea if this is even possible), rather than having to go with one of these sidechains controlled by companies which is pretty much no different than altcoins, I think that could have a possibility of being something big on Bitcoin.

That's exactly my thought / question: Is this even possible? When It's possible why is there nothing like that or am I not searching enough?

█░░ ▄▀█ █░█ █░█ █▀▀ █▀▀ ░ █▀▀ █▀█ █▀▄▀█
█▄▄ █▀█ █▀█ █▄█ █▄█ ██▄ ▄ █▄▄ █▄█ █░▀░█
BBGC NFT
Newbie
*
Offline Offline

Activity: 16
Merit: 4


View Profile
December 25, 2021, 01:47:57 AM
 #22

Now if there could be an open application layer built on top of LN that including NFT funtionality (have no idea if this is even possible), rather than having to go with one of these sidechains controlled by companies which is pretty much no different than altcoins, I think that could have a possibility of being something big on Bitcoin.
That's exactly my thought / question: Is this even possible? When It's possible why is there nothing like that or am I not searching enough?
What, if a LN channel closes? What happens to the 'NFT data'?


Building a NFT Game with BTC. Where Do I even start?
Start with an explorer/marketplace for Bitcoin NFTs Smiley But not using a sidechain.
I haven't yet read up enough on NFTs to confidently answer your question, but I'm pretty sure that they work a bit different from what you described.
Also, I already came across 'Bitcoin NFTs', which are sold on https://raretoshi.com/. While it's 'on BTC', it actually uses the Liquid sidechain.
JustAnOtherLoser (OP)
Jr. Member
*
Offline Offline

Activity: 37
Merit: 16


View Profile
December 25, 2021, 04:52:02 AM
 #23

What, if a LN channel closes? What happens to the 'NFT data'?

Let's imagine your Channel is like your Account/ID in that game. If you close your channel and did not sell every item, the Data is gone forever. The thing I dislike about this approach is that the game seems to be bound to some "master nodes" which kind of defeats the purpose of a decentralized game. It should also be possible to link NFT Items to an account (via BTC signing) even if the channel gets closed, but a tx on the mainchain should be maybe a backup solution if everything fails.

I did not test it by now, but it should be possible to use the "Memo" of an LN tx to store a Hash of what ever I want. I guess this alone should be enough to send NFT Data via LN. What concerns me is the part of opening a Channel. The question is: To whom?

Even a P2P Game that uses its Players as Host would eventually delete Data of other Users, which seems pretty unenjoyable  Grin Maybe some LN users would host these "Account Channels" to gain Traffic (= tx revenue) on their node? I don't know by now.

█░░ ▄▀█ █░█ █░█ █▀▀ █▀▀ ░ █▀▀ █▀█ █▀▄▀█
█▄▄ █▀█ █▀█ █▄█ █▄█ ██▄ ▄ █▄▄ █▄█ █░▀░█
JustAnOtherLoser (OP)
Jr. Member
*
Offline Offline

Activity: 37
Merit: 16


View Profile
December 25, 2021, 04:57:23 AM
 #24

You can check out elixir: https://launcher.elixir.app/games

There is at least one interesting game there lightnite https://lightnite.io/ . Sort of a low-poly Fortnite. Right now it's open beta ...
The NFTs are on Liquid sidechain but hey, close enough I guess  Tongue

Holy shit, how did I miss out on this?! Thanks! Liquid is a good start Cheesy

█░░ ▄▀█ █░█ █░█ █▀▀ █▀▀ ░ █▀▀ █▀█ █▀▄▀█
█▄▄ █▀█ █▀█ █▄█ █▄█ ██▄ ▄ █▄▄ █▄█ █░▀░█
rot13maximalist
Newbie
*
Offline Offline

Activity: 5
Merit: 6


View Profile
January 20, 2022, 01:26:58 AM
Merited by d5000 (1)
 #25

Not NFT-related, but you should check out what zebedee is doing. They're building wallets, APIs, libraries, and services to do lightning micropayments in games. They have a build of CS:GO where you get sats for scoring points in a match and it looks like they're trying to make it easy to integrate into other games/game engines. I'd say go make a game that's actually fun to play (as opposed to a game that serves only as a post-hoc rationalization for the existence of a set of NFTs) and then incorporate lightning micropayments to drive engagement and monetization.
d5000
Legendary
*
Offline Offline

Activity: 4130
Merit: 7745


Decentralization Maximalist


View Profile
January 20, 2022, 10:41:46 PM
Merited by pooya87 (2), ABCbits (1)
 #26

Even if I'm not really a gamer (and much less into blockchain gaming), I think the question whether LN is suited for NFT handling is very interesting.

For tokens in general, there's a framework called OmniBOLT to transact with Bitcoin-based tokens (For example, Tether started as a Omni token, and should also be compatible with OmniBOLT). I didn't know RGB, that looks interesting too Smiley

However, I see one big limitation in the usability of Lightning for NFTs, and that's rooted in the whole purpose of Lightning.

Lightning is basically a mechanism where you can bundle a big number of transactions into one (or two, if you close the channel eventually) on-chain transaction, the "channel opening" transaction. This however means that it makes sense principally if you do lots of transactions with that asset - be it Bitcoin or a fungible OmniBOLT token.

Now for a NFT, the problem is that it is not fungible, so you would have to open a LN channel for each NFT, because each NFT has a distinct value and market, so you (probably) can't bundle various NFTs into one channel. In most cases each account holder won't interact that much with a single NFT, maybe a handful of times as a maximum, so the benefits for Lightning are limited.

However, a type of game I could imagine where LN makes fully sense, would be one with the following characteristics:

- there are only a few NFTs circulating
- the game participants will be interacting in high frequency with every single NFT.

Imagine for example a game where there are only 5 NFTs circulating, and the score depends from trading movements between these 5 NFTs and Bitcoin. Opening 5 LN channels for the NFTs and one regular BTC channel wouldn't be a big problem for participants, and if everybody trades the NFT a lot of times while the game lasts, LN saves a lot of fees/transactions.

What, if a LN channel closes? What happens to the 'NFT data'?
Afaik this isn't the problem - if you close a NFT LN channel, then this NFT can "continue to live" in on-chain transactions. If you're the owner of it in the moment the channel was closed, it's you who will have the right to transfer it again, be it via on- or off-chain methods. Only a system has to be coded to "transfer the hash" smoothly from LN to on-chain and vice versa.

I did not test it by now, but it should be possible to use the "Memo" of an LN tx to store a Hash of what ever I want. I guess this alone should be enough to send NFT Data via LN. What concerns me is the part of opening a Channel. The question is: To whom?

To another game participant, of course; they could communicate via a web platform, LN itself or alternatively via some decentralized messaging system like Retroshare or Tox to request the opening of channels.

The best thing actually would be shared LN channels for NFTs between a group of players who have minimal trust between themselves. There are concepts like "account management" for Lightning which allow that; however, in these, one of the participants is the main holder of the keys and so the others must trust him.

There are concepts like trustless multi-party LN channels (also called "channel factories"), but as far as I know the maximum number of participants is currently ~10 and there are still no mature tools for it, so it's still a theoretical concept without actual practical usage. It may also depend on the Eltoo mechanism which needs SIGHASH_ANYPREVOUT.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3654
Merit: 11103


Crypto Swap Exchange


View Profile
January 21, 2022, 04:01:36 AM
 #27

Now for a NFT, the problem is that it is not fungible, so you would have to open a LN channel for each NFT, because each NFT has a distinct value and market, so you (probably) can't bundle various NFTs into one channel. In most cases each account holder won't interact that much with a single NFT, maybe a handful of times as a maximum, so the benefits for Lightning are limited.
Why not? We are talking about smart contracts here and all it takes is two parties who accept the token to agree on an exchange rate, then they can "swap" their tokens with each other with that rate. I think the same principles of Atomic Swaps can be applied here too except that it all happens in one network instead of two.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
d5000
Legendary
*
Offline Offline

Activity: 4130
Merit: 7745


Decentralization Maximalist


View Profile
January 21, 2022, 05:41:25 AM
 #28

Why not? We are talking about smart contracts here and all it takes is two parties who accept the token to agree on an exchange rate, then they can "swap" their tokens with each other with that rate. I think the same principles of Atomic Swaps can be applied here too except that it all happens in one network instead of two.
I'm not sure if I understand correctly what you mean. But for atomic swaps you also need two accounts (on each blockchain, or with each token if you're using two different tokens on the same blockchain). Atomic swaps are a connection between two transactions of different tokens where none of both can be done separately, but both are technically separate.

I'm not 100% sure my reasoning is correct, but the way I see it is the following:

Lightning's security is based on the principle that you always have to be able to close a channel, "freezing" the current channel state. But the "channel state" has always a maximum: the amount of the coin or token you and your counterparty (channel partner) froze when you opened the channel.

So can you simply create something new "while the channel is open" that didn't exist in your channel when it was opened? This "thing" (the NFT in this case) has to "jump into your channel" in some way, but isn't the security mechanism of LN and its double-spend protection limited to the original channel partners?

Probably however you could open, in a single transaction, a lot of NFT channels with some OP_RETURN magic in a few UTXOs.

I would actually be happy if I'm wrong, because that would create lots of cool use cases Smiley

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3654
Merit: 11103


Crypto Swap Exchange


View Profile
January 21, 2022, 06:13:18 AM
 #29

I'm not sure if I understand correctly what you mean. But for atomic swaps you also need two accounts (on each blockchain, or with each token if you're using two different tokens on the same blockchain). Atomic swaps are a connection between two transactions of different tokens where none of both can be done separately, but both are technically separate.
The scripts used in transactions could be used here, all happening in one network but with two tokens that could have different values.

Quote
Probably however you could open, in a single transaction, a lot of NFT channels with some OP_RETURN magic in a few UTXOs.
Here is an idea and I don't know how possible it is but maybe we could use the new Taproot scripts here too. In Taproot the spending script can have different branches where only one has to be revealed when spending on chain. One of these branches could contain information regarding the Omni tokens (the amount being transferred, the signature,etc.) essentially a similar scrip that is put inside the OP_RETURN output.
This removes the need for OP_RETURN and creation of channels from such transactions and the involving complications.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vjudeu
Copper Member
Legendary
*
Offline Offline

Activity: 909
Merit: 2290



View Profile
January 21, 2022, 07:29:44 AM
 #30

Quote
Here is an idea and I don't know how possible it is
It is possible. You can even split the whole NFT into small blocks and put all of them in a tapscript tree. Then you can decide, how many things you want to reveal: spend by key and push only one simple Schnorr signature, spend by script and reveal some kind of hash of the NFT, or maybe spend by script and store some small piece of that NFT on-chain. If you have some huge file, paying alone for pushing that on-chain is not an option, it is too expensive. But if you have many owners and each of them reveal some small part of that file, that could work better. Even more: if you mine a signature, so the first bytes will reveal the data you want to push, you can pay in computing power instead of paying in satoshis. You can even combine that and pay something in satoshis and something in computing power.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!