Preston Pysh | BTC111: Nostr — Decentralized Social Media & Bitcoin w/ William Casarin

Stephen Chow
42 min readJan 5, 2023

--

Link to the YouTube (the timestamps are based on this): https://youtu.be/8GhEezzto4Y

Preston Pysh: William, I am thrilled to have you here. I’m really excited about this conversation.

William Casarin: Yeah it’s great to be here. I haven’t watched too many of your podcasts, but yeah I’m excited to be on and to chat about Nostr.

Preston Pysh: This topic is incredible, and I think we just need to start — for everybody in our audience — I would imagine most are not familiar with what we’re talking about. So give them just a basic overview of what Nostr is?

William Casarin [0:51]: So Nostr is an idea that started from someone named Fiatjaf. He is a Bitcoiner in the Bitcoin community, and he was just trying to come up with a way to build a social network like Twitter but make it decentralized so it’s not in control of a single party — as we’ve started to see the issues crop up around that recently. So he just came together with this simple markdown document of, Hey, how could we do this? And that’s where it started. I saw this technology a while back and I was like, Hey this looks like a cool technology and then I started building on it and I’ve just been blown away at how impressive it is and how simple it is.

Preston Pysh: So people that are hearing that, the use case is really obvious: decentralized social media. You see both political parties trying to gain control. I think you see a lot of large banks trying to control the boards of Facebook and Twitter and trying to control the messaging. So that’s really what you’re after, right? But doing it in practice is the difficult part. So talk to us a little bit about why that’s so hard to solve from just technical standpoint — from just a broadbrush overview?

William Casarin [2:00]: Yeah so when you’re trying to build a network that everyone in the world can connect to and communicate with each other, you naturally have centralizing effects, just because — to even pull that off — you need some beefy servers, and those servers are run by someone. So the minute you try to make things more decentralized, typically that user experience gets very poor. So these networks tend to be a little bit more complicated than a centralized solution like Twitter. But now we’re trying to find what’s the best way to do this in a way that we can scale it out to more people. So this is where Nostr comes in: we think we have a pretty good idea of how to do this with not just one person in control but maybe a small set of people so it’s a little bit more decentralized. It’s a tough problem but I think we might be actually able to crack it with this one.

Preston Pysh: What’s the foundation? Because my understanding is that you’d have an event, and I think it’s really important for people to understand that you’re going to the protocol level, and then we talk about the client level. So get into some of that, and also talk more specifically about this idea of the event and the simplicity around the event in the protocol level?

William Casarin [3:04]: Yeah so the way I like to describe it is — if you’re not familiar with Internet protocols, they underlie a lot of the technology that we use like our web browser: it’s the HTTP and TLS protocol, and that allows us to contact any server, and the browser knows how to fetch it and render it and things like that. And there’s other protocols like e-mail where you can run many different e-mail clients, so like Gmail, Outlook, and they all can talk to each other because they’re using this underlying language. So this is all that a protocol is: it’s just an underlying language that computers can use to talk to each other. So what Nostr is, is we’re trying to [find out] what’s the language, what’s the computer language for social media? The basic idea that we’re trying to go for here is, instead of a Twitter-like model where you’re just sending a tweet to a single server, you just send that event or that note — like you mentioned — you just send it to any server you want, but they all understand the message that you’re sending them. So they’ll understand like, Okay, this is a tweet that this person sent out — and they save it to their server — and then other people who are also connected to those relays can just pull those messages. So instead of just getting it from one server, you’re just now getting it from 10 servers. So that kind of decentralizes the risk in terms of you being censored or your speech being controlled. But also, you get the benefits of having high performance servers, versus some type of peer-to-peer model where we’re all trying to get it from each other, which can be bad for performance. It’s a new type of protocol — I don’t know that many protocols that do it in this particular model — but for the use case of social media it works really well.

Preston Pysh: How are you able to make the size of the events small enough that if a person runs a relay or their own private server, that it’s just not tons of information and data that they’re storing? How do you truncate that and make it small, but still carry the underlying message?

William Casarin [4:42]: So there’s all this blockchain craze that took off recently and this idea where you just collect everyone’s transaction — everyone has to store everyone’s transactions — this is not what Nostr is. Nostr is not a blockchain. We’re not trying to achieve global consensus. So if you want to just run a relay in your own house that just stores your messages and your messages for your friends — that’s completely okay. You probably don’t want to sync Twitter’s database to your node at home because your computer will probably catch fire. It’s specifically designed in a way that allows you to get the messages from the people you care about from your own nodes, and then you can ignore a lot of the other busier stuff. So we can start to talk about different types of relays there might be in the future. I’m thinking about this a lot now in terms of like, What’s a public relay versus a private relay? But yeah, we’re just starting to see the beginnings of this, because right now there are just a bunch of public relays that everyone’s just sending all their messages to. But it’s starting to get kind of crazy with a lot of crazy people on the relay. So we’re trying to think about how we’re going to scale this out and what that’s going to look like.

Preston Pysh: That’s one of the biggest questions that I see is: five years from now, scale-wise, how in the world can something like this scale when you talk about the incentives around people running their own relay? For people that might not be dialed in, just think of that as like your own personal server. Or anybody can host as many of another person’s persona that they want, or as few as they want. But go ahead and and explain a little bit of that scaling.

