Building Decentralized Social Media Apps with Streamr
LisCon 2021 · 20 Oct 2021 · 15:19
Bernat Canal of Streamr gives a talk titled "Building Decentralized Social Media Apps with Streamr" at LisCon 2021 in Lisbon. The session is about creating social applications on top of Streamr. LisCon is described as a gathering of builders, thinkers and creators.
Speakers
Topics
From LisCon 2021, hosted by LisCon.
Transcript
hey everyone i'm matt fontana from streamr uh in this presentation i'm going to go through uh decentralized social networking i'll give a bit of an explanation about what the streaming network is and uh then show some awkward demos that might not work in this wi-fi environment but we'll do our best and uh then talk a bit about the future of decentralized social networking so why do we need it at the last major uh ethereum conference uh lord vitalik was not happy with us uh ethereum has been defined by uh defy and uh you know he thinks that tokens
wrapping tokens is is getting a little bit old and boring um and i kind of i i i love d5 but i kind of uh feel that same uh same energy that we can do better we can create more complex applications but it's very difficult these these applications require a lot more than uh on-chain data and and just wrapping tokens uh so maybe preaching to the converted here and a lot of other presentations have also talked about uh the problems of web 2 but maybe just to to to mention a few highlights here that uh centralized uh central points of failure are a big problem
uh the algorithms that incentivize us to be enraged to be miserable uh for economic exploitation is bad uh censorship of presidents i think is bad and interfering with our democracy interfering with our voting it's it's all not that great it's a dumpster fire so we need to we need to fix this so some smart people uh stanley uh jack that they've kind of committed their reputation to fixing this problem uh we haven't seen what stanley has built yet but um i'm hopeful that uh something great gets built on ethereum uh jack is working on the blue sky uh working group uh that is uh probably bitcoin based but
um they've done a lot of good work actually and uh i i particularly am drawn to this uh ecosystem mapping exercise that they've done it doesn't include streaming here but i believe it will in a future iteration and the key takeaway here is that uh the decentralized social networking will not be built on blockchains alone it will be an ensemble of uh web three decentralized uh networking protocols and that's uh that's a very key takeaway here and there's also an appetite at the government level to solve this problem so helios is an eu funded program and they have a very wide scope they're
looking at many different issues related to social networking from ethics to security to ux and uh i think um it's it's a great project because what they their mission is to lower the barrier of entry for indie developers to come in and create a decentralized uh social networking application on top of their platform when they've done all the heavy lifting so they've worked in quite a modular way uh we're collaborating with them and uh yeah i hope to see many more of these projects i think there it's a great thing for the space so as i've mentioned blockchains i don't believe are going to be the solve in this uh space messaging apps need
messaging infrastructure how about that and uh real-time experiences need real-time infrastructure so we can't be waiting 20 seconds for the next block to to see the next tick tock video it's uh we're not going to be able to compete with the with the massive uh gravity that's contained uh already in these web 2 networks we're all on twitter we're all on discord we haven't actually moved even though we've we've drunk the cool aid we've been here for so long but we haven't actually uh graduated into these web 3 networks yet and i believe that it's because we really need to be 10x better we need we need to uh inspire that change by being just so much better that it uh makes us move from the uh incumbents
that have such a gravity uh towards them so this isn't an exhaustive list but i believe if we now even just a handful of these we can really uh get to that 10x quite easily and so uh now i'll introduce the streaming network and the streaming network is a constellation of these uh bitcoin bittorrent uh flavored uh mesh uh networks that are represented as stream topologies and uh these stream topology these streams are append only logs of uh flowing data and this is a picture from our recent test net that wrapped up yesterday uh
where we had over 90 000 nodes we're quite proud that the nodes can run pretty much anywhere that javascript runs they can run on browsers uh look very low power devices like raspberry pi's and uh yeah it really helps to improve decentralization as we can see one of the biggest decentralized networks around and so how do you actually create a stream well uh it's it's quite similar at the beginning like to ens where you need to create a uh a registry on our stream registry uh we currently use xdi it's a transaction and uh you'll end up with something like zero x forward slash uh some real-time data path
and uh then uh the application what it will do is that it will reach out to one of these tracker nodes so this is like a bittorrent style system so you first reach out to a tracker node with this immutable stream id and the tracker node then informs the application node of all its peers and with that information it then creates these peer-to-peer topologies with its peers through webrtc data channels now this gets more complex and so we have broker nodes as well and these are like the mining nodes of the streamer network
and uh basically they join a uh bouncy contract and when they join that bounty contract they basically say that i'll be supporting these streams and in return i'll be earning some data tokens and this helps protect the streams against known known attacks in decentralized networks and improves the quality of service essentially and we also have storage storage nodes which uh provide uh persistence to the uh data flow and uh this is some uh topology art uh so these are the connections uh essentially um that have been formed this is from
our uh network explorer uh while our test net was running uh and yeah these are the actual connections that the that the nodes were were making with their peers to transport data around and so what i want to lead up to now is a demo of decentralized group wallet chat inside the browser and how it will work is that a xerox address so let's call it dude.eth they create a stream and on that stream uh they have publish and subscribe rights uh then they make a transaction to invite stanley.eth and then they both
have uh pub sub rights uh essentially so pretty straightforward um maybe and then yeah i guess just breaking it down quickly again so you create the stream it's a transaction change the access control on uh on the blockchain another transaction then the application reaches out to the tracker nodes forms the peer-to-peer topologies with its peers uh then the then the stream then the nodes uh connect to each other and then they can share their messages okay so now if this all works and that's a big if but let's try this out
so this is decentralized group wallet chat so what i'll be doing is i'll be creating a stream which is uh starts off as signing a message and then i'm going to invite my friends so this is another browser that i'll be inviting and it might just be up to our wi-fi to make that happen but uh i guess the wi-fi gods are not happy with me today and ah maybe there's this
okay okay well it's it's a win-win for you guys because it's always fun to watch people squirm on stage so that was a failed demo never mind we'll we'll try again but uh basically the uh the flow is that uh there will be this chat room where uh wallets can talk to each other and only those wallets can talk to each other and that's uh that's actually something that's quite hard to do but it's this was not this was knocked up by our intern over a weekend so um it's actually quite easy to do on uh streamer and then there's the troll box this is my second demo so this will go
even better i'm sure but uh for us uh maybe uh uh kind of uh crypto boomers uh that use centralized exchanges back in the day we used uh there used to be a a thing called a troll box and uh it was a lot of fun of course it got shut down and you can actually do something like this on streamer and it would be totally decentralized unstoppable data and uh yeah it's it's a bad idea for a lot of reasons because uh it's uh quite prone to to spam issues but of course it's this is something that our community wants to do it's a bit of fun and it follows the same flow where you create a stream uh this time you invite
anonymous and then you burn your original ownership and now anonymous sort of owns this stream so i'll try one last time for some luck so this is the decentralized chat okay oh maybe there's something's happening now so if i sign the message so each message uh i can say meow and uh basically at the moment you have to sign each message but uh this is this is an npm package that can be uh injected into any sort of defy application and it will
be totally um decentralized and and all the rest unstoppable okay okay so now uh the last part of the presentation is is kind of talking about the future of where i think decentralized networks will go um i i believe that data can create uh these sort of ad hoc social networks and uh social graphs can be stored on chain uh but social graphs can also be generated by on-chain activity i think this is quite a powerful uh idea that that i really want to see the community execute on and uh on chain data is also a form of
identity and uh reputation i think this will actually get tokenized uh in in a sense as well and i think uh yeah it's a very powerful thing and what we what you can do uh with with these with this idea is that uh you can have nft creators talk with uh the owners of the nfts and you can have a totally encrypted and uh private connection between the creators and the owners of the nfts uh you could have token gated discord channels and you could uh be chatting totally end-to-end decentralized and you can also start to think about how this uh how this pattern would would
kind of uh fit with maybe loot nfts or some other guild social networks that have their data on chain and this data is uh the perfect uh perfect way to gatekeep these communities together so i i really think this is going to be uh quite a quite a big deal and we you know everybody lost their mind with loot and how how we how we thought that there's gaming is going to come from all these nft drops well i believe that social networks is absolutely going to to to come at the same time or probably even sooner uh and a bit of a shout out to a project that i saw on reddit actually has
nothing to do with stream up but this is this is kind of the direction that they're going uh the ens project as well this morning seems to be going this way as well it's about creating a social graph on ethereum and you know serverless etc etc and so i think that this will ultimately be uh tying this back to streamer so we have this construct called data unions which are a way for uh regular people to aggregate and monetize their data they all have a similar app and they're all kind of sharing uh this the same shape of data into these streams and uh these streams can then um
form the the seed for these ad hoc social networks so swash is a data unit on the on the in the streamer ecosystem and they monetize uh browsing habits and of course if you you can imagine that uh you could create these ad hoc social networks where um people of a certain type kind of create uh this this group within the group and uh maybe a spotify data union everybody's listening to the same song it creates a social network where they can uh chat with each other so uh that's pretty much it we have an ecosystem fund we're an infrastructure project but um yeah we really depend on the community to deliver on on the
application layer so we can give grants as most of the other projects do and we strongly encourage you to to reach out