In this episode of The Van Wirdum Sjorsnado, hosts Aaron van Wirdum and Sjors Provoost are once again joined by Ruben Somsen. The trio discusses RGB tokens, a Layer Two protocol for Bitcoin to support alternative currency and token schemes (like the currently popular non-fungible tokens, or NFTs). Aaron, Sjors and Ruben explain that the Bitcoin blockchain has been (ab)used by users to host data since the project’s early days. This was initially done through otherwise-useless transaction outputs, which meant that all Bitcoin users had to store this data locally. A feature called OP_RETURN later limited this burden. They also explain that people have been using the Bitcoin blockchain to host alternative currency and token schemes for a long time. More resources on RGB Tokens: Chapters 00:00:00 RGB, NFTs and blockchain data 00:07:36 OP_RETURN and provably unspendable outputs 00:10:10 Rare Pepes, NFTs and digital ownership 00:13:32 Colored coins and real-world assets 00:18:58 RGB commitments and client-side validation 00:25:14 Transferring proofs and backing up token history 00:28:50 RGB tokens in Lightning channels 00:32:22 Routing, atomic swaps and token incentives 00:36:27 Growing and intertwined token histories 00:39:58 Bitcoin fees, security and alternative designs
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Aaron van WirdumBefore the show, a quick word from our sponsor. Live from Utrecht, this is the Van Wirdum Sjorsnado. Hello.
Sjors ProvoostHello. Hey, who's there?
Ruben SomsenIt's another Dutch guy.
Sjors ProvoostWelcome to the show, Ruben.
Ruben SomsenThank you.
Aaron van WirdumWelcome back, Ruben. Ruben, did you start selling your tweets yet?
Ruben SomsenYou know, like I tried to sell one of my tweets to my sister, but she said, what the hell are you doing? And then she just laughed at me. So I failed.
Sjors ProvoostWhich rule of acquisition is it? Exploitation begins at home?
Ruben SomsenYeah, exactly. I mean, families who you got to exploit first, right?
Aaron van WirdumSjors, did you make any good deals?
Sjors ProvoostNo.
Aaron van WirdumWe are actually going to discuss NFTs today.
Sjors ProvoostI have been making some really bad price predictions because I hope those tweets will become worth a lot.
Aaron van WirdumBad price predictions?
Sjors ProvoostYeah, bad takes usually make more money than good takes.
Aaron van WirdumI didn't know that. That's a good tip. Pro tips. But anyways, we are kind of discussing NFTs today, aren't we?
Sjors ProvoostYes, we are.
Aaron van WirdumNot exactly, but partly.
Sjors ProvoostVery exactly. Amongst other things.
Aaron van WirdumYeah. RGB, that's what it's called, right?
Ruben SomsenThat's right.
Aaron van WirdumJogged my memory there. What does it stand for, guys? RGB.
Sjors ProvoostWell, I think it's just a reference to the color scheme, red, green, blue.
Ruben SomsenYeah.
Sjors ProvoostBut it doesn't actually mean anything in the context that we're going to talk about it. It's just the letters.
Ruben SomsenYeah, and I think it's because…
Sjors ProvoostUnless they made it a backronym. I don't know.
Ruben SomsenNo, no, I don't think there's an acronym. It's referring to colored coins, right? So the colored coin idea of having other coins on the Bitcoin blockchain. The word color, RGB, that's how it's connected.
Aaron van WirdumClever. I didn't know that. Okay, so we're going to discuss RGB tokens today. Wait, is it RGB?
Sjors ProvoostThe RGB system.
Aaron van WirdumThe RGB system.
Ruben SomsenYeah.
Aaron van WirdumOkay, where do we start, Ruben?
Ruben SomsenWell, that's a good question.
Sjors ProvoostI think we should start with the very, very long time ago in a blockchain far away. It was really, really, really cheap to make transactions and people thought they could put everything on the blockchain. For example, the Bitcoin PDF. The Bitcoin white paper is on the blockchain in its entirety. And this was done in a very, very, very inefficient way, which is by creating fake transactions. And those fake transactions, so you're not spending to real other people, to real
Sjors Provoostaddresses, you're creating fake addresses that you can actually interpret and then you can reconstruct a file from it. So this would be, for example, multisig addresses.
Aaron van WirdumYeah, so the idea is that addresses, as our listeners will probably know, they're just a bunch of numbers and letters. They're effectively a number in the end. And by, I guess, you're manipulating these addresses, you're just creating addresses, even though you don't have the private key. Yeah, you're sending some coins to these and then special software can interpret these numbers and turn them into…
Sjors ProvoostYeah.
Aaron van WirdumWhatever data you want.
Sjors ProvoostPretty much. So we addressed addresses in an earlier episode, but in this case, the thing you're sending to wouldn't even be an address. It's a script that you put directly in the output of a transaction. And that gives you a lot of space to put stuff in. The technicalities don't really matter, but exactly. There is no private key with which to spend these coins because the public key, or even the hash of the public key, was generated as if it wasn't really a public key. It was just a series of bytes that looked like a public key, but actually just contained
Sjors Provoostthe contents of a file. And this means that money is unspendable, which is very annoying. And the reason for that is that... Coins, we have this thing called the UTXO set. The UTXO set is the set of coins that exist on the blockchain that can be spent by anyone. And nodes keep that in RAM. So when a new block comes in, the node will check whether or not it's spending money that actually exists. And this check is done using the UTXO set, which generally is kept in
Sjors ProvoostRAM, could be 10 gigabytes. And so it's very annoying when there's something in that blob of memory that everybody needs to keep track of that has no meaning, that can never be spent. Because the node doesn't know it can't be spent. The node just thinks anytime somebody could spend this, even though we know it's the Bitcoin PDF, you can't spend it.
Aaron van WirdumYeah. So what you're saying so far is that people were using, basically abusing the Bitcoin system in a way. They were manipulating addresses and sending coins to these addresses. Not a lot, but just some coins to have these addresses on the blockchain. And that translated into data that could be images or the Bitcoin white paper or other pieces of text or memes or whatever people felt like they were uploading. And because normal Bitcoin software can't really tell the difference, normal Bitcoin software just sees addresses. So now all these normal
Aaron van WirdumBitcoin nodes like mine and yours and all our listeners who are running Bitcoin nodes, they actually have to check the coins on these addresses.
Sjors ProvoostI think they have to keep those addresses in mind. So there's two things that happen, right? Because these things were put in the blockchain, well, you have to download the blockchain. So that's just wasted bandwidth for downloading. But that's not too bad. The problem is that it has to be interpreted as potentially valid coins. And as an optimization, you want to keep in memory those coins that could potentially be spent. And there's no way to drop them from memory. At least there wasn't.
Ruben SomsenSo the problem is that you think they are spendable as a regular full node, but actually they are not. But there's no way of knowing other than kind of externally figuring out like, hey, this is just a white paper.
Sjors ProvoostYeah, but you couldn't… you couldn't add that to the node right? If… if… Say, we made a change to Bitcoin Core that says, you know what, we know that's the white paper. Let's just skip those coins.
Ruben SomsenI guess theoretically you could throw it out of UTXO sets if you're certain they're unspendable.
Sjors ProvoostThat's the problem. If you're certain. What if some really, really smart alien actually made it look like it's just the white paper? But no, no, no. It's really... There are private keys for it. And one day this alien tries to spend... The white paper. And we accidentally soft forked those coins out of existence and this alien gets really angry because he's like, hey, you can't just confiscate my money.
Ruben SomsenThat sounds like an ECDSA break, but I'm not sure. Depends on, I guess, how it's done.
Sjors ProvoostMaybe the person who created the white paper actually generated lots of public keys from private keys and then reordered them in such a way that it… Created a readable white paper. I don't think that's even practical.
Ruben SomsenNo, but to your point, maybe there is a way in which it is actually valid, and we [unclear] be 100% certain. But one thing I wanted to add...
Aaron van WirdumThere's also a thing of where do you draw the line, because we do have vanity addresses, and you can sort of use that as well to create stuff. And where… at what point are you sure it's a vanity address and at what point…
Sjors ProvoostWell, this… this would be like that would be absolutely unacceptable right? So the idea that you can't just decide what is vanity and what should be thrown away.
Aaron van WirdumThat's my point, I agree.
Sjors ProvoostBut if you could mathematically prove that a coin cannot be spent, like theoretically impossible to be spent, then you could have that discussion. But the problem is we can't really prove that.
Ruben SomsenBut yeah, so one thing that I wanted to add is that... It is actually important that if you want to put data on the Bitcoin blockchain, it needs to be a valid transaction. So you can't just, that's why we're talking about these addresses, right? Because you can't just take the Bitcoin white paper and just put it there and just be like, hey, please put this in the blockchain. No, you need to do it in a format that the blockchain recognizes. And that's how you end up with these addresses.
Sjors ProvoostYeah.
Aaron van WirdumOkay. So that was... The original problem, people were just bloating the blockchain with all sorts of nonsense that most of us don't care about. And we still need to all validate it and store it or whatever. That needs to be solved. Sjors, how did we solve that?
Sjors ProvoostWell, this was solved many, many years ago using something called OP_RETURN. And the idea of OP_RETURN is that you create a transaction that spends coins and then it produces a coin, quote unquote, which has the instruction OP_RETURN. And then it's followed by whatever text you want to put on the blockchain. And now when a full node sees this, it knows, okay, if it starts with OP_RETURN, this coin is not spendable. Therefore, yeah, this coin is not spendable so I can forget about it. I do not have to put this in my RAM. I don't have to remember
Sjors Provoostthis. And the idea there was it was kind of a compromise. Say, well, people are going to put spam on the blockchain whether we like it or not. Let's at least reduce the amount of damage they're doing and make sure they pay like a reasonable fee for it as well. So there are some restrictions on the size of OP_RETURN to make sure that it's not too cheap to use it, but it is also cheaper than just spamming a blockchain.
Aaron van WirdumRight, so I guess we're still sort of unhappy about it, but if people are going to do it anyways, then this is the least damaging way of doing it.
Sjors ProvoostYeah, well, at least it pays fees when you do this, and nodes only have to download it, but they can throw it away. They don't have to remember it. So the resource wasting is just a little bit of bandwidth and one-off CPU, but it's not wasting people's RAM, and RAM is probably one of the most scarce resources.
Ruben SomsenRight.
Sjors ProvoostSo it's fine. It can't be done any better.
Ruben SomsenYeah. So the main thing is it doesn't enter the UTXO set and therefore it is a lot better than the previous solution.
Aaron van WirdumSo how much data fits into... One of these OP_RETURNs.
Sjors Provoost80 bytes.
Ruben SomsenYes and no, because I think that's not a consensus rule. That's just a propagation rule. So I believe it's actually valid to create one with more data, but then it won't be propagated. So yeah, practically speaking, you're right.
Aaron van WirdumBut... Can we do better? Can we compress it somehow?
Sjors ProvoostYeah, we could. No. Well, I mean, I think I know where you want to go towards the so-called Merkle tree.
Aaron van WirdumYes, please.
Sjors ProvoostBut I think we want to go somewhere else first because we can talk about the kind of fun things you can put in OP_RETURN that have meaning.
Aaron van WirdumOkay.
Sjors ProvoostWithout actually compressing it. So we'll get to the compression part later.
Aaron van WirdumOkay.
Sjors ProvoostSo let's say you really like Rare Pepe.
Ruben SomsenI know I do.
Sjors ProvoostSo Rare Pepe was a trading card system on the blockchain. And the way it worked is you could have a card and then you could offer it for sale and somebody could buy it and then that other people would have the card and they could sell it, etc.
Aaron van WirdumYeah, when you say card, you mean image. It's a digital image.
Sjors ProvoostYes, but in this case, it's important to note that the image is not on the blockchain. There's a reference to the image on the blockchain, the hash of the image. So I wouldn't still not call that compression, but I would say you're not spamming the blockchain with the entire image.
Aaron van WirdumSure, so explain this to someone who's new because it sounds like it makes no sense at all. You have an image and then you have a hash and then you have it on the blockchain. Why should people care about the hash or the image or any of this?
Sjors ProvoostWell, this is exactly what's going on with the NFT hype nowadays.
Aaron van WirdumThat's why I'm asking.
Sjors ProvoostSo I would say there's no reason to care about this, but people were doing it. So we just have to sort of explain at least what they were doing. And so what you would do is you would have this image somewhere, maybe on a web server or maybe on your own computer. And so everybody would have access to this image because it's just data. But the question is who really owns the image from whatever that means, right? Whatever it means to own the image.
Aaron van WirdumThat sounds like an important question though. What does that mean? But go on.
Sjors ProvoostI think it meant absolutely nothing.
Aaron van WirdumRight.
Sjors ProvoostBut the way it was done is like everybody would have the image and you could take the hash of the image and then the hash of the image would be on the blockchain. And so that's how...
Aaron van WirdumLet me… let me give you an example, where I think it might make sense, possibly, if you're playing something I've never played this, but you've got something like Magic The Gathering, if you'd want to make that into a digital version then, you could somehow prove that you own a specific card if you want to play it against another player. Well, if it's just an image, then everyone would have all the cards all the time. So now if you use...
Sjors ProvoostWell, that's the idea. Yeah, you prove that you have the image, whatever having means.
Aaron van WirdumRight.
Sjors ProvoostBut at least if everybody agrees on the rules, then you can do that.
Aaron van WirdumRight. So yeah. So within some contexts, it might actually make some sense.
Ruben SomsenYeah. I mean, I think it does make sense in some limited context. But the main thing is, is there going to be some kind of person who controls the NFT, right? If somebody issued it or they can issue more of it, then it becomes kind of questionable. But if it's like a one-time thing, like, you know, maybe somebody made a card game and it's just, it's kind of like a full node where you download the software's open source and then the software interprets the NFTs. And as long as everybody kind of agrees on the card game and the NFTs, then you have
Ruben Somsena card game with like you said, with cards that are actually rare. But, you know, anyone can just take the same game and play it for free. Right. So that's that's always inevitable.
Sjors ProvoostWhich is pretty much how this Counterparty slash Rare Pepe system worked as far as I know. So basically, you would put on the blockchain the hash of the image probably, and then you would say well, I'm now transferring this to this other person by just sending them coins essentially. And then whoever has the private key of where you sent the card has is now the new owner, and so you would have a piece of software that would read the blockchain and would see okay, this card is now moved to this other person and it's moved again.
Aaron van WirdumYeah, I want to take a small step back, and Ruben this is also something you wanted to discuss is the idea of colored coins. So we already mentioned it in this in the beginning of the episode. Yeah, so the idea of Ruben, colored coins, can you explain what colored coins are? and then we'll move on… Then we'll move back to NFTs.
Ruben SomsenYeah. So, well, it is very similar because a NFT is a colored coin of one, basically. So it really is just the issuance of an asset. The name colored coin has been kind of what's been used. I think it's been maybe Counterparty was the first.
Sjors ProvoostNo, Counterparty is not a colored coin.
Aaron van WirdumColored coins predate Counterparty.
Ruben SomsenYeah. There's Mastercoin. I don't know.
Sjors ProvoostI can give you an example of a colored coin. If you want, but let's explain how it works.
Ruben SomsenWell, yeah, okay. But, I mean, are you saying that Counterparty doesn't have colored coins? Because I think technically they do. You could issue coins.
Sjors ProvoostCounterparty can do colored coins, among other things.
Ruben SomsenYeah.
Sjors ProvoostBut colored coins was a system on its own.
Ruben SomsenI see. Okay.
Sjors ProvoostOkay. So the example I once even used, I think, was called Bits of Bullion. And what this was, was there was a trust, like a UK or whatever Cayman Islands structure, probably Gibraltar. And this trust owned gold in the real world. And then this trust had basically had its own bylaws and it would define the beneficiaries of the trust. So the nice thing about a trust is like nobody really owns the trust. The trust simply exists. And you create it and you set it
Sjors Provoostin motion and then it kind of just exists out there. It's kind of a cool legal structure. But basically this trust would own gold and then there would be an instruction in the bylaws of the trust that says, well, there's this colored coin out there on the blockchain with this and this block hash or this and this transaction hash. And whoever owns descendants of this original transaction is actually a beneficiary of the trust legally. And so is entitled to that gold to be able to redeem it if they wanted to.
Ruben SomsenRight. So what you're saying is basically that the... There is a UTXO on the Bitcoin blockchain and somebody basically said like, hey, if you own parts of the coins that are in here, then you also have ownership over something else.
Sjors ProvoostYeah. So for example, they might start with 10,000 satoshis and they would say every satoshi represents one gram of bullion in this specific vault, you know, at Brink's. And then if you were to buy this gold, you could basically go to whatever an exchange, you would send the right amount of Bitcoin or fiat. And then they would send you 30 satoshis. Now you'd own 30 grams of gold. And if you send those exact same 30 satoshis back, you could redeem it. But you could also send those 30 satoshis to somebody else.
Ruben SomsenYeah, so the coins, the satoshis were colored, basically. So it's where the naming comes from, right?
Sjors ProvoostExactly. And this is very, very brittle because you need to use a special wallet that understands these coins and keeps them separate. If you... put those satoshis in a regular wallet, it doesn't understand it. It will just spend it. And your entire scheme, you just destroyed your gold. But this really existed, so it's kind of cool. 2014 or 2015.
Aaron van WirdumYeah, the analogy I used when I tried to explain this to people is imagine you're organizing like a small festival and you go to the bank and you get a whole bunch of pennies. You put special stickers on the pennies. And at the festival, you can use these pennies with the special stickers and they're worth a beer. Right yeah, if you walk out of the festival with the pennies then there's still worth the penny, but only a penny.
Sjors ProvoostYeah, and if you accidentally like try to give somebody a euro, you know, 100 pennies, then you're screwed, because you actually just gave them 100 beers.
Aaron van WirdumExactly yeah. If that person knows how to get back to the festival at least. So yeah, you're… you're giving a new meaning to the satoshis on the Bitcoin blockchain. That's what colored coins are. Yes. And then we just discussed Rare Pepe and Pepe Cash and all that. And they did something similar, but they used OP_RETURN and it works technically in a bit of a different way, right?
Sjors ProvoostYeah, very much differently. So the colored coins really just use Bitcoin's normal transaction mechanism. You just combine these satoshis and move them around. But the Rare Pepe used more like a series of instructions. So I think two things that I guess it used, right? A series of instructions where you could say, create a new asset and do something with it. But also, if the asset moved on the blockchain, I guess it would also move. I've never really studied it in enough detail to completely [unclear] this.
Ruben SomsenYeah, I'm not entirely certain whether or not satoshis were moving and they had meaning inside of Counterparty. I thought it did, but I'm not certain.
Aaron van WirdumI'm pretty sure that's not the case. I think they just used the data from the OP_RETURNs and that data just meant something else within the Counterparty context.
Sjors ProvoostYeah, but at least the new owner was probably done using who got the coins, like which private key received what? I'm not sure how they would do it. Yeah maybe, they would have… the transaction might have two outputs, and one output would be OP_RETURN and the other would go to some address and then I… don't know somebody… it doesn't matter because there's something new and better RGB.
Aaron van WirdumThat's what the episode is about.
Sjors ProvoostThat's right.
Aaron van WirdumI think that's where we… we are now. We discussed: OP_RETURN, colored coins, the other thing, Counterparty.
Ruben SomsenYeah.
Aaron van WirdumAnd that was all to get to RGB.
Sjors ProvoostThat's right.
Aaron van WirdumSjors, what is RGB?
Sjors ProvoostDo I have to explain it? I thought Ruben was going to explain it.
Aaron van WirdumRuben [unclear].
Ruben SomsenOkay, so... With RGB, it's a very similar system in the sense that we still have these tokens that are being generated and they're being moved on the Bitcoin blockchain. But what we're doing here is we're using the existing UTXOs as kind of a vessel for which we add the coins there and we move the coins there. So let's say I have a UTXO and I have some RGB tokens in there. Well, first I would have to generate them, but let's skip that for a second. There's an output.
Ruben SomsenIt's mine. There are maybe there's 10 USD Tether RGB tokens in there.
Aaron van WirdumWhen you say in there, what do you mean?
Ruben SomsenSomehow, and that is of course like, so there needs to be some kind of Genesis moment, right? Where the tokens were generated. So the whole point of this system is that it allows you to create tokens and then spend them. And so first the USD Tether people would have to issue this token. And generally, the way that's done in RGB is actually you do use an OP_RETURN. So first, there's going to be a transaction. The transaction has an OP_RETURN, so everybody can kind of see it. And that transaction says, hereby, I declare that now inside of this new UTXO,
Ruben Somsenthere are just $1 million worth of USDTether.
Sjors ProvoostYeah, and this is actually where your, well, hash at least comes up. Because what is in the OP_RETURN, as far as I know, is a hash of a JSON file. So anybody who has the JSON file will know that the hash refers to it, and they can then read the JSON file and see what the supply is and what the rules are for whatever asset has been created.
Aaron van WirdumA JSON file is just text, right?
Sjors ProvoostIt's just text, yeah, with annoying brackets and, you know.
Ruben SomsenSo, okay, so now we have a UTXO with $1 million in their USD Tether dollars IOUs, and... When they first sent them to a buyer, somebody who says, okay, I'll give you $1,000, you give me $1,000 worth of these coins. So the first thing is what RGB does is client-side validation, meaning that the JSON file that Sjors just pointed out needs to be transferred during the coin transfer. So as soon as these coins, they move from one owner to the next owner, you also have to provide all
Ruben Somsenthe data, which refers to the hash that you put in the Bitcoin blockchain.
Aaron van WirdumRight.
Sjors ProvoostSo the first person who buys the Tether, basically, has to receive an email. And inside that email should be the JSON file. And I guess also a proof that, you know, they now own the coins.
Ruben SomsenYeah.
Aaron van WirdumRight. So that's the big difference compared to colored coins and Counterparty is that now we have a separate layer essentially of JSON file texts that are also being sent around and they're being linked to in the Bitcoin blockchain. Is that right?
Sjors ProvoostYeah. And this also detaches the amount from the amount that's really being moved from the amount of satoshis that's being moved. Yes, you're making a transaction.
Aaron van WirdumBut I think that was already the case for Counterparty.
Sjors ProvoostYeah, for Counterparty it is, but for colored coins it wasn't. For colored coins, the satoshis really mattered. But in the case of RGB, you're just sending somebody a transaction and then along with the transaction an email with what's actually happening. And that transaction might move one satoshi or a thousand satoshis. It doesn't really matter. The instructions are separate, are not on the chain.
Ruben SomsenRight. So, okay, so we have this one output with $1 million worth of USD Tether, and now they want to send $1,000 to somebody else. So what they do is they take that output and they spend it and they send it to another output. And it's still owned by the same USD Tether people who issued the first $1 million. But inside of that output, there is going to be, basically, there is a public key there that is the person who owns the UTXO. And inside of that, there is through
Ruben Somsensome cryptographic trickery that's very similar to Taproot they add another hash inside of this new UTXO and inside of this new hash There, they point to an output where they want a certain amount of these coins to move. So they would point to, in case, let's say I was buying $1,000 worth of USDTether, I would have to give an output to the USDTether people. And then when they spend their output, they will point back to me with the committed data. And
Ruben Somsenthey say, okay, now $1,000 are inside of Ruben's UTXO.
Aaron van WirdumWho else can read this? Can I read this? How do I know this transfer happened?
Ruben SomsenSo this is a hidden transfer in the sense that it's a commitment that's hidden inside of the public key. So it is literally... The USD Tether people need to show the commitment to me. So I can open a commitment. They can open a commitment. And I can show the commitment to you. And I can prove that I have a thousand of these USD Tether coins. And that's what I would have to do if I… let's say, I want to then send a hundred dollars to you Aaron. Then I would have to show that data. And that is the entire story of the client-side validation. The entire history of the coin in this case. The coins were created,
Ruben Somsenthen the coins were sent to me. I would have to show an entire history to you. And once you see the history and you're satisfied, you see like, okay, yeah, this is correct. Ruben does have 1,000 of these USD Tether coins. Only then will you accept another 100 from me.
Sjors ProvoostAnd… and this is kind of nice because it creates a really selective privacy thing. So, yeah, Aaron, you can see that you really got the 100 because you… you get all the history you need to confirm that. So from the 1 million, you see that 1,000 was sent to Ruben and from that [unclear] was sent to you. You can see all that. But what happened to the rest of that 1 million, you cannot see. I… I guess the only thing you'll be able to see is that you know, 1 million minus 1,000 was sent somewhere else. So it wasn't like increased, but you can't see what happened
Sjors Provoostafter that. So you get a… you know… You can imagine history as a giant tree of transactions, but you only get everything that leads to your little branch in the universe.
Ruben SomsenYeah.
Aaron van WirdumRight. So this sounds like we're making, well, I'm not making anything. The RGB people are making an entirely different cryptocurrency system that's being anchored in the Bitcoin blockchain, right?
Sjors ProvoostYeah, I guess.
Aaron van WirdumI think this already came up, but did you mention this off-chain part of it, the JSON files, are these actually sent through email? Is that actually how it works?
Sjors ProvoostYou can do whatever you want, but I believe there is a little do-it-yourself web server that comes with it. And if you run that do-it-yourself web server, then your special wallet... will actually know that it needs to send certain files to that web server, and it needs to fetch certain files from that web server in order to make sense of just the UTXOs. So it can all be automated, right? In essence, when you're using it, at least if the software has developed all the way to being nice, you would just say, I'm going to send 1,000 [unclear] to, you
Sjors Provoostknow, you have 100, Aaron, so you're going to send me 10. And you just click, you know, I give you an address, you click copy-paste the address, and you enter the number 10, you click send, and it just works. On your end, your wallet is uploading certain files to a server that has all the proofs, and on my end, it's actually fetching files from the server to see all those proofs. And in the case of something like Tether, I guess it would make sense for the Tether Corporation To… to be hosting that server because in the end they're the they… decide what
Sjors Provoosthappens anyway right? They're the counterparty. So you're already trusting them. So it doesn't matter that they also host some data which as far as I know they can't really decode. So it's still kind of nice from a privacy point of view right?
Ruben SomsenYeah, but it is important that you… you save your own data right? Because when I received one thousand dollars there may be maybe you know Tether has that data as well, and I have the data. but if the Tether company then starts to stops cooperating, now I can't spend it without the data that they were holding for me. So I need to hold my own data. I need to make sure that I have my entire history. So at the very least, maybe if Tether cooperates, great, you can get the data through them. But if they don't cooperate, I need to then go and show my data to you.
Sjors ProvoostYeah, exactly. It just means your backup is more than just your 12 words or your 24 words. You need the other data too.
Ruben SomsenRight. The history is basically your coin. If you don't have the history, you don't have your coins.
Aaron van WirdumGot it. This does sound like for every... Tether transaction, I guess that's the example we decided to run with. For every Tether transaction in this RGB system, we need a Bitcoin transaction.
Sjors ProvoostYeah, so the amounts don't have to match, and the Bitcoin itself doesn't have to go from person to person, but you do need a unique Bitcoin transaction for every Tether transaction, yes.
Ruben SomsenBut it's good to point out that it only has one input and one output. So you're not, even though there's only $1,000 of the $1 million went to me, on the Bitcoin blockchain, you'll have one input, one output, both owned by USDTether. And then another output that was already mined, it was already on the blockchain. That's where the $1,000 go.
Sjors ProvoostAnd I guess that means you could piggyback. So if you have to send money to an exchange anyway. Well, I don't think you can tweak that. Well, then at least your input isn't duplicated, but you would have two outputs, one that goes to the exchange and one that goes back to you, which actually has some meaning in the RGB protocol. Either way, you don't need a lot of data to do this.
Ruben SomsenYeah.
Sjors ProvoostVery small transactions, and maybe you can piggyback on your normal transactions.
Ruben SomsenYeah. Yeah, you can combine it with a Bitcoin transaction that you were going to send anyway, and then also do an RGB transaction at the same time.
Sjors ProvoostBut there's more.
Aaron van WirdumCan we do better?
Sjors ProvoostWe can do better.
Aaron van WirdumSure. Who's going to explain how to do this better? Ruben, sure.
Ruben SomsenI'm confused where we're going.
Sjors ProvoostWe're going to use a concept from Ruben's little show.
Ruben SomsenOh?
Sjors ProvoostThe Lightning round.
Ruben Somsen[unclear] Lightning round.
Sjors ProvoostBut yeah, we can do better with Lightning. At least in the example that we just talked about, because we talked about a fungible asset. So it doesn't matter which us Tether you have it's the same we previously talked about rare Pepe where it does matter what you have so what we're going to talk about only works for the fungible stuff.
Aaron van WirdumYeah, every usd Tether is interchangeable. You don't care which one you have, while when it comes to trading cards you definitely care which one you have.
Sjors ProvoostSo that's… that's a difference. And so that means that you can start basically creating Lightning channels where the coins in the channels are these these special tokens. Though I'm a little vague on how exactly that works.
Aaron van WirdumWell, so to be clear, that only applies to the fungible version, the Tether example we gave or the gold example we gave previously.
Sjors ProvoostBut the awesome thing about that, of course, is that it means that if you somehow get these Lightning channels to work with these colored tokens in it, we can start sending very small amounts of dollars back and forth Indefinitely. And only when the channel needs to be closed, we create this like Bitcoin transaction and send all the proofs that are needed just for that. So it means that the metadata you need to keep isn't isn't growing too quickly either.
Aaron van WirdumRuben, RGB tokens on Lightning? Do you see it happening?
Ruben SomsenYeah, so the way I look at Lightning is that it works for every blockchain. At least as long as they support, you know, they have time lock and maybe some kind of hash lock or point locks, what are they called?
Aaron van WirdumVery basic smart contracting tools.
Ruben SomsenSo I think it doesn't really matter what blockchain, what kind of blockchain you have. I think sooner or later, especially when scaling becomes an issue, you have to start using Lightning. And RGB is kind of made… so I would say it works for every every chain. It works for every kind of system. But in this case RGB is made very specifically to start working with Lightning as soon as possible. So they're really they're trying to make it happen right from the get-go so specific to NFTs, you can have them in a Lightning channel so you know maybe like
Ruben SomsenSjors and I we can open a Lightning channel but then we can only send the NFT to each other basically.
Aaron van WirdumSo there's more like a regular payment channel then, not a Lightning.
Ruben SomsenExactly.
Sjors ProvoostSo how would you have collateral of the same NFT or you would split it then?
Ruben SomsenSo, well, there would be one NFT and it would be with me. And then every time we update the channel, I can then give the NFT to you and then you can give the NFT back to me and we can go back and forth. But there will never be, you cannot do the hops, right? With Lightning, the whole point is that multiple people have channels and they can kind of send from one person's channel to another person's channel. Because Alice and Bob have a channel, Bob and Carol have a channel. So then if Alice sends an NFT to Bob, Bob cannot send the same NFT to Carol because
Ruben Somsenit's a different channel and the NFT doesn't exist in the other channel.
Sjors ProvoostOf course, you could tokenize the NFT. So then the NFT itself would be divided in like a thousand subunits. Whoever owns the majority of the subunits is actually in charge of the NFT. But people can trade sub-NFTs.
Aaron van WirdumYou're unnecessarily complicating things now. You're just inventing a new currency based on a single NFT.
Ruben SomsenA great business proposal.
Aaron van WirdumLet me ask a concrete question about this. Let's keep focused on the fungible RGB tokens, because these can be used in Lightning. So would that, in that case, mean that all of the hops need to actually also accept this fungible token as a fee to forward the payment?
Sjors ProvoostIn other words, do you need a colored Lightning network, like a completely separate network just for those colored [unclear]?
Ruben SomsenSo the answer is yes and no. At the very least, you need... The incoming… like the first hop needs to have the token and the last hop needs to have the token. But then all the intermediary… hops, they don't necessarily, like you can swap while doing, while inside of a Lightning channel. So you could have, USD Tether to Bitcoin. And then another hop that remains Bitcoin. And then the final hop is Bitcoin to USD Tether again. And in that way, you could
Ruben Somsenkind of lean on top of the existing Lightning network, but you would still need these in points and out points, and you would still need these swaps to take place, people to accept the swap.
Sjors ProvoostBitcoin Lightning is complicated, and you think atomic swaps are complicated. Well, you can do both and have something really complicated, but then you could indeed send US dollar values across the world. Instantly. Well, even if not everybody supports it,
Aaron van WirdumYou say you can, but then there's sort of the other problem where hops on the network can decide not to forward and see what the exchange rate does in the meantime.
Ruben SomsenYeah, exactly.
Aaron van WirdumBased on that, then end up forwarding or not.
Ruben SomsenYeah, so specifically there, I think ZMN, SCP, XJ, or something along those lines.
Sjors ProvoostWe call him Zeman.
Ruben SomsenZeman, yeah. Very Dutch. Zeman, yeah. Yeah, he put something on the mailing list saying you basically have the American call option problem where you can either forward the payment or you can kind of wait and see what happens so the final person who is supposed to receive the payments can either accept it or they can wait and then they can see if the price goes up or the price goes down and based on that they can decide whether or not they accept the payments. So because of that it is actually sort of like problematic to do these atomic swaps
Ruben Somsenbetween different currencies on Lightning network currently.
Sjors ProvoostWhich is a problem in general right? So the idea has been around to have a Lightning network of Bitcoin that could be connected to a Lightning network ish on Ethereum yeah, and you could just instantly swap between all these currencies but there are these kind of problems there. Yeah, then…
Aaron van WirdumOne other problem I think, is that unless miners are actually going to accept these fungible tokens in order to settle transactions on the Bitcoin blockchain which sounds like a stretch, they still need to have Bitcoin in the Lightning transactions that are using RGB and you need the fees for that. Yeah, it gets very complicated very fast.
Sjors ProvoostYeah, and I'm also wondering what the incentive structure are for like accepting, you know, you have these cheat transactions and then you want to punish them and if the monetary incentives are… if the monetary incentives in Bitcoin are not correct because most of the value is actually represented by a token which has its own exchange rate. I don't know what happens. This is where it's really [unclear] on the details. Sorry about that.
Ruben SomsenYeah, it's got to be a little difficult. But, you know, I don't think necessarily, at least the thing that Aaron was saying, you can actually have a Lightning channel for Bitcoin, which I would assume, you know, even if you were an RGB user and you wanted to use it on Lightning, you would also want to use Bitcoin on Lightning. That seems like a safe assumption. So you could use the same UTXO for that. So you could have a channel that you're using to send bitcoins back and forth. And then you can also put RGB tokens inside of it and do the same thing at the same time with a single channel.
Sjors ProvoostBut then it'd be kind of like a collateral. But then how do you make sure that, you know, I don't end up with just five satoshis in the channel. So I have every incentive to cheat, but there's this huge value of colored coins in it.
Ruben SomsenYeah.
Sjors ProvoostSo somehow you do need to compare the real value that's at stake in Bitcoin versus this tokenized value. So I think this gets pretty complicated. I don't know if we want to.
Ruben SomsenYeah. Yeah. I'm not sure about that.
Aaron van WirdumToo many worms for now. Let's move on to more worms.
Ruben SomsenDelicious.
Aaron van WirdumThere were more problems, I think.
Sjors ProvoostI think Ruben had one final problem.
Ruben SomsenYeah.
Sjors ProvoostThat's about it.
Ruben SomsenYeah. What we were saying earlier about to USD Tether.
Aaron van WirdumTo be clear, we're not talking about Lightning anymore. We're just talking about RGB. We're back to basic RGB.
Ruben SomsenWe're back to basic RGB.
Aaron van WirdumAnd there's a problem with it.
Ruben SomsenSo even for the Lightning network, right? Like you still need to use the base layer. And that's something that people shouldn't forget. You can't just be saying like, okay, well, because we can go on Lightning, it doesn't really matter how expensive the base layer is. You always need to have these base layer transactions first. Lots of people need to have USD Tether. Then they have to create channels with USD Tether. And then you can start using the Lightning Network. And even then, channels have to close and reopen and rebalance, et cetera. So you're still using the base layer. Okay, so the issue or the first issue would be simply if the token moved many times, you have to show the
Ruben Somsenentire history to the person you are sending your coins to. So at some point, maybe first it's like one megabyte, two megabytes, three megabytes. Okay, fine. But after a while, it becomes hundreds of megabytes or maybe even a gigabyte. What's worse is that...
Sjors ProvoostBecause we did talk about how you only have to share the relevant part, so I only need to see how my money originated from the source, but I don't have to see the entire tree. That saves a whole bunch of data. But even then, if the money is passed around 100,000 times, I need all those 100,000 transactions to see where it's coming from.
Ruben SomsenYeah, the data does keep growing regardless. And there is sort of an intermediate solution to that depending on what kind of token you have, you could give back the USD Tether to the USD Tether company and then they could reissue a new token with a history that's completely clean again. But that works only in the example of USD Tether where there's sort of an IOU system. If you have some… yeah, I'm not sure what kind of token this would be, but if there's some kind of token that is issued once and then never issued again then you can't do that. But problem is
Ruben Somsenthat the history of the tokens actually becomes intertwined. So if I have one USD… USDT, and let's say Sjors has one USDT and we both send these to to you Aaron then the the history of of both these coins becomes connected. So the proof for your $2 is both our histories. Now, after that, if you want to split them up again, and now you send $1 to one of your friends and $1 to
Ruben Somsenanother one of your friends. The history doesn't become unconnected again. The history stays connected. So each of them has to check the history of both Sjors coin and my coin. So this is basically another way of saying this would be if you have a Bitcoin on the Bitcoin blockchain, you can't actually go back and figure out exactly inside of which Bitcoin block that Bitcoin originated because the history is connected. And so because of that, what you end
Ruben Somsenup with is you might have to download a significant chunk of everybody's history instead of these paths that in the ideal case.
Sjors ProvoostSo I guess you're saying is the spaghetti strain gets longer and longer. And you get more and more spaghetti strains as money is being combined. So you end up with a ton of spaghetti, which is cool for an Italian project. I think that's all we got, right?
Ruben SomsenThat's right.
Aaron van WirdumWell, I want to ask you guys, do we want this on Bitcoin? Because it sounds like...
Sjors ProvoostWe don't have a choice.
Aaron van WirdumIt's just a whole bunch of data.
Sjors ProvoostWell, it's mostly data that exists outside of Bitcoin that we don't care about.
Aaron van WirdumYeah, well, it still requires transactions on the blockchain at least.
Sjors ProvoostYeah, but who can stop that? Because they look like regular transactions, so it doesn't matter what we want. We can't stop it.
Ruben SomsenYeah, so it's kind of like if we could maybe, let's say if you had the option to very easily add native tokens to Bitcoin where you could issue assets and you could just use them on the Bitcoin blockchain. If you did something like that... In terms of blockchain usage, it will be very similar, right? Because with RGB, you have kind of the same thing where every time you move a token, you do need to create a Bitcoin transaction. But that Bitcoin transaction doesn't really have anything to do with Bitcoin other than that it wants to kind of connect to it to be connected to its proof of work. So would we want that? Would we want people to
Ruben Somsenjust issue any token they want just natively on Bitcoin? And then most people would kind of say no. So RGB kind of forces that, the issue basically, and says like, well, you can just do it if you do it like this. So do we want that? Do we not want that? I don't think it's going to be terrible. I think it's going to be okay. And, you know, I don't think there's going to be some kind of token that is so popular that it will pull away most of the proof of work or something along those lines that would be kind of, you know, the doomsday scenario.
Sjors ProvoostYeah, the risk there is, we talked about that in other episodes about sidechains as well. If there is, say, the entire world's supply of gold is expressed as an RGB token, that's a problem because the market cap of gold is, you know, 10 times that of Bitcoin at the moment.
Ruben SomsenRight.
Sjors ProvoostWhich means that somebody who wants to steal gold through a double-spend attack, you know, might want to do that. And from a Bitcoin point of view, that attack would look uneconomical, but from a gold point of view it would look economical. And therefore it just messes with the incentive structure that we have. Yeah, but we're not there yet, and I'm not really worried about it.
Ruben SomsenYeah exactly. I'm actually, I think the opposite problem is more likely where Bitcoin, the fees are going to go up. And at that point you have to… if you want to use USD Tether you have to pay the Bitcoin fees to use your USD Tether and then you have to ask well, If I can use my USD Tether on any chain, why would I use it on the expensive Bitcoin blockchain? So I think that kind of becomes the bottleneck for RGB, where any token you want to move on RGB, at least without using Lightning, and as I pointed out earlier, at the very least
Ruben Somsenyou will have to use the base layer every now and then, will have to pay as high of a fee as Bitcoin transaction. And whether or not that's going to be economical, I don't know.
Sjors ProvoostYeah, exactly. And I don't know, if you're doing client-side validation anyway, maybe you just want to use a database, but...
Ruben SomsenPerhaps, yeah. And yeah, so specific, you know, the space chains, yeah, it wasn't called space chains back then, but the episode we did on the perpetual one-way peg and blind merged mining, it is actually a very similar system, right? So you could compare the two, but the difference is that… you are less connected to the proof of work right? Instead of having one… every every RGB transaction you make you need to make a Bitcoin transaction, you now have one Bitcoin transaction, that represents an entire block of of tokens basically. So that
Ruben Somsenwould at least make it cheaper to do tokens, but at the same time, you're also I guess less secure, because you don't have the the full proof of work kind of… it's not directly connected. It's a little bit more indirect. Okay.
Aaron van WirdumOkay. Wait, Sjors, I have one last question. Did you want to get into the Proof Marshal thing or are we going to leave that for a different episode?
Sjors ProvoostExactly. We have another can of worms that's called Proof Marshals. We are not going to open that.
Aaron van WirdumOkay. Do you want to end on a positive note?
Sjors ProvoostI want to end on saying thank you, everybody, for listening to the Van Wirdum Sjorsnado.
Aaron and Sjors discuss Bitcoin Core 32.1 and its updated security disclosure policy in this live conference recording, followed by audience questions. Links Bitcoin Core 32.1 release announcement and release notes...
Aaron and Sjors discuss the COLDCARD hack: the bug itself, how it could have happened, and some reflections on having had Coinkite as a sponsor. Note: If you’re using a COLDCARD and still haven’t moved your funds to a...
The COLDCARD hardware wallet has a critical vulnerability. If you are using the COLDCARD to store bitcoin, move them to a secure location as soon as you can. More information:...
Aaron and Sjors discuss what’s new in Bitcoin Core 31. Chapters 00:00:00 Episode 100 and Core 31 00:02:41 Cluster Mempool 00:10:45 Package Relay and Fee Selection 00:18:59 Private Broadcast over Tor 00:24:03 ASMAP and...