William Casarin [6:04]: So a relay in some sense is like you take the town square. So Twitter and Elon Musk is trying to be the new public town square on the Internet — that’s fine, but it’s in control of one person. So what a relay is — in my mind — is it’s democratizing the town square on the Internet so that anyone can become a platform of speech that you can connect to. They’re kind of like free speech nodes on the Internet. The way that I see it breaking down is there’s probably going to be a public good or like public relays, which are kind of crazy — there’s going to be a lot of spam — but anyone can go there and get their message out, and it might be a schelling point for meeting up and things like that. But maybe you don’t want to have that crazy, hectic, wild west of communication. So maybe you’d pay some money to whitelist your pubkey and get onto another, maybe more semi-private public relay where you can have a more civilized conversation. But the cool thing about clients is they can connect to both. I can connect to the public relay, I can connect to the more chill relay that’s less crazy, and then I can turn them on and off at will and just see different perspectives of the worldwide conversation. Those are the two modes I’ve been thinking about recently. And then you can have a node in your own house just to back up your own speech. What’s cool is: every time you send speech into the Internet, it’s getting backed up onto your node in your house. And then if you ever want to broadcast your history of your speech, you can do that to the public world — to the Internet. And just backing it up has that benefit of: no one can just delete your speech off the Internet or take you off the Internet. You can always broadcast it to new relays. It has a lot of cool properties in that aspect.

Preston Pysh: There’s a lot of people, Bitcoiners specifically, that are already running their full nodes, and I’ve seen a lot of chatter with people saying, Hey, I want my Umbrel full node — which is, for people not familiar with Umbrel, it’s basically a turnkey, really simple, you don’t have to have a lot of technical chops to be able to run your own full node if you’re running this Umbrel version — and so people were saying, I want an application on my Umbrel that I can just basically run my own Nostr relay by clicking a couple buttons and it sets it up on the hardware that I already have that I’m running my Umbrel. Is something like this possible? If it is possible, how many personas could you basically load or store on something like that? For somebody who’s just running maybe a terabyte of hard drive on their Umbrel?

William Casarin [8:20]: Yeah I actually do this. I don’t have an Umbrel, but I have a machine at home that I connect to over a VPN — so I have a private relay that I connect to. And the reason I do this is A, to back up my speech just in case. I mean, I run a public relay and I’m like, I’m not worried about that going down, but it’s just nice to have a local cache of my speech that I have backed up. And I think just to start, that’s a really good use case — just the backup idea. But you could also use that as a local cache of speech that you want from the Internet. So for instance: let’s say I have a bunch of people that I really want to make sure that I get their speech from the Internet, so maybe I’ll know that they’re on certain public relays and I’m worried that those relays might go down. So I can sync their speech to my local node and only store the things that I care about. And it’ll be really fast and it’s on your local network and things like that. I see that as a really cool use case of having an Umbrel-like free speech node just for those use cases. But in terms of syncing the entire public relays to your local node is probably not reasonable — there’s no reason why you want to do that unless you really want to just see a public conversation and have it backed up locally. You could do it, it’s just that you’d need to have a lot more space, in that sense. But to give you an idea of how much this takes to store, I’ve probably been running the biggest relay for a couple months now, and I’m only up to like 4–5 gigabytes.

Preston Pysh: Wow.

William Casarin: Because it’s just small text. It’s just text. We’re not storing any media. All that’s in an event is just a content, some tags, a signature, and your pubkey, which is just a hex pubkey of your Schnorr key. It’s very small in terms of what you can store.

Preston Pysh: Do you think that there’s been enough functionality built into the events — these individual events of the Nostr protocol — or do you think that [more needs to be added]? Similar to Bitcoin, there’s this submission process. If people think that there needs to be more functionality added into the protocol, there’s this community. Talk to us about that process and then talk to us about the additional functionality that you think might need to be added into it or removed from it?

William Casarin [10:07]: The interesting thing about Bitcoin is that it requires some form of global consensus. So anytime you try to change the protocol, everyone has to agree. If people don’t agree to upgrade, then everything starts breaking, and we don’t want Bitcoin nodes breaking around the world because some people can’t transact and it’s not good. So Bitcoin is very strict in terms of how you upgrade it and things like that. Whereas Nostr doesn’t require global consensus. I didn’t even talk about this yet because I was specifically focusing on the social media use case, but Nostr technically doesn’t need to be a speech or social media protocol. It actually stands for Notes and Stuff Transmitted over Relays. And those notes can have content of any kind. So there’s some people using it for playing chess — there’s chess games going over Nostr right now. And the way that works is that each note has something called a kind, and all it is is a number. Speech notes are just kind 1. Your contact list is kind 3. And there’s end-to-end encrypted direct messages which is kind 4. But there’s an integer number of kinds you can do. So if you have a custom application and you want to run it on Nostr, the protocol is flexible enough to do that. There’s nothing we can do to stop you because you can just run your own relay and put your own notes of your own kinds on and that’s fine — that’s what it’s meant for. So it’s really extensible in terms of types of applications you can build on it. So that leads into like, Okay maybe there’s going to be a Substack for Nostr where — with content publishing or publishing blogs — you don’t even need to run a server. You can just publish it to the public relays. There’s a lot of cool use cases that people are not even exploring yet.

Preston Pysh: Wow. So I think you said kind 4 was encrypted messaging. When we set up this discussion, that’s how I contacted you, was over this encrypted messaging system. I’m curious if, in your opinion, do you find that to be more protected from a privacy standpoint than something like Signal?

William Casarin [11:53]: So Signal is probably much more secure because they have hardcore crypto people who are working on state-of-the-art ratcheting technology to make sure it’s forward secret. Our encryption spec right now isn’t that good — it was kind of just thrown together. So there are some flaws with it. For instance, if you ever leaked your key or I ever leaked my key or someone got access to it, they can see both of our conversations. Whereas it would be much harder to do on Signal because they have much better properties for that. But there’s no reason why we couldn’t build something like Signal on top of Nostr because of the extensibility. So I have a bounty that’s like: If you want to implement a cool Signal-like level spec on top of Nostr, I’m happy to pay to get that going, because I definitely want better secure comms as well.

