
This video is a must watch to understand different philosophy behind Nostr vs Blockchain and other existing solutions. Kevin Rooke interviews William Casarin who is a Bitcoin developer working on Lightning Protocol and is currently working on Damus, a project built using the Nostr protocol (we covered Damus here), so he is a great resource to explain the differences and knows the topics inside out. We liked this video so much that this entire blog post is a detailed summary of the conversation. Hope you enjoy it as we did!
What is a NOSTR at a High Level and Why is it?
So Nostr was an attempt, written by this guy named Jeff who was also involved in the Eleniral spec. A lot of Bitcoiners just happen to be in the space because of fiat. But it’s not a Bitcoin project, it’s not a Lightning project, it’s a distinct protocol. It was designed as a fiat attempt at making the simplest possible censorship-resistant Twitter alternative, a global social network.
There have been attempts at this in the past, like Macedon, which uses the Activity protocol. But that had a very big issue where when you join a server, that server becomes your community. If you say one wrong thing, the server admin can ban you, and you have to move all your followers to a new instance. It ended up being less censorship-resistant than Twitter.
So FiatJeff thought, “Let’s make this simpler.” Instead of relying on your identity being tied to a server, your identity is just a private key. You just publish messages, signed with your key, to 5 or 6 or 10 or 100 relays. These relays are dumb and just accept messages of any kind, signed by different people. This way, you’re not at risk of being banned from any individual server because if one bans you, your messages are on 6 other relays and you can keep moving. It’s really easy to transfer your messages just by copying them from one relay to another. It’s a really simple idea of building a censorship-resistant decentralized database, which can be used for a lot of different things, like chess engines.
The most important property is that it’s not a blockchain. This obsession with putting everything on a blockchain is ridiculous; we have really efficient databases like Postgres and SQLite. Why does everything have to be an immutable ledger? It’s just silly. Fortunately, Nostr doesn’t have that affliction.
Nostr is an open database, but it’s different from databases you’d find on the web.
Usually, databases you find on the web are very locked down, and you can’t just download the data and leave. With Nostr, you can download the data, and the server can’t stop you from leaving. You’re also not at risk of the server going down, because the data is on multiple relays.
Nostr defines a very simple way of querying the database. You can say, “Hey, give me all the posts from this user’s pub key,” and it’ll stream it to you in real time. It has a WebSocket component that allows you to create chat rooms, for example. You can say, “Hey, subscribe to the chat room,” and then you’ll get all the messages in that chat room in real time. So it’s a real-time database with a well-defined interface for querying and putting data into the database.
The data is stored on the relays, and the client (like Damus) talks to the relays and knows how to interact with the database. You don’t have to run a node. This is another important principle of Nostr: to get onboarded, you don’t have to run anything. You just say, “I’m going to send all my messages to these 10 relays,” and new relays are constantly popping up.
There’s an incentive for someone to run a public relay because it would be a pretty large database. However, these are just small JSON blobs in terms of data scale nowadays, so it’s not hard to store that data on a server. You can run a relay on a Raspberry Pi, for example. You don’t need a lot of resources. The main incentive for running a relay is the satisfaction of contributing to the network and supporting censorship-resistant communication.
Key Differences between Nostr and other solutions
To create an account, you don’t even have to put in your email address or phone number. You can set any username you want, and then it’ll give you a key. Then you’re in the system. It should be that easy.
When you’re sending messages to all these relays, you can effectively guarantee that you won’t get shut out of the entire system. However, your friends have to be using the same set of relays, or you won’t get their messages. It’s not a peer-to-peer network where all the messages are broadcast to all the nodes, but this actually makes it more flexible.
For example, if you’re running a relay for your own company, it could be firewalled and only accessible within your organization. Then, everyone within your company could send messages to that relay, and only your client can see those messages because you’re authenticated with it or connected to a VPN that can only see that relay. You could also run a private Nostr relay on your WireGuard VPN at home and get real-time notifications of payments and other events.
Well, first of all, I want this to succeed because I think it’s a really cool idea. That’s not a good enough reason for me, but there are some relays that can do something to address spam. For example, if the spam becomes too bad, relays can say, “Hey, if you want to send a message to my relay, you have to pay this lightning invoice maybe once a month.” FiatJeff actually has an example of this called the “expensive dash relay.” It’ll give you a lightning invoice, and then you have permission to send that relay.
If you’re spam-conscious, maybe you only want to connect to paid relays. Spam is an issue on the network, and there are a bunch of different approaches being considered, like proof of work and paid relay options. I have a few ideas on how to have an “orange check” system, where you buy an orange check and then block people who are buying orange checks and spamming over time.
Another way of monetizing is to pay Damus (the Domus relay) and get an orange check, which is just a Nostr message. Clients can download those orange checks and use them for spam protection. There are a lot of different approaches to addressing spam and monetization in Nostr.
What about Lightning Network?
William Casarin who we already mentioned in the beginning of the post and who is building Damus, a project that uses the Nostr protocol, which allows users to send messages and perform actions like “liking” posts is considering using the protocol to enable users to send Lightning tips on the network. Stay tuned as the topic is still developing and the protocol is flexible and open for anyone to propose and add new features.