Preston Pysh: Going back to the discussion on the Umbrel, as far as people running their own full node: let’s say that there’s a Nostr app that’s built, that’s integrated into it, and I want my node to basically monitor a hundred different people that I personally follow very closely. From a storage standpoint, you were talking about how small the storage space is. Do you think that — for the typical person that wants to closely follow a hundred people — that should be no problem? To basically input those addresses of those people?

William Casarin [13:06]: Yeah I think for most people they won’t even need to run their own node. This is more already the power users. This protocol is set up so you don’t need to run anything. So it already has a somewhat advantage over Bitcoin in the sense that you don’t really need to run your own node. Again, the protocol is designed that way, just so it’s just that easy. And not only do you not need to run a node, you don’t even need to have a phone number or an e-mail address — you just generate a key and get going. So that is already huge compared to most things you’re used to online where you need to KYC yourself and things like that. But if you do want to run your own node and you do want to sync stuff locally? Yeah, it’s super trivial. And even if it does get too big, it’s not like a blockchain where you need to keep the whole history — you can just chop off the data, because a lot of the time there’s this thing on social networks where older data seems not that interesting or not as useful. The value of older data isn’t that [great] unless you’re going back and looking for old tweets. So there might be a concept of an archival relay and maybe more just like a real-time relay, that you don’t really care about the older data. It’s very flexible in that sense.

Preston Pysh: So let’s say I’m running my own relay and I wanted to be nefarious and say — well, we’ll just take your feed as example — and let’s say that I’m trying to misrepresent something that you’re saying and I want to create an event that says the opposite of what you said. And so then I’m propagating this event that’s a fake event. How do the clients — I know it has to do with you basically signing that event, but — if I was going to try to misrepresent something, how is that protected against? Walk people through that?

William Casarin [14:35]: These messages are just small JSON blobs. JSON is just a data format that’s very simple text. So the content, the tags, and pretty much all the data on the note is signed using something very similar to a Bitcoin key, and it’s called your Nostr key. That signature is included in the message. And when you send it to a relay, the relay will actually check the signature, and it won’t even store that message unless it’s a valid note from that person. So that’s why that signature is really important, because your client will say, Yes, verify this is from this person. But there are some things that people can do like phishing attacks. Because there’s no unique username on this protocol, really. The only thing unique is your pubkey, which is like a long key. So you need some way to distinguish if a person is [who they say they are]. Like, people are not going to be memorizing people’s pubkeys. So the way that I do it in the Damus client is that if you’re following the person, it’ll show an icon next their name like, Hey, this is someone you know. But if someone is trying to pretend to be someone else, it’s very visible because it’s from a different key. And there’s other things we’re doing as well, which is domain verification. So you can have JB55@JB55.com and it’ll be very apparent on your profile, so you know that that person actually is who they say they are.

Preston Pysh: Amazing. Okay, let’s talk about the clients. For people that are non-technical listening to this, I’m going to provide what I think it is and then I want you to correct me and give us the actual definition. But people are familiar with Twitter, and so they log in to “Twitter,” and let’s just say that’s a client. Then you have Facebook — that might be another client that people hear and recognize from a brand standpoint. These are just interfaces to the Nostr protocol that is all the messages people have created throughout their lifetimes. And so you’re developing a client right now. Talk to us about this client, this software that you’re developing, that allows people to tap into this network of messages that are out there.

William Casarin [16:33]: Right now, since all the social media companies are not using any underlying protocol — their “protocol” is simply their API to their centralized servers and it’s usually very locked down and they don’t interoperate. So if you send a tweet on Twitter, it’s not going to show up on Facebook, right? It’s just not something that people expect because it just seems so ridiculous. But the minute you have an underlying protocol, sending a tweet and it showing up on Facebook would be a very reasonable thing. Or even just retweeting a tweet from Facebook if that’s [how you call them]

Preston Pysh: Whatever those things are called.

William Casarin [17:02]: It might show up on the Twitter side. As long as you have some common language, right? So this is kind of how it works right now. So I’ve written an iOS client called Damus. It doesn’t do anything fancy — it doesn’t connect to my servers — it just connects to relays. So the messages you see on that client could be people posting from the web clients that I haven’t even written. There’s probably 10 or 20 clients that people have written on Nostr, and people are all communicating with each other. It just enables more flexibility in terms of what types of clients you want to use. For instance, I know someone who runs a terminal client, and this might be really good for people who — for accessibility reasons — just being able to use a text-mode version of your Twitter client. There’s a lot more flexibility in terms of the experiences you would want to have on Nostr, just just by having that flexibility between the clients.

Preston Pysh: I can tell you: so I have my iPhone. I have the Damus app downloaded — it’s in TestFlight right now, so if you want to download it onto your phone, you have to download TestFlight and then you go to the Damus website and you can download the app right off the App Store. And it works just like Twitter right there on my phone. I mean, it looks a lot like Twitter: the feel, the interface, everything is very much like Twitter. And then I go to my computer. and I go to astrol.ninja. And I signed in with my private keys — and that’s a whole nother thing for people: there’s a safer way to do it, and we might get too technical through an app called Alby, which is what I would highly recommend people do if they’re working off of their desktop computer. But for simplicity, I went to this astral.ninja website, I logged into my account that I’ve been creating these effectively tweets from my iPhone through the Damus app, and it’s almost like what we were describing earlier where I was logged into Twitter on my phone and then I went to my computer and it was like I logged into Facebook and I’m seeing the same exact messaging — it’s crazy!

William Casarin [19:06]: Yeah, and we all support different features. I think astral.ninja doesn’t even have likes or anything. It causes a lot of confusion because when people are talking on the network they’re like, Oh this is broken. And then everyone’s like, Okay, what client are you talking about? What’s broken? So there’s a lot of interoperability we still gotta figure out, but for the most part if you’re just sending text messages we can all kind of communicate with each other, which has been really cool. It has this network effect, and I think this is going to be very underappreciated: the network effect that you have. There’s a reason why e-mail is still everywhere is because of the network effect: everyone has it, everyone has servers, and everyone has clients and we’re just so used to it. Just having it as a protocol really helps it spread to a wider audience.

Preston Pysh: Well, explain this to me: so we have an e-mail protocol. Why couldn’t we use that protocol for this type of activity? What’s the differences?

William Casarin [19:55]: Yeah, so with e-mail there’s not a concept of querying Notes. Because let’s say I wanted to pull an e-mail thread from somewhere. There’s not really a good way to do that. I don’t know, maybe there might be a way to do it to hack it, but it wasn’t really designed for that use case. It was more designed for sending these long-worded letters and stuff between servers. Whereas this is: we are trying to build it more for a Twitter-like experience. So maybe you could build Twitter over the e-mail protocol, but that would be pretty crazy.

Preston Pysh: Well, it seems like that protocol was designed for point-to-point, where this is more designed for just broadcasting, right?

William Casarin [20:34]: Yeah, so you’re just broadcasting a message to the public and then people may or may not hear you depending on which relays they’re connected to. Maybe it’s more closer to Usenet or the old school mail servers or something.

Preston Pysh: So you’re doing the Damus app — do you see clients specializing in certain benefits or restricting things in the future that gravitate? And does that potentially cause a split in the network or these compartmentalized groups?

William Casarin [21:08]: I think so. We’re going to see lots of different things play out. There’s going to be some clients that just are maximum interoperability and just want to work for all the different types of messages. There’s some clients who are just going to want to craft a more friendly user experience for their users so maybe they’ll block all public messages unless you’re verified on their platform — and that’s okay! I think we might have them as like a company Slack. You have an internal relay within your company and you just use that for communications, and you can use all the standard clients to talk to your company Slack and it’s not controlled by Slack and you control your own data. So you get a lot of flexibility for these use cases. Yeah I can see it playing out in many different ways, it’s just we’re very early and I’ve yet to see — it’s really just public relays right now, so we’ll see.

Preston Pysh: So I don’t think that Bitcoiners would have this concern, but I think other people might where there’s a bit of protection that you currently get with the centralized servers where you don’t have pedophiles, you don’t have people doing racial slurs, and this type of stuff because it’s being monitored. But this is the wild, wild west. I mean, you could literally go on there and say anything you want. Everything’s anon unless you want to be known who you are. And so it opens up this free communication [that] people can hide behind. How do you see that playing out? This can’t be stopped — this protocol can’t be stopped, so I think that that’s out of the question. I’m curious if you would agree with that, but what are some of your thoughts on this?

William Casarin [22:33]: Again, I think it’s just going to come down to: there’s going to be a wild west part of the network — of the public relays and just crazy people shouting at each other — but even in that mode where you have the public wild west, you can still build clients that only pull messages from your friends. So clients will have very strong filter capabilities, and I suspect clients might even compete in terms of creating the best algorithm for filtering a lot of this garbage. And this, again, should always be a client choice. Initially I was always like, Oh, well maybe relays should just be completely dumb and just never filter anything — and I’m still kind of along those lines. I think that clients should provide the tools to filter everything that people don’t want to see. But yeah it’s hard to say. I totally imagine there’s going to be a situation where you have private relays that just filter all this stuff and have heavy moderation. And people who are on the fediverse right now, they kind of prefer that. Maybe there’s a certain type of people who prefer heavy moderation and that’s fine, and you can only connect to those relays. But even just today — just having the public relays and all this crazy stuff going on — just being able to only see messages from your friends and friends of friends already filters out a lot out of the nonsense. Again, there’s so many different ways to deal with the spam on this network, and I’ve been brainstorming all the different ways. I think it’s going to be okay as long as we have this underlying protocol that’s just uncensorable — I think that’s the most important part, so we can start to build these type tools on top of it.

Preston Pysh: So I can tell you from personal experience using your app: so I go into the settings where it’s just the people that I follow. I think I’m following a hundred people on the platform — and I mean it’s just pure signal. It’s so nice because all the politics are not in there. It’s just awesome. You can see everybody building. And then I’ll click on the global search and I’m seeing the global conversation and there’s a lot of cesspool there. And I’m curious — I’m assuming you’ve had the same experience, but — from a spam standpoint, how does that evolve? How do you start basically putting a cost to spam and bots? You’re seeing it on Twitter — it’s a disaster of bots. So how does that work with Nostr?

William Casarin [24:42]: I’ve been thinking about this a lot and I think there’s a couple ways to do it. Again, there’s two kind of modes: there’s this one mode where you may only want to talk to your friends, and that’s easy because you can only pull messages from your friends. That’s just a query that says, Only give me these messages from these pubkeys and you’ll never see anything from anyone else. That’s fine, but if you want to have more of an open — you don’t know who wants to talk to you — you want to be able to accept messages from strangers. Unfortunately, messages from strangers aren’t always the nicest messages. So I think there’ll probably be a mode — and I’m planning to do this in Damus — where any message from a stranger that either shows up in your DMs or notifications is going to have a cost associated with it. I put together this spec on Nostr called the proof of work spec. It’s based on Adam’s Hashcash. It’s basically identical to Hashcash: it’s just counting the number of zeros on the ID of the Note. And then we have a special way to query the number of leading zeros in the protocol. So you can say, Okay, if it’s not from my friends but I still want messages from random people, you can send it to me but you’ve gotta do some proof of work before I receive that message. And maybe we can put that as a label on your tweet that says: If you’re a stranger and you want to send me a message, just just know: I won’t get anything because I’m not going to query it, but if you want to try to send me a message, you’ve gotta run your CPU for like an hour. So I think that’s one cool way [to combat spam]. I don’t know how scalable that is, but it’s kind of fun. Another way I’ve been thinking about it is this whole idea that Michael Saylor was talking about at one point is the orange check: imagine you go to some service provider and you can just buy a badge — we’re working on the badge specs so you can attach badges to your profile and it’s kind of fun — maybe you buy this orange check badge and your client recognizes those and you can use those to fight spam. So if someone has that badge? Okay, fine — if you’re a stranger you can reply to my thread. Those are the two that I’m looking at in terms of getting messages. But yeah, there’s other things as well like paid relays, so everyone who’s on the relay pays that wants to get on. Those are the things I’ve been thinking about right now.

Preston Pysh: So for people that aren’t familiar with Michael’s idea, I would just describe it like this — this is how Michael also describes it when he is trying to explain it to people — is just: if you go to a hotel and you check in, they’re going to swipe your card for $100 or $200 and they’re going to put a hold on the card so that if you would go into the hotel room and break the faucet or cause damage to the room — that they’ve already taken some money from you that you can’t claw back. When you think of your Twitter or Nostr or whatever and you’re posting a tweet and somebody comes in there and is just wreaking havoc and is just a total idiot, they would have to post some type of collateral — some small amount. Let’s just say it’s 25 cents to make a post. And if they’re in there swearing at you or they’re a bad actor, you can basically take their 25 cents within a certain period of time. Let’s say that it’s active for one hour or one day or whatever that they have to basically post this collateral, and you can take it if they’re a bad actor. And if they’re not a bad actor well then you don’t do that because then there would have to be some type of, This person takes any amount of money that’s posted to their feed. So there’s a star ranking or something that talks to your history of whether you’re taking people’s posts, or you yourself are a bad actor on that policy. So that’s the idea: there’s an economic consequence to being a bad actor. And so where I’m going with this, William, is — I saw this on Nostr — you said, None of this would be possible without the Lightning Network. You believe none of this would be possible without the Lightning Network. Explain what you mean by that?

William Casarin [28:20]: Lightning enables very fast point-to-point transactions without dealing with the legacy financial system. So this allows for really tight integrations with incentivizing relays to stay up because it costs money to run a relay, so we’re going to need some ways to incentivize relays to run. This originally came about because I’m starting to integrate Lightning more and more into Damus: right now you can post a Lightning invoice in a post and it will just render a little cool widget so you can click Pay. People love that feature, but this is just the start of this where maybe there’ll be a sat button where you click it and then you can just send sats instantly to another person on the network. So I started thinking about what is it going to look like when anyone in the network can send sats instantly to anyone else on the network, and you have these network effects where people are doing this all the time? Well, maybe it’d be cool if you just take a portion of that and just send it to all the relays you’re connected to, to incentivize them to run, as well as to maybe even whitelist your key for some temporary amount of time. Imagine you send me some sats, so I trust you for now so I’m going to let you post to my thing for the next day — and if you keep sending sats. So that is in some sense an aspect of what you were referring to of the orange check where you’re putting down collateral — you don’t get it back — I mean, I guess that relay could send it back to you once you’re done. But I think that’s one possible way to fight spam that’s really cool. And I think Lightning specifically enables that because it’s just so fast and easy, and relays can put a little Lightning invoice or LNURL on their relay and your client can easily connect to it and send to it without any coordination, which is really important.

Preston Pysh: Do you find traditional social media platforms being able to benefit from this protocol by incorporating it in some kind of way? I mean, it’s all centralized for them today, but maybe they move a little bit towards decentralization and then it allows them to optimize their performance. Is that something that you think is possible?

William Casarin: This is already happening!

Preston Pysh:: Oh really?

William Casarin [30:15]: So, props to Bill at minds.com, because we had a call with them a couple months ago and with their team and we were like, How can we integrate Nostr into your platform? Because we were talking about it with ActivityPub and the previous protocols — they were looking at [them] and they’re like, Oh it’s so complicated! And they’re like, Well let’s try it with Nostr. So they were able to build a Nostr relay and you can connect to it. It’s still kind of buggy — we’re still working on it — but if you connect to it you get this fire hose of events from their platform, because they have a lot of users. And it uses this feature that they developed called delegation. They actually created a new spec so that if you go onto the platform and do a post, it can create events on behalf of a Nostr key — that gets a bit more complicated, but — it basically allows them to post events to Damus and it just works. So minds.com is a Nostr client that sends Notes! And there’s no reason why Twitter, for instance, couldn’t implement Nostr. It’s a really flexible protocol where any large platform could in theory implement it. Hopefully one day Damus can connect to Twitter.

Preston Pysh: Would that save them on cost because they’re not having to store as much data on their own servers? Or what would be the benefit or incentive for them to do something like that?

William Casarin [31:25]: In some sense the Nostr relay would just be an interface to their database, so they still store all the data. The benefit to them is that they get access to the wider [ecosystem] — if Nostr eventually takes off and everyone’s using it — then your Slack channel can communicate via DM to Twitter or something. They get the benefits of that network effect, and then Twitter could just become the best Nostr client. Because it’s a pretty good client right now — I love Twitter! I’ve been using it since like 2007. So I wish they would implement Nostr. But I think it’d be technically challenging just because they built all of their infrastructure around Twitter, but they could totally run a Nostr relay even without the Twitter client itself being a direct Nostr client — other clients could still connect to Twitter. It would be hard, but it’s doable. And that’s kind of cool that it’s even possible.

Preston Pysh: So we had mentioned earlier that you’re designing this Damus client that connects into the Nostr relay of all these messages. And this is on iPhone iOS. The first question I saw on Twitter whenever I said I was going to be interviewing you is, Wen Android?

William Casarin [32:28]: This is my number one question and I’m like, Oh yeah I’ll just do it tomorrow — I’ll just put together a whole Android client. No, but I was working on one when things were much more chill and I had time to tinker and build multiple clients. But yeah I have so many users on iOS now, I’ve been just trying to put out fires over there. I would love to get back to the Android client. I’m hoping for someone to just build one and then I can just use that so I don’t have to do it — I’m still waiting for that. There’s a couple in progress and I hope they’ll be up to speed and up to feature parity with Damus one day. But yeah, I would love to but I don’t know if I have time to do it.

Preston Pysh: When do you think you’re going to get outta TestFlight?

William Casarin [33:01]: Oh I’m going to do it soon. I’m probably going to try to submit it today or tomorrow.

Preston Pysh: Oh wow.

William Casarin [33:07]: Because we hit the beta limit, so we hit 10,000. We went from 5,000 users to 10,000 users in like two days. I didn’t even know there was a beta limit on TestFlight. I was like, Okay I guess I should look at releasing this app now.

Preston Pysh: So that’s a good sign.

William Casarin: Yeah, apparently. Thanks to Jack. Ever since Jack started tweeting about it, everything went crazy.

Preston Pysh: Biggest challenge you face right now on the Damus app?

William Casarin [33:30]: I think the biggest challenge right now is getting the UX up to par with what people are familiar with on Twitter. I’m not even an iOS developer! I had an iPhone at the time and I just wanted an app for Nostr. It’s the first time I ever built an iOS app. I have no idea what I’m doing so the UX is completely terrible. I’m not even a UX person so I’m surprised that it’s even usable, but I’ve had a lot of people who are helping me out and making it much better. So that’s nice. Other than that, once I get it released it to the public my biggest concern is the spam issue. Because if people have a really bad experience — and we have like Nazi propaganda of flying through the global feeds — that’s probably going to be instantly banned from the app store to begin with, so I’m going to need a way to filter that. I was thinking maybe there’s a premium version where you can get on a paid relay or something. Then again, we’re already starting to move to privatized relays, but maybe it’s inevitable. I don’t know. I’m just worried that people have a bad experience. Because a lot of times they’ll join an app thinking it’s just going to be like another Twitter and everything’s moderated for them. But in reality, this is the wild west. I can’t control what people see in some sense. Because if they connect to a relay, I’m like, I can’t control what you see — that’s what you got from that relay. I can’t stop that speech. That’s my biggest concern right now once this starts getting more popular.

Preston Pysh: For a person who’s hearing what you just said, they might think, Oh my God, this is just going to turn into a centralized thing, if the App Store can moderate these clients like this. But I would maybe push back and say, I don’t think that it is a centralizing force because anybody can go out and run their own relay and it’s not hard to do — well, I won’t say it’s not hard to do because I’m struggling! But I think in the future it’s going to be very easy to do. And the cost, the barrier to entry to run your own small relay is going to be very minimal in the grand scheme of things for people to do it. And I can still check into all these Notes via web browser, right? That’s not something that Apple controls. I’m curious: if somebody’s posting content there, it’s not your app that’s creating that content. So how would you be responsible for the global messaging that’s happening on the Nostr protocol? And how would you be held responsible for that? Or would you not?

William Casarin [35:45]: And that’s the thing: in some sense it’s just a web browser. Is Chrome responsible for every crazy website that someone puts up? It’s like, No that shouldn’t be the case! Maybe I have some responsibility for the bootstrap relay list — there’s some initial set of relays that you connect to — so maybe that would have to be locked down just because I’m providing that. I don’t want that to be the case because I want this to be an open network, but it really depends. I have to look through the Apple terms of service because I don’t want to get banned — I really like the app I’ve been working on. But if I do get banned, I’m actually not that worried — it’ll just give me more time to focus on the Android version or something. It would be sad, but I could totally see Apple maybe getting upset about this app just because it’s too much free speech or something.

Preston Pysh: Too much free speech — holy moly.

William Casarin: Shut ’em down!

Preston Pysh: Biggest reward that you’ve experienced building this client?

William Casarin [36:31]: I just love seeing people get excited. It reminds me of the early days of IRC or the old school Internet protocols — these crazy, fun, weird networks — where people are communicating with each other freely. And just the amount of feedback I’m getting from people saying like, This is revolutionary! This is blowing my mind! And people are so excited. I’m like, I’m just sending JSON messages over WebSockets? I guess it’s kind of cool, but in some sense it does have these wide-reaching implications. For me, it’s always just been kind of like this toy thing. And this was always the same thing with Bitcoin as well. I got in like 2010, just playing, just always just a toy to me, I didn’t know anything about the monetary [aspepcts]. The more I start to build it out I’m like, Holy crap — this actually does have some pretty big implications. And I think that’s why people are excited: they can see the future where free speech is not limited on the Internet, and that it’s easy to communicate with people without getting blocked.

Preston Pysh: We have a lot of people that listen to this show. What would help you out the most for people listening to this?

William Casarin [37:29]: I think if people just want to get involved: if you’re a coder and you want to contribute or if you’re a designer and you want to suggest improvements to the app or if you’re a writer and you want to spread the word, all these things are are helpful. Education is going to be a big part of this because it’s a new thing and it’s kind of confusing. So just being able to communicate what it is and what it isn’t. It’s not another Truth Social platform — this is truly a different beast. Learn about it, write about it, help out, contribute. It’s an open source project: everyone’s very welcoming. So get involved. I can’t ask for more, really.

Preston Pysh: I’ve seen some comments about Fedimint being incorporated into this, and I’m not so sure that I fully have wrapped my head around the implications of that. Can you first of all explain very generically Fedimint and then talk about how that fits into Nostr?

William Casarin [38:29]: I actually don’t know anything about Fedimint. I am a Bitcoin dev and I work on Bitcoin Core and Core Lightning. I love Lightning. I haven’t had a lot of time to jump into the ecash whole thing, so I couldn’t give a technical breakdown or even a high-level breakdown. But more generally, what I was trying to say with that post was: I really want Damus to be a Bitcoin-only app on top of Nostr where everything related to Bitcoin and interacting with Bitcoin with your friends — I want to make it as easy as possible to do within the app. If there’s some way to send ecash using Fedimint over Damus and maybe do another widget like we do with the BOLT11 widget — I think that’d be cool. Making it easier to do multisig stuff on Damus would be fun. Imagine if you have a group DM chat and you all want to cooperatively sign a Bitcoin transaction or something: you can just paste your PSBTs in a chat and then it’ll combine the PSBTs and whatnot for a multisig transaction. So anything that makes it easier to use Bitcoin inside this app — that’s what I want to focus on and want to make the best user experience for. I’m a Bitcoiner, I love Bitcoin, a lot of the underlying protocol is built by Bitcoiners, so I’m leveraging a lot of that energy. That’s not to say Damus is a Bitcoin-only app. It’s just: right now we have a lot of Bitcoin users and I want to support them.

Preston Pysh: Well when we look at Bitcoin Lightning and we see the immediate settlement and we see the fees which are for all intents and purposes non-existent, it almost seems like that’s just the natural thing to be used for something like this. When you look at these other things that are “blockchains,” — even though we kind of smirk when we say that — from a fee standpoint, I just don’t know how any of that would even work as seamlessly as Lightning would on this. Would you agree with that? I’m assuming that’s where you see the future going based on how you’re working with your client?

William Casarin [40:17]: Yeah it’s interesting because Nostr doesn’t really care about what you use it with, right? Nostr has nothing to do with Bitcoin or Lightning — I just think Lightning is great, and the way to show that is great is to integrate it into a social network. So that’s what I’m trying to do with Damus, but there’s no reason why you couldn’t create a Monero client, and all people who love Monero, they want to use Monero in the app, and you have little tip buttons for Monero — sure, you can do that. So we can totally see in the future where there’s clients that have all these different new tokens and people can use them in any way they want, but we can still all interoperate and I don’t have to like see a Monero tip button in my client. Lightning makes so much sense — just the instant settlement, and the protocol is decent. There’s still some issues with Lightning in terms of liquidity and stuff. I’m hoping maybe this network will uncover some of those issues and improve liquidity just from people trying to pay each other.

Preston Pysh: People are familiar with Mastodon as a former free speech platform that can’t be shut down by any central entity. Why is this different than Mastodon or other attempts at doing this in a decentralized way?

William Casarin: This is a really good question, because I spent probably two years on ActivityPub or Mastodon or whatever — Mastodon’s a client for ActivityPub’s protocol — and what ended up happening is I noticed there were some severe flaws, some very bad flaws with Mastodon. Just the way that the federation on that protocol is set up. Your typical experience on this platform is that you’ll join an instance, it’s called — so it might be mastodon.social. And then you’ll get an account, you have all your followers set up — but that server is run by a single admin, and they have sole discretion to ban you at any point for anything you say. And then once they do that, you have to start over: you have to go to another instance. Hopefully they’re [better], but you’re already psychologically scarred! I noticed I was censoring myself just because I’m like, I hope I don’t say anything bad and so the admin bans me and so I have to start over. Even on the Bitcoin instance — I know NVK is cool and he runs the Bitcoin Hackers instance but — I’m like, If I say something bad about ColdCard, maybe I’ll get banned? Whenever you have one person in control of a social graph, it gets really bad. So I think that’s the biggest — and it’s a huge flaw with Mastodon. I was trying to write an ActivityPub node and clients and stuff and that’s why I was like, I give up — this is just not going to work. And that’s when I started focusing on Nostr because I’m like, Okay, Nostr solves the problem because your contact list and your social graph — you control it. You can back it up on your node and you can broadcast it anywhere and you don’t have to start over every time.

Preston Pysh: Right. I mean, I just look at the amount of time I’ve spent on Twitter in the past decade, and if I got banned and they just deleted all that history of those interactions, it’s a massive blow to people that are interacting in a public kind of way. And so your point there — as far as like admins controlling it — I mean, this needs to happen!

William Casarin [43:07]: Yeah in some sense Mastodon is worse than Twitter because I got banned from three instances in the span of like — I’m not even a controversial person! I said Bitcoin once and it’s so full of people on the left, I got banned for just saying Bitcoin. I’m like, All right — this is crazy.

Preston Pysh: There’s another attempt at decentralized social media with Bluesky. What are the differences between Nostr and Bluesky?

William Casarin [43:32]: I briefly looked at Bluesky. It seems like they’re trying to build specifically a social media protocol. Sometimes that’s what we’re doing on Nostr, but Nostr is a bit more general. And they’re trying to design it for scale, so you have really big nodes and that it’s really easy to set up these big nodes and they’re very performant and things like that. I think that’s actually a really interesting way to do it and that we should totally explore that. And maybe one day Nostr can interact with those types of nodes. So I think it’s not a waste of time, as much as I am a Nostr Maximalist, but yeah it’s really just subtle differences in terms of how data is communicated and types of technology they use. They’re very similar. And that’s the cool thing: there’s so many decentralized protocols now and we can just battle them against each other. I love to see — I’ve been getting ideas from other protocols like, Hey, that’s a good idea! We should implement caching at this part of Nostr. So I think the competition is good.

Preston Pysh: One of the things that I’ve noticed with using it is it’s a little bit slow to load, but I don’t have my own personal relay set up. If I had my own relay set up, would that solve that? Or how do we get the speed that we’re accustomed to with Twitter, through Nostr?

William Casarin [44:41]: The relay that I’m running was written by this one guy who just built it in his spare time, and we’ve been going back and forth and trying to optimize some basic stuff, but there’s almost been no performance optimization done on the relay side. I was working on a caching relay so it can sit in front of your relay so that it doesn’t have to do the full query, but can return results — we don’t even have basic caching yet on the relay side. So anytime you experience slowness, it’s just because everyone is querying everything at the same time and we just haven’t done that part of performance tuning. But these things will come with time. For now, just adding more relays kind of spreads out the load and seems to help a little bit, but yeah we definitely need to improve performance on the relay side.

Preston Pysh: Would you have caches on the client side as well, which would help improve the speed?

William Casarin [45:29]: Yeah, I mean Damus doesn’t do this, but it could just cache more things. I don’t like the idea of storing a huge historical cache in Damus because it’ll start to get bloated — imagine all the data it has to store? But there’s no reason why it couldn’t store stuff you’re tweeting in real time. It doesn’t really help in the cases when you’re trying to pull up an old thread because the client probably wouldn’t have that, and that’s the case where it seems to be the slowest because we don’t have the relay caches yet. But in time, I hope we can get it more performant.

Preston Pysh: In general, what do you think brings the user migration to Nostr? Is it just the freest and most open way to communicate is going to win in the long run? Or what’s your thoughts around that?

William Casarin [46:09]: I think just because it made it so easy — you don’t have to create an account, you don’t have to add your phone number — it’s just so easy to onboard people onto the platform and they just get it instantly. I think that’s a huge one. Obviously Jack talking about it — Jack Dorsey has just been tweeting about it, so that was a huge boost. But it was cool to see so many people get in and that it was somewhat stable and it didn’t just crash right away. So people just seeing that it works and it’s somewhat stable, they’re starting to be like, Hey this might actually work? And that was something I always wanted to do with the Damus client: to prove that this could actually work. It’s still somewhat of a prototype — is this going to work at scale? So we’re up to 10,000 users now. I see 2,000 or so people connected to my server at any given time. Who knows what the next stage of scaling is? Let’s see if we can get this up to 30,000 to 100,000. But yeah we’re still early.

Preston Pysh: William, I can’t believe how active Jack Dorsey is on the platform right now. I mean, he is very active — he’s called you [on the phone]. What are some of your thoughts around Jack being so active on it?

William Casarin [47:08]: I think he got it so quickly because this is what he in some sense wanted Twitter to be. I’m guessing it’s nostalgic for him because it probably reminds him — and he tweeted about this — that this reminds him of Twitter sub-5,000 users, but better. Right when he said that, my servers went down, basically! That caused so much FOMO when he said that. But yeah, I think Jack sees the potential of the protocol and he just wants to support that — even though he’s also supporting the competing protocol, Bluesky. So he has the same idea: let’s see the best protocol win. It’s cool to have his support. We call him the Walmart greeter guy because he’s always there. He’s like, Hey! — he just sends the shaka emoji to everyone. It’s funny. He’s been a very active user on the network, which has been awesome to see and to hang out with him.

Preston Pysh: Last question is just: your Bitcoin story?

William Casarin [47:58]: I think I just saw it on Hacker News in late 2010 and I just jumped on and started playing with it. Jumped in the IRC channel and chatted. I was chatting with some of the people at the time. Somebody who was named sipa [Pieter Wuille]. I didn’t know who he was. Turns out he’s now a major Core developer. So he got me into the system really early. And then I’ve always used it. I worked at a record label and we were selling our albums in 2013 — a record label called Monstercat. I thought it’d be cool to see if we could actually start selling stuff on this network. It was always this fun protocol — kind of like Nostr — it was just a fun thing to play with. I wasn’t super into monetary theory or some of the stuff I know now, but the community has really educated me on all of that stuff afterwards. But it’s just been wild to see it grow from the start.

Preston Pysh: So William, I know you’re active on — Nostr, for sure — you’re definitely active on Twitter as well. Give people a handoff. I’m assuming you’re going to get some interest from this discussion of how people can help out. Tell ’em where they can find you and anything else you want to highlight, we’ll have links in the show notes to all this stuff so that people can quickly access you — but give them a handoff.

William Casarin [49:07]: Yeah, so for Nostr, I highly recommend checking out our GitHub. It’s github.com/nostr-protocol/nostr. And then there’ll be a link there to our Telegram. We probably have 4,000 or something people in there by now, so it’s a huge group of people and you can ask questions there and they’ll help get you onboarded. You can find me on — I’m not going to announce my whole pubkey, I don’t know if I could say that, but — I’m sure you’ll find me talking on there. If you go to the global feed, you’ll find me. My Twitter is @JB55. And my website is jb55.com.

Preston Pysh: Fantastic. We’ll have links to all that in the show notes. I know you are an extremely busy guy right now, so taking time out to have this conversation for a full hour — I really appreciate that and I know that all the listeners are going to appreciate it as well. So thank you for your time.

William Casarin: This has been awesome. Thank you so much for having me.

--

--