ETH Seoul Talks: Day 1
ETH Seoul 2022 · 6 Aug 2022 · 7:30:48
The first day of ETH Seoul 2022 talks, streamed in full from Seoul. The host welcomes attendees and the sessions explore what to build on Ethereum now, including zero-knowledge applications for privacy and scaling, privacy-preserving proof of humanity and attendance, soulbound tokens and soul drops, and cross-chain applications with asynchronous calls between chains. A long, wide-ranging recording for builders.
Topics
From ETH Seoul 2022, hosted by Kryptoplanet.
Transcript
do [Music] [Music]
do [Music] [Music]
do [Music] do [Music] so
[Music] okay good morning again
so let's get seeded welcome to east seoul the first soul uh 2022 and good morning everybody hello so this is on live stream so i should not mess this up but my name is erica from crypto soul and thank you so much for being in seoul and in korea for you know this whole experience um bitter eat they eat soul and everything and kbw of course but yeah good morning
has the morning actually been good okay great uh so since your morning is good like let's uh talk about building stuff uh so things that so this is just to kind of give a few different categories of ideas that i think are really worthwhile for people to start building and to start like really concretely working on like right now and so in general i think like a lot of things have changed in the crypto space and in the ethereum and the development world in particular in the last two years like a lot of uh technologies that were like really just like thoughts and ideas and theories uh two years ago have like
slowly become very real um over the last couple of years and in a few voices recently like i've talked about what some of those changes are right like one is the fact that you know we have roll ups we have scaling uh things are getting cheaper again uh so a lot of applications are just much more economically viable than they were one or two years ago and so you know when before like you might even say well maybe d5 is the only thing that makes sense to build because d5 is the only thing where people are willing to pay like 12 dollars a transaction well now you know transactions are cost much less than 12 and roll ups are getting better every day so there's a lot of other things that you can build as well right um another
really big and really important thing that's been happening over the last five years is the growth of zero knowledge technology right so like i actually think that zika snarks might be like almost or even equally as important to the kind of you know privacy openness and you know freedom kind of alternative decentralized web tech movement as blockchains are like they're actually extremely powerful tools they're extremely effective at giving us privacy and giving us scalability and and at the same time preserving security uh which is a similar thing to what blockchains are trying to do right and in some ways like
zero knowledge proofs in blockchains are actually very good compliments for each other right because blockchains give you a lot of security but in exchange they sacrifice privacy and they sacrifice scalability ziki snarks give you back privacy and they can give you back scalability um so build zk apps right basically i think we've now gotten to the point where the tools for building a lot of zika snark applications are just getting better and better every year the protocols are getting better and better our ability to prove things like make proofs that you can actually prove on a computer in a reasonable amount of time is getting better and better i remember in 2016
when the first version of zcash launched it took like more than one minute to generate a signature and today like all of these applications they can generate proofs in like somewhere sometimes three seconds sometimes like less than one second depending on you know what technology you're using so build zero knowledge applications um zero knowledge applications are i think uh great for uh both privacy and uh scalability um right so um here like i i have this a link to a blog post if you just uh if you just go to vitalik.ca or orvitalik.ethe.link uh either one i mean you just like scroll down the list of i
wrote this post about one or two months ago or just talk about some of the ways that you can use your knowledge proofs to actually build many kinds of applications that preserve privacy and there's also a lot of applications obviously of your knowledge proofs for scalability right so zk roll ups are a great example and there's a bunch of teams building ziki roll-ups for the evm which i think is great um privacy i think is still a bit less explored than scalability actually so just like some interesting examples of uh privacy preserving applications that might make sense to work on um privacy preserving like proof of
humanity or privacy preserving proof of pope like basically like in ethereum we have we're starting to have like more and more of these protocols where they're basically issuing like some kind of attestation to like at different like specific addresses to say something about the person who controls that address right so the proof of humanity protocol for example it's a protocol where if you you have to sign up and there's like a dow that verifies the submissions and if it accepts you then it basically says like this address corresponds to some unique human right so it's not a bot it's not like one person having five
thousand accounts it's like one specific person that has one account and if you do if you have proof of humanity as an ingredient then like you can start building a lot more powerful um applications you have like a lot of a lot more room to decide like what kinds of things you'll be building right so for example you could build an airdrop where instead of like doing an airdrop just based on um you know how like how many coins does someone have how many transactions have someone sent you can like say i'm going to actually give like 15 coins to every single human right um you know you could do like even nft sales in a way that's more fair um
you can do a sale uh just create market mechanisms that try to be like more fair to individual people in some way i'll talk about this later but like there's also um ways to make uh decentralized governance more fair if you try to like count humans instead of just counting coins um and privacy preserving proof of pope so pope the proof of attendance protocol is a protocol that basically lets you say this address belongs to someone who actually participated at some event right so like i went to you know a conference in argentina last year and i got a pope for it right so there is a pope that that
that god given out to everyone who visited this conference in argentina and so you don't just know that this person is a human but you actually know like what kind of communities they're a part of and like what a different no how much have they participated in like in different kinds of communities right so you get more of this kind of information now one of the big challenges with both of these protocols is privacy right like you're basically revealing to the anyone who can read the blockchain like who you are um and this is a big privacy risk but at the same time like i think there's a lot of really important things that we can gain from having these protocols and so the challenge is like how do we get the benefits without the
costs right and zero knowledge proofs could actually help a lot here right like with zero knowledge proofs you could do something like prove that you are a unique human without revealing which human you are um you could prove that you have a pope and that you attended like five events from a particular list without revealing like which events you attend specifically attended and without revealing like what your actual identity is so a lot of interesting applications there um zk negative reputation uh so this is actually one of the sort of more advanced um examples in this post that i wrote basically the idea is to have a reputation system where you can
make attestations that are not just positive but also negative so you'll be able to prove things like you know i have like i participated in some decentralized social media platform and i made these posts that got upvoted but i did not but i also did not get down voted or like i also did not like have did not get flagged for abuse uh so you can do like all of these things but at the same time also preserve people's privacy right um zero knowledge and npc data marketplaces this is um interesting like i think a lot of people have been interested in this idea of like creating like more fair market voices for data um and yeah
you know there's applications of this in healthcare there's applications of this and like a lot of different spaces but there the problem is that like it's not just a blockchain problem right because you are trying to solve a trust problem but the trust problem you're trying to solve is not just the kind of trust problem that a blockchain solves you're also trying to solve a problem of privacy right a problem of like i want to give a little thing about a little piece of data about myself but i don't want to give more data than that i mean ideally like he wants to even give data that contributes to like say someone's machine learning model without actually like giving them giving them the data directly right and if he wants
to do those kinds of things then you need a different kind of cryptography called multiplayer multi-party computation so combine zero knowledge proofs and multi-party computation try to create better data marketplaces i mean this is a very advanced topic but i think like this is the frontier and there's a lot of exciting things that you can build here so those are just a few examples of things that you can build with zero knowledge stuff i mean i think building with your knowledge tech is still it is still advanced but it's getting less and less advanced and the tools are becoming more accessible with every year so i still you know encourage people to
really look at the tech and really consider like even now using using it to build something uh soulbound tokens uh so this is um something that um a couple of um uh articles one that i published myself and uh a more recent paper that i co-authored about a month ago like basically the idea is of using tokens that are non-transferable right uh so the basic idea here is that like you want to be have tokens that represents like say that you actually are a member of some community that you actually like learn like a prove that you know that you know something that
you have some experience you proved that you completed some challenge you want to like prove that different things about yourself but you want to prove that like actually you were the one who did those things and you did not just like buy a token from someone else for fifty dollars and so basically making tokens that are like non-transferable so pope is um actually a good example of this right now pope tokens like they are transferable in that like they are erc721s and you can send them to someone else if you want to but like you can look on the blockchain and see right like has this pope actually been transferred um and if you like you can tweet popes that are
still in their original address and pokes that have been transferred uh differently right um and i'm basically expecting that these kinds of things are going to become used for a lot like a lot more different kinds of uh projects uh so and i think there are a lot of applications of this right so one that i mentioned is um what we call soul drops like basically air drops where in order to qualify for the air drop like you you try to use some of this like on-chain information to actually figure out like who is in the community that you want to airdrop to right like a lot of different projects he wants to airdrop uh but one of the challenges that they always face
is like if you airdrop then sometimes the airdrop just gets farmed by vcs right and vc is just create a hundred thousand accounts uh sometimes uh the air drew up um you know just give it to random people and someone creates like a really efficient app where everyone can just like go and dump their airdrop on unit swap for 32 bucks and everyone does that and like you know you have just lost a lot of money uh so what you want to do is like i think you want to distribute your token supply you don't want to have this kind of you know plutocratic dystopia where like seven people and vc funds control half the supply but you also wants to like actually give the supply out to people who are actually in your community right and so
how do you tell like in a very verifiable kind of automatic way that it gives you like some of you know what we call credible neutrality some ability to like actually prove to the public that you were fair in how you allocated it and that you're not like quietly giving lots of coins to yourself um soulbound tokens might actually be a very powerful tool for doing this right so proof of humanity you can like limit to individual people um you could even like you know do interesting things with proof of humanity like you could make a sort of fair ico where if you want to uh let's say sell the you could buy your first token for one dollar but then buying
your second token cost two dollars buying your third token cost three dollars and so the more tokens you buy the higher the price of each one goes right so there's like different ways to try to create these mechanisms to sort of make them you know less plutocratic and more fair um and things like proof of humanity could be a big part of it um proof of attendance protocol can be good and similar ideas can be good for not just checking like who is a human but also checking like who is actually a member of a particular community um and i think there's a lot of like good ideas here but there is a lot of room still to actually build the infrastructure to make it really easy to do these kinds of
things so i think this is like you know another challenge for developers like try to actually build more of these tools um another um interesting one is uh in this concept of like soul bound token gated community forums right so like imagine a private chat where it's basically things that are said in the chat they don't get automatically broadcasted to everyone but they can you know it isn't like just a couple of people who decide who gets in and who gets kicked out instead like say you have a dao and that dow issues tokens and uh even like based on some measurement of whether or not you're in a particular community um that determines whether whether or not you can get in so this i mean obviously like sold-out
tokens and zero knowledge i think like they're not separate and i there are really important synergies between them and the reason why there are really important synergies i think is obvious right because like there's a lot of really cool things that you can do just by having the ability to like know more things about the people behind the addresses that you're interacting with and being able to say like this person is from this community this person is not this person is a you know core developer of of uh this project um and uh you know this person has um you know one ethereum address but actually he is he's mostly involved in some completely separate project um in like being able to distinguish those
things but the more you gain that ability the more you're like breaking people's privacy right and zero knowledge it is a great way to get some of that privacy back um so um another a lot of interesting ideas here um better public goods funding this is something that i think we've been talking about for the last two years right um basically that like blockchain communities need ways to fund public goods public goods are important for everyone but they're especially important in blockchain communities because blockchain communities are internet communities they depend heavily on open source software public documentation that gets written
on the internet people making translations uh just all kinds of work that's completely done in the open and it's extremely valuable but there is not a good way to charge for it right so better ways of like funding it and of like actually using um you know community pools of funds to support those things and even to support public goods that go beyond the blockchain space is something that i think is like really important to care about right now how can we do this i mean so quadratic funding is interesting so the bitcoin team has been doing these experiments for the last two years these uh quadratic funding rounds and at the beginning it was like this
thing where you had like a 25 000 dollar matching pool and basically nobody cared about it but i think over time we've seen it like really grow in balloon and now it's this big i don't know five million dollar thing and you have just these really big matching pools that happen every year every couple of months which i think is amazing um but there are still like opportunities to improve quadratic funding and to try to make the mechanism better make it more um you know safe against them attacks make it more privacy preserving and all of these things so that this is one part of the public goods problem another way to look at the public goods problem is to look at it from the perspective of like credit assignment
right um so let's say that someone invents some amazing new zero knowledge proof protocol and this new zero knowledge proof protocol is like makes it let's say 10 times cheaper to scale ethereum roll ups and improve privacy um and it has some other magic amazing properties right now this is a public good it's something that once you do it it's in the open it gets published it benefits everyone it doesn't even just benefit the ethereum community it benefits you know every crypto community it goes like it could even benefit like lots of mainstream um you know industrial applications lots of government applications it can make a civil society more um
applications more secure so it's a very public good um but one of the ways of like asking what the problem is just to look at it from the problem of like well who should get credit right and the answer almost never is one person right on the end because uh like it's easy just to kind of tell who is like the last mile person who is responsible or like who is the guy who actually publishes the thing but the pers the person who publishes the thing like he did not invent or you know she did not invent the idea in a cave right like they read existing work uh synthesized existing work talks to people created one version of an idea found someone who broke that version of an idea fixed it
created a better version of the idea there's always this collaborative process and each of the ideas that they built on are also ideas uh that um themselves um you know built on other uh on other ideas and like there's this big tree of uh like where the credit comes from uh so one thing to think about is like people i think have for a long time been thinking about like the kind of the provenance problem right so this is like blockchain supply chain applications like people talked a lot about this in 2015 to 2017 um right like basically if you have um like if you get some product how do you tell like you know which country the different parts actually came from how do you tell like
what's trustworthy can you like put cryptographic links at every step in the supply chain check them on uh check them on chain and all of that like we could do that for public goods as well right we could try to like take the concept of citations and formalize it make them cryptographic make them more incentive compatible have a kind of more this kind of richer information about them and just like have more information out there that could actually be used to properly compensate sort of everyone um all along the chain of like actually producing some public good um nft is for public goods so like nfts have always been this sort of challenging topic for me because on the one hand like i think nfts could be like
a really amazing fundraising tool and they could really help in like raising money for things that really need it and things that don't otherwise have business models right and they kind of already do there's like a lot of artists that are around the world and even people in places like you know southeast asia and africa and latin america that like really do get included and how finds a way of like making revenue through the nft ecosystem but on the other end like nfts can sometimes become this sort of ridiculous thing where people are trading three million dollar monkeys right so like to me like i guess my ideal world is like not to like i don't i don't want to hate nfts and i also don't want to
uncritically like nfts but so like i want to build better nfts right and you know i want to it would be nice if we can like try to find a way to kind of get and make nfts benefit public goods more right so you know if you produce some like some uh public good um and then like find a way to kind of sell some nft for it and the public good like you know it could be some scientific results it could be a work of art it could be a blog post it could be an idea basically find ways to kind of create an nft ecosystem that people wants to participate in um but um and we are at the same time like you actually ensure that the people who get
the funding aren't just kind of like very flashy and famous people at the end of the chain but try to actually make sure that sort of the entire um you know intellectual supply chain gets compensated well uh so a lot of like i think interesting ideas to work on there um better dow governance uh so i think you know dows are great and lots of people are doing dao's but at the same time like doubts have a lot of problems in governance like their governance is i in general i think it's like either centralized or attackable and like we see a lot of sometimes some pretty scary attacks right like last year i think very recently there was like a stable coin that got drained because someone bought up 51 of the supply of
the tokens and made a governance operation to drain all the money and did that in like a flash alone in a single transaction um and the like these kinds of things like they happen because coinbase driven governance is like fundamentally broken right and i've written about this many times so this is like you know another post where i talk about this and there are ways that you can improve it on the margin but i think ultimately you need to have governance that is not coin driven um so this is also where things like sold bound tokens things like proof of humanity things like proof you know proof of community membership come in like we need to have governance that depends on things other than just um you know like token ownership and we need to like even get away from this idea that the
purpose of a dow is like fulfilling the will of the token holders right there are other stakeholders that matter too uh so one of the directions to go is kind of non-coin-driven governance platforms and like i've talked about like ideas for how to do this in a couple of places but there's also the the problem of like actually building dow governance tools that use those ideas right like today everyone forks compound because there's just lots of really good tools that is that are like make dows easy to operate if you assume that your dow is a coin voting down and forks compound there aren't good tools if he wants to build a dow some other way if you want to build it down some other way you have to do things yourself right and it's like you know in the last century you know we had
like nobody gets fired for buying ibm or and here it's like nobody gets fired for uh forking compound right but i think more people should get fired for forking compound and more people should get rewarded for like actually trying something different and so you know we have to actually build those tools and make it easier direction two is better communication platforms right like governance isn't just about voting voting is the last step in governance the steps that comes before is like how do you actually create ideas come to consensus on ideas even like improve ideas over time and like get feedback even before the final vote happens so that you know you actually can like better find an idea that makes say 90 of
the community happy instead of just making 51 of the community happy so better communication platforms i mean there definitely are projects that are trying to kind of do this decentralized governance communication thing so i mean like radical exchange people they talk a lot about polis right it's that's not a platform for kind of finding ideas that different uh sub community different sub communities can agree on and audrey tong from taiwan really likes it and it gets used a lot there so that's uh one good example um but you know you can look at that and but i think there's also room for like a lot more experiments here but you know in general i think like dallas need better governance now just need a better
communication so lots of things to do here so those are just a few ideas i mean there's uh plenty more ideas that you can try but i think you know there's a lot of uh really interesting directions to work on there's a lot of very exciting uh potential in the space that exists now that did not exist two years ago but there's also still a lot of stuff that needs to be worked on and you know i hope that people here can be a part of the solution [Applause] wow such an inspiration thanks vitalik thank you so much
um if you're watching this stream uh if your sound is too small uh sorry about that but we're trying our best to make it a nice environment for everybody um yes presentation next presentation all right alex is coming up on the stage and he'll be setting up really quickly so let's give a round of applause for alex [Applause] uh hey everybody i think i'm on the okay cool make sure
i'm in the camera there good morning um it's really nice to be here today i'm very proud and humbled to be at this event and share a little bit about the project that i'm working on called alio with you so the quick tl dr is alio's a platform for private applications we're going to talk about what that means throughout the course of this talk and i'm the ceo but the first thing is the first thing is we're going to see if the slides will move forward and they may not be so okay so that was the first thing the
second thing is uh we have to address something right up front because zk evms all the rage recently lots of exciting announcements and understandably so there's this question of like can we use zero knowledge cryptography which by the way i should have mentioned that alio is a project that's leveraging zero knowledge cryptography quite heavily so can you leverage zero knowledge cryptography to build a you know build a better evm effectively so is alio a zka vm no it's not a zkvm but what is a zk evm at first i thought i knew what that meant but um actually vitalik his recent blog post you know he was just up here but his recent blog post inspired me to change these slides a little bit because i learned from that blog post that the definition of a zk evm is a little bit
broad right so it could mean a lot of different things right so this chart is not from vitalik's blog post it's from another great post that i've linked below but you know you can see there's like the definition on the far right side of what the evm or what ethereum the computing model of ethereum kind of looks like and you know you kind of have all these increasingly distant um you know or you've different projects that have implemented what people term as zika vms in kind of different ways and increasingly distance in terms of compatibility although i would say in addition to combat the you have the arrow on the bottom that goes to compatibility i would also put an arrow that ran the other way about performance right and so the tldr is at least today so as far as we know the closer you try
and get to a z evm model that emulates exactly the ethereum model you pay a quite heavy penalty in performance so that's why we at elio decided to build a new model from the ground up with this exact use case in mind a zkvm and so the way our model works i'm going to go through all this in detail in this talk so don't worry uh is you know we have a high-level language called leo which compiles down to an intermediate representation called avm instructions uh which to get turned into avm opcodes which then gets synthesized into what's called r1cs which is effectively the stuff that proofs are made of and okay so why is this even a hard problem why are we sacrificing you know why can't we just replicate the evm exactly and i i'm by the way i'm going to liberally
steal many other people's great insights throughout this presentation but i will cite them and this is actually a quote from an article written by a gentleman named carlton beautral who works at consensus and the tl dr is that the thing that the evm reasons over are 256 256-bit words uh and the operations there are bitwise arithmetic and uh boolean operations proofs as what is a zero-knowledge proof well it's a field element or some group element of a field which is typically a cryptographic field like this elliptic curve that i've shown there and what is a program in that model well it's a circuit on the bottom encoded as a polynomial defined over this field right so these are two very very different things and
typically when you try and translate that into the world of a regular computer program as gallatin points out that typically the blow up is quite large in fact there is actually already some research that shows you can build effectively a cpu inside of a zero knowledge proof it's called tinyram i highly encourage everyone to look it up and basically the roughly speaking the blow-up factor of any program is 10000x in terms of the number of constraints as if as opposed to if you just implement the program uh step by step okay so this is kind of another way to say it so this is okay this is the challenge here fundamentally is like you have an idea for a program you want to write it in some high level language it's like i want to prove that i know the sum of two numbers kind of a silly
program but let's just go with it and so you write it out in high level language and then what leo in the avm does is compiles it down and it manages this this problem of basically efficiently translating between the world of zero knowledge cryptography or the crypt the cryptographic world where things are all group elements defined over elliptic curves and the world in which the program actually needs to be evaluated what's actually being computed here and to do that efficiently is why again we built our stack from the ground up and this is why it's very difficult to do this from you know this is why there's all these different flavors of ck vms um so again this is kind of another model of how alia works and we'll go through this in a little more detail but the point i want to make quickly is
so today we have leo that compiles the avm and then we have snarkos which is basically our layer one where we have validators that also service verifiers that can verify transactions were computed correctly and the point that i want to make here is that okay so we have leo that targets the avm but maybe in the future we could have other languages that target the avm too or even potentially a transpiler that targets leo or the avm directly so there could be a world in which you could write rust or solidity or some other language and you know maybe through some transpiler architecture you can just basically end up still being able to do all this and so this is an interesting future direction very similar to actually i'm going to go back very similar to i guess if you go back to the definition
of the evm on the far left this is what alio could potentially someday look like but okay so now back to the question is elio a zk evm maybe although i still would say not really right and the point is it's like okay what what's the whole point of a zkv and what do we care about here why do we why is the evm important right the evm is important because we want to be able to compute we want general programmability on chain right and so i what i define alio as is a is a platform that uses a zk vm like again the the e part here i think is extraneous because what we ultimately care about is computing programs on chain using zero knowledge so now i'm going to tell you a little bit about
elio after this quick kind of digression and the first thing i want to acknowledge is that alio is not an ethereum killer it's not a bitcoin killer it's not a salon killer it's not anything killer alio represents a step along a path that you know had many many prior steps before and i think it doesn't get acknowledged often enough especially in the modern world of crypto conferences that for like 40 years there were all these failed projects that tried to build digital money and failed but ultimately inspired bitcoin right and bitcoin the key insight of bitcoin was actually not cryptographic at all it was crypto economic right this concept that you have miners you know if you if you build an incentive structure a certain way it aligns the incentives of the
participants the network and the miners and everyone and then the whole system works trustlessly and permissionlessly and so bitcoin you know that that insight kind of inspired a lot of different directions from that same kind of turning point and ethereum similarly the insight that vitalik and others had was okay well we have bitcoin and it's really cool but it's not as powerful as it could be imagine we took a computer and we put the computer on chain and again so we have that you know if we go back to 2015 and 2016 2017 you see all these different projects that take that idea and run with it right so this is kind of its own direction this on-chain vm model and alio implements a model which is based on some research that was authored in 2018 called sexy and he caught in the idea of this was to try and combine some
of these past approaches and you know accept some trade-offs but to be able to have an off-chain computing you know basically where you compute uh program transitions off-chain and then verify them on chain so we we view this as a step in a different direction that gives you some kind of cool new powers so we're going to talk about that uh through the rest of this talk and i'm i mean i'll just highlight to me the two best parts of this potentially is that you know again as we all know on ethereum you need gas why do you need gas to make sure that no one can force the evm into an infinite loop right so gas is there to make sure that effectively no one can dos the system and that's because every node is executing every single transaction uh to verify that it's correct now in
the world of zero knowledge cryptography as vitalik pointed out in the last talk it's like the beauty of this is you just you know you can cryptographically prove a statement without revealing why it's true and if you accept that proof well you know the only the only uh honest verifiers will always accept that proof is valid so therefore you don't need to re-execute the entire uh the entire instruction of the entire program so that's really cool so it's more efficient in that way and also in the additional thing we're going to talk more about this later because i think this is really an underrated insight is that you have unlimited program runtime it's actually quick pop quiz i don't know if anyone knows this but uh what is does anyone know the stack size for the evm offhand okay so it's 10 24. so the stack size of
ethereum is is 10 24 elements right so theoretically you can write a smart contract that would overflow the stack size in that theorem so there's some there's a limit effectively and i don't think for most programs it's of any practical importance importance but the important thing to note is there's a limit into what you can do here so in the alia model or in the zkvm model you don't have this limit because you're running a computation entirely off chain so you could i don't know why you would ever do this but you could fold you could do a protein folding algorithm for years and at the end you can come up with the result and then present that as a proof and then that proof would be as valid as any proof you don't need to deal within the window of a block um cool and then i have this kind of
chart here which shows how i view alia as kind of a mix a mishmash of you know something what ethereum's trying to do and z cash architecturally and we'll go through this in the next slide architecturally i think the way to think of it is a little bit closer to z cash in fact i'll just jump ahead it's a bit of an extension of zcash where if you think in the z cash model you have records and these records basically are the fundamental unit of data on chain and then the way state updates happen is people prove they have ownership of a record that's that the record exists in one of these specific data structures and that they have the key that allows them to spend the record and then you can basically use that to create a system of payments right so there's a
transfer this is exactly how tornado cash on ethereum works as well by the way and sexy the model is that exact same thing except instead of just payments there's this additional parameter that a record has which is what program id and this opens up the door to being able to define basically user defined or you have user defined predicates or developer to find predicate so instead of just i pay you you pay me we can have more complex logic in there and have the proof represent that so just quickly here how this works is you do a one-time setup of the system in the beginning you generate all the parameters you need to prove and verify and then you have approver and we'll talk about the different parties in the system and more uh in more detail over the following side chief approver
basically takes some public states and private state a user signature generates a proof and then submits that proof to the chain and you have a separate party which are the validators or the verifiers on chain they verify it once and then update state as a result um one thing to quickly know which i'll mention a couple more times in this talk is that the approver can be you or it can be someone else so there's it's it's a bit flexible and depending on what trade-offs you want to accept do you want to share information about what you're doing with a third party or would you prefer to keep that private but potentially do it in a slightly less efficient way okay so this is maybe just a little bit fancier way to visualize that so once again we have developers in our system in the point just like just like in
ethereum we have developers deploy smart contracts in our model you have developers that deploy programs to an on-chain program registry so we have our on-chain registry developers to deploy a program and that program is the compiled avm byte code that corresponds to the logic that they wrote and now provers can you know once they receive a transaction a request from a user or again you could be the approver yourself you take that avm byte code you take the initial parameters generated during the setup you synthesize all the information you need to generate a proof you generate the proof that gets wrapped into a transaction and then that gets submitted on chain and then state updates occur okay so actually it's kind of similar to the way that roll-ups work i think a lot
about this you know i think there's this concept now of modular blockchains that a lot of people have talked about and in a roll-up it's kind of the same idea right you're separating the execution from the settlement effectively and so this is this is exactly what we do in a leo natively so so in ethereum you have developers or users and they they're submitting intents to roll-ups basically signed you know hey i want to transfer from a to b and then yeah i'm stealing here i'm stealing i'm stealing some adrian's line so sorry about that um um so anyway so they the roll-ups execute these intents and then the validators the layer one validators verifies that these intents were executed correctly and this is the exact same model that we follow although
again it's a different architecture built from the ground up to be slightly more efficient okay so i kind of went through all this i guess maybe instead of going through this all again let me just say one thing quickly about what makes us the architecture different than something like ethereum or many other changes that i mentioned a minute ago when you deploy a program you deploy to a program registry so what that means is there's effectively a namespace that exists on chain that's tracked by all the validators because this is exactly how you know what program you're interacting with because if i just give you a proof you don't and you don't know what program it is it's impossible to reason about a state update so this is kind of an interesting thing it opens up a lot of doors to potential applications so you could have a namespace and put
anything inside the program id so this is in addition to being being useful for programs it could also be useful for identity applications or other things um yep okay and so we have this concept of callers and provers uh where if the caller calls approver to execute some function again in the real world like these are computer science concepts of just we're separating these two agents but in practice you could be both the caller and the approver you could send that you there's no reason why you couldn't synthesize your own proof um yourself and that's i think very important because i think one of the you know i mean it implies decentralization but i think decentralization is a very worn out word in the space but i think more importantly it implies permissionlessness right so you don't need to ask permission for anybody to
deploy proof which means there's a lot more opportunities to potentially compose and combine things um okay and then we talked about validators and they verify proofs i think that's probably enough to say about all that okay so this is what it looks like in summary so let me just restate it all again from the beginning so alia is building a new layer when blockchain using a proof of stake architecture based on a variant of hot stuff which for any of you are familiar with that consensus algorithm and it uses a computing model based on zexi which is a zkvm and in that model it's defined by off chain computation featuring unlimited runtime where transactions are proof and these proofs are then submitted on chain validators verify these proofs are correct never have to re-execute them again and then effect state updates all
in a way that preserves perfect privacy so this is called decentralized private computation this is a actually this is the term from the 2018 sexy paper which talked about this primitive and i think this is extremely exciting because for the first time for the first time you have this permissionless system where you can deploy programs and interact according to the logic of those programs privately on chain and so we're really excited about um yeah about this this potential paradigm okay so i'm going to go through and i guess in more detail i've talked a little bit a lot of these points but like why is this matter who cares like what's good about this okay so the first is i think you know at this point we've all
been to enough ethereum meetups that we know that scalability can be challenging on ethereum and one of the reasons why scalability is challenging is that every single node has to re-execute every single transaction right and this is why roll-ups are for are oftentimes looked at as a really promising architecture because it separates these two things right so when you separate execution from um you know from settlement you get greater scalability and efficiency um so yeah this is basically i guess maybe a picture that communicates that um oop you guys check the slide real quick okay there we go let me go back okay cool one thing i just wanted to take and i know there's a typo on the slide i
apologize one thing i wanted to just take a digression and talk about is alias of proof of stake blockchain and i was talking about efficiency a second ago i already talked enough about how when you're approver you know you execute a transaction it only needs to be verified once as opposed to forever for all time by every node um one of the things that we implement have implemented which i think we're the first team to implement are frost signatures for our consensus algorithm and this is what validators use in the process of consensus to sign basically that validate blocks but users or developers can also take advantage of this paradigm and frost is basically a threshold signature scheme using schnorr signatures which recently got integrated or is being integrated into bitcoin so for those who aren't familiar schnorr is a really nice efficient signature scheme if you saw my
prior talk on thursday you'll know that schnorr is actually a zero knowledge protocol called a sigma protocol and but anyway the point here being that you know it's much more efficient to aggregate several signatures together and cheaper and so this is a way in which you know you can do things like multi-cigs in a way that's much cheaper in terms of constraints than you could do in potentially other systems okay oh the other thing that i'm excited about um and there's we could do a whole presentation all the really interesting directions that zero knowledge cryptography as a whole is developing and kind of the um yeah the ways in which this is getting better and better and better every single year thanks to the contributions of many people including some of whom are in this room but you know we use a proof system called marlin which i probably should
have mentioned a minute ago um marlin is a universal zero knowledge proof system which means that any it can any logic that you can think of you can prove up to a certain size so this is a recent relatively recent phenomenon i would guess i guess since the post 2019 and you know originally marlin did not integrate any kind of lookup table which is a feature of another proof system called plonk and so one of the things we're very excited about with what we're doing is we've we're integrating kind of the best of both approaches here and we're taking the lookup tables from planck and we're integrating them into the marlin proof system to get much greater efficiency than you could um in in in another context and why is this important i guess for those of you who
aren't familiar with plonk and like why lookup tables help a lot so there's a certain operation i mentioned a while ago there's like computers and how we reason about programs and bitwise and you know arithmetic and integers and then there's cryptographic elements um to translate between those things for certain operations is really expensive for example shot 250 or sorry hashing uh in ethereum is very costly to do inside of a zero knowledge proof because it's it's two different things but you could integrate you could implement a lookup table and make these you could you could take the cost way way down so you can basically use it to pre-compute expensive functions and then and then have that be much quicker or cheaper to uh to prove the other thing that this gives you is batch proving
and this is actually very similar to how rollups work and alio every transaction can be can consist of 264 separate state transitions and these are batched together in a single transaction and kind of the cool thing about the model that we have using marlin is you can batch these together in a way that the cost increases sub linearly with the number of transactions so you know you have a single transition you know cost you know x amount and then as you go up and higher and higher closer and closer to 64 it increases sublinearly so it kind of really encourages um you know batching of things together and and makes it even cheaper for the prover to ultimately compute um and i think that crossover point is basically a forex reduction improver time at a four with once you
reach four transit transitions uh okay moving along so again i wanted to go back to program runtime and um why this is potentially cool and important i gave a couple of examples but another example that i think is really cool that no one has talked about before is using ml potentially to define some some program logic so you could imagine a world in which you knew again so and actually backing up can you do ml on ethereum like a linear regression for example and the answer is well it's quite expensive again because of the gas limit that we talked about because we have an unlimited runtime here ml applications are actually fine to do in zk and in fact there's a lot of really cool interesting applications i
mean one that we kind of played with or talked about as a toy is using potentially an ml algorithm to define a bonding curve right so if you think about you take prior trade data you run a regression linear regression on and you can maybe define and publish like some new parameters around some some type of bonding curve where you could trade assets again so this is like an example of an application that is really hard or even impossible to do in the model of the on-chain computation um but it is relatively trivial to do here cool and yeah okay i think i'd hit on this enough um the other thing is privacy [Music] privacy is an interesting topic in this space because a lot of people there's people feel very differently about it um
i think for many applications at scale privacy will be absolutely essential i mean if we think about the model of just blockchains in general today it's actually shocking how transparent they are for most financial use cases i mean if i send somebody usdc and they've given me their address not only do i know the content of their account i know every single interaction they've ever had with anyone and then recursively can figure out all of those people's interactions in the state of their account which is very very unlike the traditional financial system and i think as all of us in this industry think about bringing this to the world it's incredibly important to keep in mind that privacy is going to be a really
really critical piece especially for financial data that people really want to protect um and so i think it's it's why we built this in as a first class citizen within our system and importantly in elio and this is maybe a distinction from zcash and actually from some of the lessons learned from that experience in zcash privacy is opt-in so it's and it's and this is actually similar how to ethereum and tornado cache work so the tornado cache actually it's used tornado cache because it's ethereum related so tornado cache you have an anonymity set which is basically everybody who's transferring funds on that platform but that is a tiny tiny fraction typically of all of the funds that get transferred overall in ethereum and i guess the tl dr on why this is important is the smaller your anonymity
set functionally the worse your privacy and conversely the bigger the anime and the anonymity set the more you can kind of mix things together the better your privacy and so in alios model we have this privacy by default so privacy by default means every transaction is private and if you want to reveal certain information you can i have actually i think i got my slides a little bit of order here we go yeah so this is actually some alia instructions and by the way if anyone's curious about what the syntax or anything looks like i didn't this talk is not a developer workshop this is more of a high-level talk but we have on github a bunch of examples what alien instructions look like how to use them but anyway this is just a quick screenshot
so you see we have here we have two inputs one is public one is private and we can also output public and private values and like i said this is how you as a developer can define what is private and what is public in your application then you as a user also have the choice to share a view key with you know different parties if you want regulator et cetera and so i think this is really important this privacy by default is important because again the anonymity set increases the security or and privacy for everybody and ensures that that this principle you're trying to achieve is actually maintained okay another thing i'm really excited about here is pr is this this concept of approving as a service which is what we're trying to really encourage incentivize and i think as we look at a
world in which roll-ups in general across the space are seen as increasingly important and ck proofs are seen as increasingly the future of computing you're going to have an entirely new class of infrastructure built around proving quickly and efficiently it's kind of similar to the current client server model of the web where you know i have a mobile device and if i'm you know interacting with some program typically the way it works is i outsource you know i send some instructions to a server which computes something and then it sends it back and renders the result similarly in our model like i said we have this option to for for users to delegate proofs to a third party prover and in that model you know we imagine there could be approvers that are quite performant and why would they be very performant at generating
zero knowledge produce well in elio provers can actually generate proofs for the protocol for the purpose of earning some of the coinbase rewards so unlike some systems that are proof of stake it's only the validators that get rewards in our system we actually split the coinbase reward some goes to the validators for producing blocks and ensuring that you know they're doing their job of verifying transactions but some of it is just paid out to the approvers who are effectively doing some work some proof-of-work puzzle and the reason why this is important is because it normalizes the returns for approvers so it incentivizes them to build better and faster and more efficient hardware over time which then benefits the entire ecosystem which i
might add extends even beyond alia um yeah so the way this works is that the coin based puzzle is effectively generating a proof it's not actually a full zero knowledge proof it's a polynomial commitment which is part of the proof production process but anyway as i said the point of this is really to make sure that provers on our ecosystem are incentivized and we actually had on our second test net um you know we had actually the the consensus mechanism we ran into our second test net back in january was a little bit different was more of it just a strictly proof of work and it was a really interesting experience but one of the one of the interesting things that came from it was that at one point our network was producing twenty thousand zero knowledge proofs a second which is an astounding
number of proofs if you look at you know if you think about like what that means in terms of scale i think it really goes to show how powerful incentives are in proof-of-work systems and so again we we are not a proof-of-work blockchain but we've we've retained this kind of incentive compatible architecture because we believe that provers are going to be a really essential part of how the future of zero knowledge cryptography evolves okay and then the last thing is it retains composability i want to go back here to the concept of the program registry which i talked about in the beginning and i mentioned this in one of our talks that i was giving last night where it's always kind of funny to me to consider that you know in solidity there's no way to import some program um in like a library uh similar to how you could do in python
or rust or many other programming paradigms you just import some someone else writes a code you know writes code for i don't know a signature algorithm or you know factoring or something and you don't want to rewrite or re-implement all that yourself so you want to import this in a single one you say import x library is typically the syntax in ethereum or with solidity that's typically not how it's done and actually i'm not sure i don't know of any other language in which this exists for blockchains typically you have to copy and paste all that program logic and put it in your smart contract and for elio we are actually enable people to import programs from the program registry directly and the compiler that we have basically figures out and inputs that that it synthesizes those circuits
directly into the compiled r1cs of the final program and the cool thing about this is it retains composability so you can take what different people have worked on combine it into something new which i think is one of the most powerful parts about crypto architectures in general and the second thing is you can potentially create a world in which micro payments to the writer or the creator of a library are possible right and this is i mean i think there's many many examples of open source libraries that are very fundamentally important to the web in general and the maintainers of those are highly under compensated given those important given that importance and so we're kind of excited about this paradigm because we think it's a way where we can change that and make their make an incentive compatible model for people to do this really
important work okay i just told you all the reasons why elio is amazing and why zero knowledge is amazing what is it not good for you should be asking me and the reality and i i actually i'm gonna use again i told you i'd steal liberally from a lot of other people's work i highly recommend you read vitalik's blog post about this i think i can't remember the title but it was three or four ago where he talks about zero knowledge proof applications and one of the things that he mentions in that talk or sorry in that blog post which i entirely agree with is that it's difficult to create applications that require concurrent access of the same state at the same time so you know uniswap for example is not impossible in this paradigm but it's also not simple
like there's a lot of assumptions that go into it and maybe this is an example of an application that is better on a transparent blockchain like an ethereum or cello or something like that and this is why i go back to say and my personal belief is there's going to be many architectures that are purpose built for different things at the product or user level and you know so you'll have these different ecosystems in the future and again i think every at the lower levels different protocols are making different trade-offs and so this is one of the things that is a trade-off that you make when you're using zero-knowledge cryptography now one of the cool things about cryptography is there's other primitives one of which vitalik mentioned in his prior talk like multi-party computation i'm sure adrian's going to talk about fully
homomorphic encryption there's other things that other tools we have in the toolkit that can potentially solve this problem and you know we're at the beginning of the beginning of the potential for this technology and i'm extremely excited to see how things continue to develop there okay um and so i'm quickly going to i guess or i should quickly mention that we're we had a test net that ran in january we're launching our main net in december between now and then we're running a test net three which is the final kind of burn in for our network um we just launched last week the initial phase is focused on developers deploying programs so if any of you are interested in this um highly encourage you to go to our github at alia hq you can download all the repos you can get a feel for what
writing programs in leo and the avm is like deploy those programs to chain and we're incentivizing this process and we'll be releasing some details in the blog over the coming days but this is what we consider the first phase of our third test net the second phase um is where we really open it up to provers i mentioned a minute ago we have this coin based puzzle that approvers can participate in to earn credits and this will be the focus of the second phase so we want people and potentially for anyone in this room who is an ethereum miner who might be facing a situation where your gpus might not be that useful anymore you can take the gpus and prove on elio to help earn or to earn coinbase rewards and then potentially with those rewards participate in the third phase where we have validators and who are you know
again as i mentioned we have this proof of state consensus so with the tokens that you've earned as approver you can participate as a validator help construct blocks and verify transactions and with that we'll take from the third phase we'll go right into our main net launch plan for the end of the year okay cool i want to end i have two slides left i want to end on and say a couple things because this is an ethereum meetup and i want to talk about a couple and i guess i should say i myself even though i'm working at elio consider myself to be a member of the ethereum community i have been for a long time and there's other things that i work on and we work on at leo that i think are relevant for anyone and in in the ethereum community even beyond and
one of them is z prize uh z prize is focused on accelerating hardware for zero knowledge proofs nzk snarks um it's a effort that alio was part of but it also includes 20 different teams from across the ecosystem including anoma many others polygon as well and this is really exciting because i think one of the things that people don't realize about the progress of the web is that one of the big turning points was adding in eight cryptographic instructions into intel chips to make https faster from a human standpoint so i remember a day or a time when i was much younger that to load an https website took
it felt a lot longer than it does today and that was because you know these cryptographic operations that you need to perform when you're doing an https request as opposed to an http request are much more expensive and when intel baked those it directly into the cpu that reduced the human time cost tremendously and i'm hoping i feel and you already can see with the number of startups that are starting focused on zk hardware that this is the direction of zero knowledge proves to so even though we have kind of this it's expensive to compute these proofs in kind of the typical like complexity model in real world human time you can reduce that time tremendously by in you know uh by advancing and uh and increasing the sophistication of hardware and we're already seeing the
progress i mean even in the last 10 years it's astounding if you look at zcash you know zcash transactions used to take a minute or more and now it's easily sub second right and alio similarly transactions takes up second and if with specialized hardware we can take that even further so this is an effort i'm really excited about this is by the way i should say a little more about this so the z prize is a competition where 70 different teams from around the world are competing to solve these problems that are kind of really important with regard to generating zero knowledge proofs on different hardware platforms on servers for approvers as a service on clients and on mobile phones so all the work is going to be open sourced when the conclusion ends in october and i'm really excited to share a little bit
more about it at that time the other thing i wanted to tell you is i glossed over this in the beginning of the talk but alia relies on zk snarks which require trusted setup and obviously this is incredibly important um because the security of the system depends on the trusted setup and so this is why we spent a lot of time effort and energy to run a setup server and we actually ran three setup ceremonies as i said our proof system that we use is marlin there was one time when we were combining groth 16 proof systems and marlin together and so we actually ran three set up ceremonies one for marlin for up statement size to the 28th and then two for gross 16 size 2 to 20 into the 19th so we ran a phase one for both the cross 16 ceremonies and we ran just
marlin setups only require one phase so the marlin setup has 137 contributors to it so people from our community from the ethereum community from around the world who participated and generated these parameters and the gross 16 collectively both of those uh both of those other two gross 16 ceremonies have over a thousand contributors each um why is this cool well there's no reason why no why anyone else can't use these setup parameters for their own zero knowledge projects so if it doesn't have to be on alia it can be on ethereum it could be anywhere you can use any of the parameters that we generated and you can take those and you can you can re you know build your own circuits without having to redo a trusted setup yourself
and if you want to see you see alia or setup.alia.org you can see all the information about who attested to um to contributing and get a sense for how you know in my opinion the way to assess the security of these things is how many people contributed and i'm pretty happy to say that we have the largest setup that i know of uh in history for crypto so again this is something that we view as a public good that we hope not only do we hope that we want people to take and use in their own projects okay uh so if you want to learn more i've got some links here so it.org is our website community where we put out most of the announcements with regard to testing elia.org discord and then we have a twitter handle i would encourage you to
follow us if you're interested in zero knowledge in general and uh thank you very much i don't know if we have time for questions i'm gonna okay i may have run over so i'm sorry if that if i did but thank you very much everybody i really appreciate it [Music] [Music] [Music]
cool hello ah great we're ready to go um all right great to be here thank you for inviting me erica um i'm adrian i'm one of the co-founders of anoma and today i want to give you sort of a brief glimpse of anoma and what we are doing with the noma which is a unified architecture for full stack decentralized applications i'll start with a sort of brief historic recap here of where we started where we are today and i think we're going to go in the future um the very first thing that we got was and by the way so like a lot of other
people historically have used different delineations for how these like how you think of generations evolutions of blockchains and i think what i'm presenting today is very different from this but i think it's somewhat more sensical so the really the first generation of blockchains was scriptable settlement and this is what we got with bitcoin in 2008. um bitcoin was massively innovative at the time and it was great at building things like cryptocurrencies [Music] interesting enough people started to build applications like colored coins name coin and a long tail of bitcoin forks on top of bitcoin um the important thing to remember remember though is that they were incredibly clunky like colored coins weren't easy to use on
bitcoin namecoin wasn't easy to use uh namecoin even required a fork of the original bitcoin client in order to make it work right but this is what scriptable settlement gave us and to me this is really the first generation of blockchains then we got ethereum and ethereum sort of ushered in the second generation of programmable settlement and vitalik actually talks about this in the original ethereum white paper that like one of the motivations for ethereum was that colored coins on bitcoin was incredibly clunky and we needed something that was more expressive more programmable than simple bitcoin script so we moved from colored coins to your c20s we moved from namecoin to ns but the really important thing to remember is that when ethereum was designed in 2014
we thought of a couple of applications that you can sort of bring over and make more efficient going from bitcoin to ethereum but there was a host of other applications that we sort of discovered later on are actually incredibly powerful and can be built only on programmable settlement these include things like daos like nfts sol silban tokens what we just spoke about right so there was this host of new kinds of applications that were enabled by programmable settlement and you see this nowadays right that there is a ton of more applications just outside of esc 20s there is not now we have modern applications like taxes amems nft marketplaces but i would argue that they currently have similar downsides
on ethereum or on essentially programmable settlement layers um than we had on bitcoin with collet coins in the past right they're generally still clunky to use they generally still require at least one centralized web 2 component which for example in the case of openc is users alex mentioned intense right like users don't send transactions on ethereum when they interact with openc no they sign a message and they send it to a centralized web 2 server run by the openc team that then does some compute and then ends up settling some output of that compute on ethereum uh this is the same for xerox this is the same for kaoshop this is the same for optimism and stock number two it's always the same pattern people don't directly interact with these systems because they
require interactivity how do you get interactivity in the current model well you send stuff to a web 2 server that does some compute and then settles after you have done the interactive step something on a programmable settlement layer um and i mean historically people keep talking about like generation three generation four and like any upgrade and a consensus mechanism is a new generation of blockchain and i would actually argue that in terms of what they fundamentally bring to developers and what kind of applications we can build on these systems they're really really similar to ethereum uh like i call them second generation plus plus so we've made some advances in for example probably six simple resistance we moved from proof of work to proof of stake and that's now working really well
we also made tremendous advances in consensus mechanisms like we have tendermint now we have avalanche we hopefully eventually get e2 single slot finality right but it's still fundamentally the same model it's programmable settlement it's the chain does nothing but settle some state transition yeah so in the end it's still programmable settlement the important thing to remember though is that settlement is not sufficient settlement is sufficient if the parties already know who they are what they want and with whom to coordinate this is generally not true for most interesting things like if you think you want to sell an asset like you want to sell some eth for bitcoin you need interactivity just to discover a counterparty that has the inverse if you
want to sell an nft you need a counterparty um so pretty much everything that's interesting requires some amount of counterparty discovery uh like the only thing that doesn't actually require interactivity or counterparty discovery is if i want to send money to myself um like if i want to send money to myself i have all the state that i need i know my addresses and for example i can use as a result like some like something like tornado cash on ethereum that actually doesn't require counterparty discovery but it's like it's a minuscule part of what i would consider interesting applications at the moment um yeah so many applications actually need this kind of counterparty discovery service because it is way is really difficult to have a decentralized way of like oh i want to
trade bitcoin for ease oh someone bob in san francisco has the inverse of this transaction and is willing to coordinate with me um you so you see this everywhere you see this in marketplaces like openc is a great example here you see the quadratic public goods funding with git coin you have project donors and funders that all need to discover each other you see this also in daos also you see this in roll ups like rollups are also need counterparty discovery because this is exactly what a rollup server does like this is what the optimism server does it aggregates a bunch of people's intents does some compute so that does the counterparty discovery and solving for this system and then settles it on some underlying base layer at the moment ethereum so how do we currently deal with kind of
party discovery um well we have amms and i would say amms are sort of the best answer we have to counterparty discovery if we live in a programmable settlement world right like if you only have if the thing that you have available is programmable settlement and amm is probably the best thing you can do to enable decentralized counterparty discovery because you just treat the ethereum consensus state as this is the main counterparty discovery point and everyone talks to this and everyone sees the state updates the problem is this is very expensive because everything has to be now globally ordered and it's incredibly silly because you don't need a total global order to be established to say oh i want to trade
some e for bitcoin this is mostly that like it's a side effect of just being stuck in this programmable settlement world on chain order books kind of do exactly the same thing way like the easy answer is always you just dump everything on chain and establish total global order of it the transactions are the intense and then have the system figured out but it's really expensive so the other very common approach nowadays is single operator databases that are just centralization points so openc does this with a centralized openc server run by the company xerox relays do this flashbots interestingly is it it's exactly the same pattern in flashbots people sign a message they send it to a centralized slashbot server um the real
they call this the mev relayer that does some compute and then settles on a chain right um yeah roll up sequencers do this so these are always trusted parties um in the best case they can't steal your money in the worst case they are effectively a centralized exchange that can run away with all your funds um this is why we've designed systems like fraud proofs and so on in order to like reduce the trust assumptions on these central parties but in all cases these trusted single operator databases can censor you as in they can prevent you from interacting with the system because they have a single ip address that can just block your submissions and now there are some other approaches like app specific sovereign chains dydxes approaching is trying this out
right now there are a lot of other downsides because now all of a sudden you have to launch your own blockchain it's a lot of dev work you lose full composability across the ecosystem because all of a sudden to be fair you already don't have this on current programmable settlement architectures where like specific intents are siloed in their little application i can't build a new application that reasons over let's say the open c and the 0x intense at the same time so today i am going to present a normal which is it's an architecture this is sort of an important thing to understand it's an architecture with many different deployment models you can deploy and i'll speak more in depth about this in a bit but you can deploy a normal as an l1 you can many people can deploy a normal
as many l ones like if a city wants to take a normal and the player is the one that works too you can apply this as an l1 and a half i was in l2 um yeah so noma is a unified architecture for full stack decentralized applications um what does this mean more in depth well the really long but all-encompassing tackling is that it's an intense and privacy preserving protocol for decentralized counterparty discovery solving an atomic multi-chain settlement um i'll go through the first part of the sentence not so much atomic multi-chain settlement the other talks i don't have like two hours to explain atomic multi-chain settlement today so what are the key design principles well one it's intense centricity and two it's homogeneous architectures and heterogeneous security models
and we've already spoken a little bit about what does it mean for something to be intent centric it's the idea that users express what they want and not how to get this this is also honestly like the mental model that i think everyone has when they interact with a blockchain but what you currently do effectively in whether this is the evm or the near vm or the solana vm it's always you don't actually express what you want you are you authorize an execution trace like when you send a transaction on these systems you authorize not a specific future result you authorize there are these op codes and these opcodes can do arbitrary compute as a result this means as a user you have to audit honestly
every single opcode that you sign over because otherwise you can have proxy contracts that steal your money because they can do arbitrary things because as a user you never defined what you wanted you just defined on how to get it this is also something that i think my parents will never be able to understand in terms of the security model that they have when interacting with blockchains like when someone taps that card in a store they don't think i'm authorizing all the api calls between all visa servers and they may do arbitrary things and afterwards i should check whether they cheated me like the mental model is you tap your card and you like you're authorizing a specific state transition like you're authorizing that some money is debited from your account um so intents are binding programmatic
commitments to state preferences um once you think more about intent centricity and how you design underlying architectures a really nice other feature is that it falls out that you can have a p2p intent gossip network that doesn't have to be globally consistent as in everyone in this room can have a different view of the current available intents in the world so as a result you can have like a hundred billion intents floating around because they're not consensus critical we don't need a globally consistent view of them and different people can opt in to receive different intents right because maybe i only care about the open sea intense because i'm into nfts and i want to see all the nft traits so i can only subscribe to the open is that a fire alarm
okay good um right so now you have an intent gossip network right you have 100 billion intense floating around they're not settled actually like they're just like what do you what individual people want um how do you actually end up containing combining these intents and creating transactions out of this this where solvers come in they exist pretty much right now like an open c uh server is already a solver for openc the optimism sequence is already a solver just for optimism specifically a stark net prover is a solver just for the stock and specific transaction intents but with arnoma you can have a generalized intent and then you can have solvers that go ah these 15 things are combinable
maybe there are some fungible token trading right because you can do things like i want to i user a wants to do e for bitcoin user b wants to do bitcoin for near and user c wants to do near for east completing the cycle um so you can settle an arbitrary amount an arbitrary number of intents in the same transaction so solvers they will most likely specialize in some specific intents they're building generalized solvers is very hard this is probably an np-hard problem um so if someone can solve this you will make a ton of money because you can sort of solve an arbitrary state transition um practically speaking different solvers will can specialize for different kinds of intent so for example you can
specialize for fungible token training you can specialize for nft trading you can specialize for like lunch date setups because the important thing to remember about intense is that they're fully programmatic as an intent is just code they do trading with other people um it is not specific to actually like what you think of a financial transaction or trade you can say that you can use the intent system to express that you want to meet someone that is into bot games at a cafe in seoul on like sunday at 5 p.m this is it's just whatever you can write it wasn't you can express it as an intent there are no restrictions here yes and this leads to a nice feature that intense are fully composable um you can reason as a solver over the
openc intense the optimism intense and like normal trading intent at the same time and figure out which ones are combinable there um yeah then solvers create transactions and transactions are then set on settlement layer and here it actually doesn't matter which settlement layer this is why i mean that you can deploy an architecture like a nomad to ethereum as an l2 where ethereum just ends up being the settlement layer um this kind of intent centric design is what everyone is discovering at the moment but for application specific purposes right like optimism flashbacks they're all discovering that they like they should be thinking about intense but people still think about transactions but if you actually want to have decentralized counterparty to discover it you need to be thinking about intense the other cool thing is this that this
leads to a very declarative paradigm for application development where i said in the beginning currently in transaction-centric designs you authorize execution traces of how your smart contact is allowed to do compute in intensity design you don't actually do this you just say what future state transitions you find with as a result you don't have to worry about the intermediate steps um that get invoked and whether like a proxy contract is broken or not because you never authorize a proxy contract i guess as long as that proxy contract returns you the state changes that you are okay with in your intent this is fine and this is actually also how sort of the anomala settlement layer works is that instead of doing arbitrary compute in the contracts transactions define
what the outcoming like what the resulting state transitions are going to be and then all the intents just verify that they're okay with the resulting state changes um for an end user this has the really nice benefit that it's a black box like user's author intents then submit them then magic happens because they don't care on how these intents get satisfied and afterwards they just need to verify whether their intent was settled or not so i'm not going to walk through this entire diagram but this is sort of a high level overview of the architecture of anoma uh where on the far left you have counterparty discovery um where users actually write intents and intents can be either transparent
shielded or private if they're shielded they involve also the generation of a bunch of their knowledge proofs if they're private they also involve zero knowledge proofs and fully homomorphic encryption honestly fhe is like at least five years out that's still very exploratory research then users sign these intents they submit them to their client submits them now it hits the intent gossip network and the nice thing is the intent gossip network can span over many different blockchains at the same time over many different deployment models of our nom at the same time so you have one globally connected intent gossip network that can handle the intents for like the enormous l1 deployment the anoma south korea deployment or the anomala l2 deployment
on ethereum and because intents can just specify in which security model they want to be settled um solvers look at a number of intents maybe they take 15 combine them into transaction they submit them to a transaction mempool but first they encrypt all transactions so uh in onoma transactions are encrypted against a public key run by the val dataset uh this uses a protocol called favio which is a distributed key generation protocol high level this solves mev um all transactions are encrypted values only order and propose encrypted transactions uh so in block n you fix a list of you fix the ordering of a list of encrypted byte strings and in block n plus one the
value i said jointly starts decrypts all the encrypted transactions and then executes them but at that point they can't sandwich front run or background you anymore because the ordering has already already been established um yeah now you have a finalized block and then you go into the execution verification environment uh which is a unified execution environment that you can can be deployed to many different um sort of settlement layers um this also allows you to one of the very nice things about the unified execution environment is that it handles transparent chill and private state at the same time um as in you can write applications that are partially transparent and partially private because this will honestly depend on the
specific applications on how much privacy or at what level do they need privacy and then in the end users just can verify uh the settlement of an intent how many ah time is fine right homogeneous architecture heterogeneous security so one of the important things to sort of realize is that protocols can easily be benevolent monopolies like we all benefit from agreeing on tcp as a standard no one actually makes any money on this but it's just nice that we can use the same protocols to talk to all the servers in the world this is also why our phones are pretty cool because we sort of globally agreed on a cellular backbone standard and my phone that i bought in europe works in asia as well as in north america as well as in south
america as well as in africa right like my phone can roam can use the same protocols to roam in different security models um and the big thing to realize is like that the losses of protocol standardization are like very minimal um like sure we could build a slightly better version of tcp but we would lose much more by the fragmentation of having a ton of different protocols then we would buy sort of the tiny losses that we take because maybe tcpip isn't exactly optimal the very important thing though is that security domains should not be monopolies um because security domains uh for example a country is a security domain right like a validator set is a secure domain like ethereum is one
specific security domain um and it can charge rent it can steal funds it can um it can collapse right like different security domains have different security properties and they can fail independently of each other and as users we want to be very capable of not like it's this is not about telling people what kind of security they should be using it's more that people should have a choice um as in maybe to my parents it's preferable that all their digital assets are secured by the 200 people in their village because this is sort of their local trust zone this is the people they trust but maybe someone that lives in argentina really wants to have their assets in the global ethereum security model because they
don't trust their local government but they trust the global ethereum model so yeah we should be separating protocols and architectures from the underlying security models currently we tend to very much tie them together so this leads to the nice fact that you can apply a noma as an architecture in many different ways you can deploy this as an l1 as a sovereign chain this is what we are currently doing as a first step you can deploy them as community-operated chains where let's say the world of warcraft community wants to have a financial settlement backbone they can like take this architecture and run it themselves the city of seoul can do this to run the financial system in seoul you can also deploy this as an l one and a half if you just want decentralize a specific dapp construction so for example you
could have a specific deployment for let's say open c or you can deploy this as a generalized l2 where you build adapts where you use the distributed decentralized counterparty discovery and solving component of a noma with keeping all the settlement to ethereum yep so the first case you just use the intent gauss sub network only and sequence and settle elsewhere the second model is you decentralize the solvers i i decentralized the roll-up sequencers or the approvers or the openc servers um but the settlement still happens on your preferred security model which i think for most people in this room including me at the moment is probably ethereum or you yeah you can also use this to decentralize specific applications or
you can deploy your normal as a fractional instance with local settlement guarantees uh so how do dapps on a normal actually look like well they have intent formats this is something people need to agree on they have solve algorithms which don't have to be optimal they just have like most likely applications ananoma should just like provide a standard solver implementation so that at least there's some like baseline solvers available but there's a huge incentive for people to build their own solvers that are because you're competing effectively you're trying to the the people that can most efficiently solve can settle most uh intents and they can get gather the fees from them um and then then you also have validity predicates which are settlement invariants for users or applications for example if you're transacting with
bitcoin on anoma the settlement invariant for bitcoin is that onoma cannot create or destroy bitcoin so like applications as well as users can have settlement variants that they need to be enforced this kind of vertically integrated architecture means that you get end-to-end security liveness and privacy guarantees um and importantly that like our phones applications are portable across security domains as in like your application your wallet can start roaming between different blockchains as long as we all agree on similar kind of protocols so what can you build with a normal well you can build and this sort of goes back to the earliest thing which i said when we went from bitcoin to ethereum and now
to sort of the sonoma architecture that we didn't think of all the applications that you could be could be built using this kind of architecture when we build ethereum and i think there's like a number of existing daps that i can see using this kind of stuff but i think there's also going to be a large number of applications that haven't been explored yet because we're just starting to sort of think about what this generalized architecture means so existing gaps you can build with full stack decentralization are like things like fungible token swaps like xerox cowshop non-fungible marketplaces wyvern c port openc you can build a very capital efficient amms because you don't need capital locking and um you can decentralize the uh roll-ups using
enormous you can do public goods funding so um git coin without the semi-trusted multi-sig where everyone's commitments to fund a certain project are just intense and once you reach a threshold a solver can figure out what is the best combination of these intents which project should receive the right amount of funding but there's also a ton of novel adapts that i can already think about that require more than simple programmable settlement things like private dials private auctions so anoma also comes due to the fact that we have a threshold decryption system that prevents front running we also get effectively a programmable threshold decryption where applications can say here's a batch
all all transactions for the specific application are encrypted let's say for the duration of this batch let's say 10 blocks and this is what you use in order to build um like second price auctions that aren't front runnable because everyone in the auction submits their bits they are encrypted for the batch duration or for the auction duration they can be defined by the application afterwards the validator set starts decrypts all bits at the same time and then the application just needs to verify what is actually the winning bit but no one can inject new bits or remove old bits from it yes you can build private games i think the thing that i'm most excited about is multivariate multi-party multivariate
private bartering it's the idea that you can tr that like i can say that i want to trade some bitcoin against some cryptokitties someone else wants to trade cryptokitties against train tickets in seoul and the third person wants to trade like train tickets if the weather is nice against um bitcoin um as long as the weather is nice all these three things are combinable and settleable and this like scales to end party bartering as in you can have a thousand individual intents that are all settlable together um which means as a user i don't have to worry about like figuring out the right route for my asset i just say what i have and what i want and as long as there's some sort of path intense can represent this and you can build on-demand runtime
roll-ups because what is a roll-up essentially a roll-up is a computational compression once you have an intent that goes from a to b and another antenna goes from b to c and the third intent that goes from c to d you can just collapse them to one and ten from a to d and this is so high level what roll-ups do uh yeah so anoma is built by helix these are my two co-founders so it's uh ours here as well as in the room um the team is much larger than this so we couldn't build this both with the three of us so check out the team um yeah and this is a normal for you it's a unified architecture for full stack decentralization [Music]
otherwise you can also find me afterwards because we are 50 minutes back [Music]
[Music] [Music] [Music] do [Music] my
[Music] do [Music] [Music]
[Music] do [Music] [Music] [Music]
[Music] so [Music] [Music] [Music] [Music] [Music]
so [Music] [Music] [Music] [Music] [Music]
do [Music] so [Music] [Music]
[Music] [Music]
[Music] [Music] my
do [Music] [Music] [Music] do
[Music] do [Music] [Music] [Music] [Music] do
[Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music] [Music] [Music]
[Music] [Applause] [Music] [Music] [Music] [Music]
[Music] so [Music]
[Music] do [Music]
[Music] [Music] do
[Music] do [Music] [Music]
[Music] do [Music] [Music]
[Music] [Music] do [Music]
[Music] [Music] [Music] [Music] [Music] [Music]
[Music] [Applause] [Music] [Music] [Music] [Music]
do [Music] [Music] [Music] [Music]
[Music] do [Music] [Music]
[Music] [Music] [Music]
do [Music] [Music] [Music] so
[Music] [Music] [Music] do
[Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music]
[Music] [Music] so
[Music] [Music] so [Music]
[Music] [Music] [Music] [Music]
do [Music] [Music] [Music] do do
[Music] [Music] [Music] [Music]
[Music] do [Music] [Music]
[Music] [Music] so [Music] so [Music] [Music] do
[Music] [Music] [Music]
[Music] [Music] [Music]
[Music] [Music]
[Music] [Music] my
so [Music] [Music] [Music]
[Music] do [Music] [Music] [Music]
[Music] [Music] so [Music] [Music] [Music] [Music]
[Music] [Music] so [Music]
[Music] [Applause] [Music] so [Music] [Music]
[Music] [Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music]
[Music] [Music] [Music] [Music] [Music]
[Music] my [Music] do
[Music] do [Music] [Music]
[Applause] [Music] thank you um before i get started i just want to thank the organizers and the production crew and the volunteers and everyone who helped put this together it's been a really great experience so far my name is camila ramos i'm a developer relations engineer at edunode which is a core developer of the graph protocol and
a little bit about me a quick intro i kind of have a traditional and non-traditional path to kind of crypto and engineering in general my background before i did computer science was in education i've always loved teaching i've always loved education and i always thought i was going to be a regular kind of k-12 teacher and then in high school i got interested in computer science and coding once i kind of realized that teaching doesn't really pay well in the united states and it's really just not a good path to go down in terms of quality of life so i was like hey look i live in the bay i see everyone has teslas everyone's here's an engineer they do pretty well so i'm going to learn how to code too and then i did i studied computer science in college and then started off my career at paypal
where i worked on the checkout experience as part of the engineering team so everywhere where you're checking out and you see the button pay with paypal that's what i worked on for about a year and a half um and then today what we're going to talk about is the web 3 stack and kind of a more practical point of view so when i was getting started building in blockchain and in crypto it was kind of hard to understand how to make all the protocols how to string them all together how to make them communicate with each other how to actually build something that works so in this talk i'm hoping to outline this in a really practical way and show you guys code and kind of very specifically and explicitly explain how you can build a full stack decentralized application
so um a lot of these definitions are from a blog post which are linked in this presentation and i'll tweet out the slides with all of the links so that you can read more about these and actually like be able to check this out yourself so the web3 stack as defined by this blog post that we're talking about is a set of protocols that enables fully decentralized applications um so real quick i'm not going to talk about these one by one because i think everyone here kind of is passionate and understands why we're here i usually use this slide when i'm talking to newer audiences and maybe some web 2 audiences but i just wanted to add this so we can kind of capture what we're going to talk about in the next few slides and how these protocols enable these points
so when we're talking about building decentralized applications and maybe if you're coming from like a traditional engineering world actually maybe i shouldn't stand here because i'm blocking sorry there we go if you're coming from kind of traditional engineering there's certain pieces that and architecture that you're familiar with right we know that we work with apis we have this concept of a front end we have this concept of a back end we have this concept of a database etc and i found that it's helpful to kind of start by listing out what are the building blocks and the primitives that you need to keep in mind when you're building so blockchain your l1 your development environment file storage off chain data protocols api indexing and querying identity client frameworks and libraries oracles
and then kind of in their own bullet point is web3 social protocols and again at the bottom is linked this blog post that was created by the research team at edge and node and that was authored by nader who's sitting right there where it goes kind of more into detail about all of these things and then this image was really helpful to me when i first started building because it kind of visually lays out the whole stack and then it allows you to kind of check this out and define for yourself what is an ideal stack based on my use case so i'll leave this up for a second and we're going to kind of go through this and talk about what my stack looks like and then go through some screenshots of some code for how to actually implement something like this okay
cool i also have these uh so web3 social i wanted to highlight live pier and lens they're part of you know this last bullet point oops here about web3 social protocols that kind of weren't captured in any of the other bullet points but that i wanted to highlight so live here is a decentralized video infrastructure that allows you to integrate live streaming into your adapts and then lens is a decentralized non-custodial social graph for building composable social applications and in this slide there are two resources linked like a tutorial to get started with both of these which again when i tweet these slides out you'll be able to actually click on these links and access those so talking about kind of what a stack could look like this isn't the stack for everyone you know a lot of this is up to personal
preference it's also kind of where you are in your timeline of learning and you'll notice that in one of these i have an arrow to kind of indicate that so let's talk about this so when i build on ethereum i use polygon as my side chain and for my rpc provider which is actually the the way for you to write to the blockchain it kind of provides that node that access point to the blockchain i use infira but the other ones out there are like alchemy anchor um there's a bunch more i use infuria for my development environment i started out using hard hat that's kind of what i used the whole like nine months or something up until this point and then recently i started learning foundry and trying to use foundry so that's kind of what i mean when i say this is really
relevant to where you are in your journey you might have started off with hard hat because that was what was really popular a year ago and kind of now foundry is picking up speed and picking up adoption and after you've worked with hard hat you'll be able to see like okay this is a better experience for xyz but for other cases you might have a better experience with other tools so it just kind of depends where you are and what you're working on for off storage i use ipfs and web3 storage and recently i've started using rwev another example of kind of just depends where you are in your learning i started off with ipfs and web through storage and then recently for an app i was building there was something that was a lot easier to do with our weave so i kind of
just tried it for the first time and realized that that was a better choice for this specific app that i was building but they both do similar things it's a way for you to store data off chain such that you you know storing things on chain is expensive so there's not everything has to be on chain but still you want to be able to store these things so you can use something like ipfs slash web3 storage and our weave for indexing i use the graph and that's where i do developer relations and we'll kind of get into that more deeply about what that means for identity i've been using coinbase wallet as my development wallet coinbase wallet is i would say a relatively new wallet but they actually have a lot of cool features for developers and they're really good at listening to developer feedback so i've been working
pretty closely with the team to give them my feedback and it's been pretty cool to see them implement some of the stuff and then i use rainbow kit for that piece that kind of allows the user to connect their wallet and we'll talk about that more later and then finally for client i use ethers and wag me so now how many here have heard of the graph by a show of hands okay cool how many people have actually used the graph okay so not that many so this is great so i'm going to kind of give you a crash course 101 for how to build with a graph what it actually means so the graph is an indexing and query protocol that allows developers to efficiently read data from the blockchain so you know as we're writing blockchain applications a bunch of stuff gets stored on chain
and you as a developer you might want to access this data for your own application and right now there's really no efficient way to make queries against the blockchain for things that are more sophisticated than asking single questions for example with something like etherscan you can go in there and ask who's the owner of this specific id or you can say what's the uh what's the balance of the specific wallet you can ask these kinds of simple questions for but for more complex things like you know give me all of the wallets that have you know 10 ether or more and own this nft you can't really do that right now without kind of writing your own indexer and going through this whole process so the graph makes it really easy to do that and at the time of writing these slides this was the current block count of
ethereum 14 million i think now it's past 15 million and in a block you can fit an average of 70 simple transactions so we're looking at at least 15 million times 70 pieces of data that you as a developer might be interested in so it's a whole breadth of data that you as a developer have access to and the graph is the door for you to actually access that and build with it so the data you want to query for is somewhere in the blockchain right but due to the nature and the structure of a blockchain there really is no built-in way to identify query for this data and then like i said it's a querying an index protocol that allows you to read data from the blockchain and the cool thing is that if you come from a traditional software background you're probably already familiar with graphql
and the graph uses a graphql query api to be able to call this query from your frontend application so for me as a developer when i was first starting it was a really cool way an easy way to get started with web3 because it was something that was already super familiar to me and instead of reading from a database like you do in you know web 2 you read from a blockchain so some quick bullet points about the graph it's chain agnostic meaning that it's not built specifically for one chain there's support for many chains right now on our hosted service and then on the decentralized network all that support will be coming over there now instead of reading from a database like i said you're reading directly from one of these chains and then you as a developer you write these resolvers which are just functions that apply
logic to transform the raw data from the blockchain into these objects that you define in your schema so we'll talk about this in a more practical sense in a second like what that actually means and then just a quick note on indexing so indexing refers to the process of turning unordered data into an order that will maximize the efficiency of a query made against that data so a real life example is if you are in a library and you're looking for a book i don't know about world war ii you don't just walk around the whole library looking book by book row by row right there's a system in place these books are indexed in such a way that when you walk in you go okay this is where the history books are and then on this specific aisle it's where the world war ii books are so
that's what the graph does with blockchain data indexes is so that you don't have so you make very efficient queries against this type of data there we go so these things that you build with the graph are called sub graphs anyone can make one and once they are published and deployed they are open apis that anyone can have access to so if i build a subgraph for my project all of you guys can see it and all of you guys can call it in your application if you wanted to and there's already a bunch of subgraphs deployed so like live pier radical uniswap a bunch of big projects already have a subgraph deployed so if you were interested in the data that for example uniswap is indexing and you could use it in your application just by calling it in your front end
and this is just a cool little visual to kind of help you understand where the graph sits in the stack now so to define a sub graph like i said crash course we'll talk about this a little bit more kind of in a real world use case shortly after this but in order to define a subgraph you as a developer you define a few things so the first is the data source or the data sources so this means what contract address you're interested in indexing so for example if i'm building a dap i have to write a smart contract for it therefore i'm interested in indexing this data so i'd pass in my address you could pass in multiple addresses the second thing that you define is the data that should be indexed this is the actual data that you're going to be interested in querying for later so if
for example we're going to show you later we're building an application for event creation and management like something like eventbrite or something like luma people are able to create events like you know eat seoul and then users like you guys are able to rsvp to them me as a developer i would maybe be interested in knowing you know who is rsvp to my event who created my who created different events so the data that i would want to index is that specific thing so who created events what's the name of the event what's the max capacity of the event et cetera and then similar information for who's rsvp the third thing is events you want to listen for so the graph works based on events solidity events that are defined in your smart contract so for example i might create a custom event called new
rsvp created that will be emitted every time someone creates an rsvp in my application and this is kind of the hook or the trigger for the graph to know okay it's time to re-index because something new has happened and this is the mechanism for you to ensure that you always have fresh data and that your data isn't stale because if for example you make a query in your subgraph to say you know give me the list of people who rsvp to this event and there's say 10 people but in the next minute two more people rsvp'd how are you going to ensure that you have those two people and how are you going to ensure that you have the most up-to-date data is through these events so when someone rsvp's it emits this event and then the graph knows okay we need to go ahead and
re-index and get the freshest data so that's what that is for and then finally are you as a developer you write these resolvers that execute when these events are emitted so when this event gets emitted new rs will be created something has to happen some logic has to happen for this data to be indexed and then for this new information to be stored and those are the resolvers that are written by you a developer and then this is just a screenshot of what it looks like to make a query in the playground so it looks kind of blurry but this is a lens sub graph so here someone's making a query for profiles the total number of followers their profile id their handle etc so it just looks like regular graphql and now we're going to kind of walk
through an app that was built and kind of go through all of the pieces that we talked about in the in the tech stack and how they actually communicate with each other so first i'm going to show some screenshots i thought i was going to be able to kind of live code and live show you um but i yeah that was impossible so i just put up screenshots and then we'll talk about it so this is what the home page looks like discover what's happening in the metaverse the events that are shown in the front are kind of the events that are you know in your area or that you're able to rsvp for this is the flow for creating a new event so if you were like oh i want to host a birthday party or something you could create a new event you set the
name the time the capacity a refundable deposit event link and description and then you create it and then you have your own user dashboard once you connect your wallet where you can see both the events you have created and then the events you've rsvp'd for so it's kind of like now so when i say events that's what i mean we're talking about this specific app okay so now i want to bring up this um kind of architecture diagram and i don't know if it's easy to view but again i'll post these slides and you can see but for me this was really really helpful to start building dabs because it kind of lays out how everything actually communicates with each other and don't worry if it's not quite clear from this picture we'll kind of walk through it together in a second but on the bottom
uh left for you guys you have your contract and the contract that you wrote specifically for this that handles things like rsvp's new event creation etc and then you'll see at the very top above it you have your sub graph so the sub graph like i said it gets triggered by events that get emitted from our contract and then the sub graph also um collects data from our off-chain storage because although some of the data is stored on our contract some of it is not stored on the contract right for example something like the event name and description don't need to be stored on chain it would be super expensive to do so so stuff like that is stored off chain um then we have our front end application our client app and the blue right there and you'll see that it reads data from our subgraph
and then and then it also sends queries to our subgraph so you ask for a query you say hey give me the i don't know the top five events in my area and then the sub graph returns those that you can then display in your ui uh you'll notice going from my front end up we have rainbow kid slash wag me which is the way for users to connect their wallet and finally kind of below that we have inferior that's kind of the rpc provider that's connecting the contract to wag me slash rainbow kit to our front end so remember infuria is the rpc provider that allows you to actually make transactions it's the entry point to the blockchain so that you don't have to run your own node so that's kind of where the role that that's playing okay so again i thought i would be able
to live code so i just put screenshots and i tried to enlarge them as much as i can but i'll kind of walk through these real quick can you guys still see me if i stand up here okay yeah um okay so this is what it looks like to send data from our client application to web3 storage via a nexjs api route so i think pretty much at least for me my standard for building client applications is nexjs and they have a really cool thing that they have these built-in api routes so when you as a developer are writing and you want to say all right the data that i want to store in ipfs aka off chain data this is exactly how you would send it so you have a body that you define that's maybe gathered by user input right and then you just do you know your classic kind
of next.js api thing where you say okay fetch this route the method is post and i'm sending in my body super easy and then here's just kind of some error handling in case it doesn't go well so the next thing is how do you call the contract from your client so in your client application like aka your next js app the thing that your users are looking at that that you see like the buttons and the events how do you actually call the contract so using wagmi those are react hooks for ethereum and it makes it really easy by using this connect contract method and then this is literally how you call a function so the function from my contract is called create new event so after creating my contract
all i do is i literally call the function create new event and then i pass in the parameters do some error handling and then done so now i've called a function on my smart contract from my client okay and then here is the actual api route that's sending the data to ipfs so in this slide we're sending it from you know createevent.js which is kind of like a form that you saw remember the form so that's gathering everything in the body and then sending it to the api route and then here is like okay this is how you actually store it and like persist it in ipfs this is just some code that is from their docs it's nothing really special you kind of just copy and paste it from their docs but here you'll see we're making sure that the request method is post and then
these are all literally um stuff from their from their docs so i'm passing in my body and then the rest i got from their docs so now that's done now writing your subgraph to index and query events so this is just a like a small part of it there's more to it but you'll see here we have something that handles a new rsvp so these are resolvers these are the resolvers i was talking about so this handles our new rsvp and then the second function handles the confirming of an attendee so if you remember when we were creating an event we asked for an event deposit so you can set it to like point i don't know 005 matic or something like that and the idea of this is that if people don't show up then you as the event organizer get to keep the money as kind
of an incentive to make sure people actually are showing up to the events that they are as vp for so the confirm attendee function is to is that mechanism to say okay you actually got here i'm going to confirm your presence so that you can get refunded so this is part of the subgraph that handles that i won't walk through the code but this these are the resolvers it's only like maybe 10 or 15 lines for each one okay cool and then configuring the graph in your apollo client file super easy seven lines you just are defining the url for your subgraph which for us it's the graph slash subgraph slash web3 rsvp and then how you actually make a query how you actually fetch the this data is by just using like i said a regular
graphql query where you can write it inside of your file just like you would with regular graphql you would save it maybe into a variable called data and then display that in your ui maybe you would map over it you know if there's many events you can map over this data go to events and then show a little box for each that's what we did and then so inferior how to configure infura in your app.js file you literally this is just straight from their docs there's nothing kind of like unique about this where we just set the inferior id which you get from your project dashboard um you configure your chains for this specific project we use polygon mumbai we wanted to use a test net and then down here we just defined the app name and the chains which we defined earlier
and then again configuring rainbow kit and wagome this is straight from their documentation nothing unique about this so we just said we created the wagmi client and then down in our app we wrapped our app with apollo provider rainbow kid provider and wag me client which is from their documentation and then actually having the access to the connect wallet button from rainbow kit is super easy you just import connect button from rainbow kit in any page of your application so either in your index.js and then any other pages part of your app and then how you use it is then you literally just use it as if it was a component built in super easy okay cool so that was kind of my maybe i'll go back and see someone take me
here oh you wanted this one okay um that was kind of my like practical crash course of how these actually communicate with each other and now i have two quick start so this is a typescript front-end starter repo which has rainbow kit wag me tailwind css and an xjs app already up and running so all you have to do is fork this clone this npm install and then you have something running this is in typescript and then there's this other one which is in javascript that has a little bit more to it so it has rainbow kit wag me tailwind next it also has the graph and web3 storage already built in so you can look at the code and then just edit it based on what you're doing so obviously i have um for this one i have a lens sub graph just so you can see how you
make a query but now you know how to set it up you can just change the url write your own query and then your app will be up and running so this is for javascript and then a last thing so for anyone who's still kind of like i'm not maybe i don't feel quite ready to build a full stacked app on my own women build web 3 which is a dow focused on high talent female engineering uh female and non-binary engineers in web 3 created this open source course called 30 days of web 3. it just launched last week and there's over 3 000 developers taking this now you can just go to 30daysofweb3.xyz and here's kind of what people are saying about it the t and you don't really need to have a coding experience the goal of this
course is not to teach you how to code like we're not going to teach you how to map over an array or we're not going to teach you how to write smart contracts really the goal of this course is to give you an understanding of the architecture of web3 so we give you the code we walk you through everything and then by the end of it you'll have deployed a full stack decentralized application and that's it thank you [Music]
so awesome thank you all for coming out today uh really excited to be talking to you about polygon uh today we're going to be talking about full stack dap development on polygon and specifically how you can kind of use the overall web3 ecosystem as different building blocks for building out like truly full stack like robust applications so a little bit about me emerhat i'm a developer relations engineer at polygon previously been a front-end engineer for
a while was a solitary freelance engineer and overall been an indie hacker slash web3 enthusiast i've tried to build several failed startups i can tell you everything i did wrong i cannot tell you how to succeed because i've never done it myself but you know i can get you a little bit closer to there and tell you all the wrong things i did these are some places you can find me always happy to chat happy to go over any kind of like ideas that you have if you want to bounce any ideas off or have any technical issues always open to chat about that so one thing that i kind of noticed as i was going through this specific presentation is that the title of this presentation might not be correct and i'm not going to give you the title of
the presentation just yet we'll go through that later but just to keep that in mind um although we're talking about full stack dab development on polygon there is like a bigger kind of underlying message here that we're going to be building towards so a little bit about polygon what is it so polygon is the leading platform for ethereum scaling and infrastructure development so we provide a whole bunch of different solutions for you to build on top of l2 solutions a lot of things on the zk front that are coming up that i'll be talking a little bit about um as well as folks may already be aware of like our proof of stake blockchain which is going to be one of the main focuses of our talk today so calling those out again a little bit
right here proof of stake blockchain again that's what we're going to be talking about today one other solution that i really wanted to highlight today though we're not going to go like fully deep into is our zk evm uh which we hope to release later um in this quarter of on like our test net so hopefully you'll be able to start building uh you know some test applications on that platform very very soon uh one of my favorite things about the zke evm is the fact that everything is evm compatible the solidity that you may already know that you're already building will work all you have to do is just deploy onto this kvm um we did that just to make it easier for folks to like start you know coming into the zk realm to make it uh you know compatible for dev shops who
are already building in solidity who want to leverage the power of ck proofs so i will be talking a little bit more about that at polygon connect so if you're going to be there i really hope that uh we have more of a conversation on that there um before i move on there um you know i just also wanted to call like we've got an entire suite of different solutions for scaling uh we don't believe in just like a one-size-fits-all solution there are different solutions for different use cases um so that's kind of what we're aiming for we're trying to build use cases that make sense for you for your specific you know project for your specific dap so what we're going to what we're aiming to do is build that entire suite so you can pick and choose what is actually useful
for you to build out for your users so building on the proof of stake chain a few things to keep in mind as you're building on on top of it it is evm compatible uh meaning you can leverage all of the tools that are currently available to you in the ethereum ecosystem if you've already been developing on ethereum you already know how to develop on polygon there's no difference in different things that you have to learn on like the technical level all you have to do is switch your rpc endpoint of where you're deploying everything else just works one-to-one a couple of differences uh the token which is thematic token all fees and interactions are paid on the blockchain with thematic token and you know rather than eighth this is how you're kind of
like paying those fees it's accessible very very much like super low fees compared to ethereum and sustainable the pos chain is carbon neutral and polygon as a whole is striving to go towards being carbon negative so here's a little bit about the overall architecture of the proof of stake chain at the bottom with those nice little purple blocks you have thematic sidechain this is where you will be doing most of your interactions as a developer this is where your users will be doing most of their interactions where their wallet is going to be connected to is where most of the magic happens right you'll see up top though um that everything is connected to the ethereum main net specifically we refer to the ethereum as
our root chain in the middle we have a layer called the plasma layer what the plasma layer does that has the specific checkpoint nodes that are going to be looking periodically at the state of the matic side chain and is going to be saving a hashed value of that to a smart contract that lives on the ethereum main net so a good way to think about this is like maybe you're playing a video game certain parts of the video game you're saving your state so you can come back to it at a later point in time right that's essentially what the plasma checking point is doing it's saving a hash value of whatever the current state of the medic side chain is to ethereum giving you essentially the ability to inherit some security from ethereum it's everything is backed up on ethereum and transforms this from just being just
like the manic side chain into what's called a commit chain so one thing that i mentioned during that conversa that whole spiel there was that pos is accessible so i wanted to give you a little bit of an example of that i have a little bit of code up here this is a very bare bones smart contract on building your own erc20 token there's nothing fancy going on here i believe i copy and pasted this from the opens upland documentation so this is just creating a token called gold token um in the constructure it just takes an initial supply for however many tokens you want to mint nothing fancy right just mints a bunch of tokens so
a couple of lines an import from open zeppelin uh here is me trying to deploy this using a remix so remix is an online ide for quickly building out your own uh smart contracts once i try to deploy it in my metamask i see that the cost for me to actually deploy just what two or three lines of code is 76.42 same thing now except i've switched to everything over to being on the polygon main net on polygon mainnet now this was about we'll say a month month and a half ago it's about point zero zero two nine matic uh to send this out it's like a fraction of a penny so you're going from 76 bucks to a fraction of a penny to deploy
just three lines of code right so now imagine i'm actually trying to build something in production an erc20 token that has you know more functions like i want to add things like attacks on transfer i want to add like an allow list maybe this is part of an ico maybe i have an additional contract for like an ico the more logic the more state variables everything i add the higher the cost of the smart contract right because storage is expensive so if i were to go through this this very very quickly becomes expensive beyond this like 76.42 so that is one of my favorite parts one of the reasons i actually joined the
polygon team in the first place when i was first learning about smart contract development myself it was during the height of like the nft craze when everyone was just like minting everything and all these gas wars were going on i wrote a very very sloppy smart contract it was like the first one i ever wrote and i was trying to be a hot shot and like put it out onto mainnet and when i saw the cost i said never mind so so i wanted to go back to this point here uh building robust decentralized applications requires a combination of tools in the ecosystem so i want to go over a bunch of the tools in the ecosystem that i like using for building out apps
so first we have just a list of like your developer tools smart contract development can be done with a few different things hard hat and truffle are very popular especially if you come from like a javascript background these are javascript-based tools brownie is a good framework if you're more of like a python person and then foundry relatively new built with rust but it allows you to kind of like stick to your solidity and not really care about anything else i haven't done foundry too much i'm really excited about what that team is doing so hopefully i'll be able to build a few things in that sense some front-end tools that i really like using wag me hooks although it's in beta my personal opinion is it's one of the best tooling for front-end developers in
the web3 space so definitely check them out a rainbow kit which gives you an awesome ui for just like connecting not only to you know a metamask wallet but you have to make sure when you're building out your front ends as part of your gaps that you're being as inclusive as possible to as many different users as you can rainbow kit makes that very very easy because out of the box you're able to connect not only to a metamask wallet you're able to connect to mobile wallets you're able to connect to um you know ledger hardware wallets etc all kind of like done for you very quickly without a lot of configuration so wallet connect is also um you know a
good way to do it go about things and is one of the underlying parts of rainbow connect uh rainbow kit as well etherjs um is the what wag me hooks is kind of like built around so i definitely recommend also checking that out uh one thing i wanted to touch on at least for a little bit is security we do not talk about security and smart contracts enough and um i mean over the past you know couple days weeks you've probably seen some of the messes that you know occurred so it's very very very important that you take security seriously when you're building smart contracts the move fast and break things culture in startup world does not always work in web3 when you move fast and you break things and
you break people's money people get mad so it's very very important to understand what tools are available to you as a developer on the security side of things some of the things that i like to use are slither and mithril so slither is one of my more kind of like favorite ones it goes kind of like does an analysis of your code and kind of like flags different potential security vulnerabilities for example maybe you have a reentrancy vulnerability in your smart contract when you're withdrawing funds it'll be able to kind of like let you know hey there is potentially a vulnerability here please look over this code this alone is not going to be enough it'll give you an idea of like where you
kind of need to go where you kind of need to look at for your code but it is important to go beyond this a little bit and you know if you're going to be putting something out into production especially something in the d5 world especially something you know that deals with people's money to get your smart contracts audited by a third party slither will get you kind of like the base of like what you need get you start thinking unlike the security side of things but it's very important before you go into production you get things audited so now i'm going to be talking about specific things that you do inside of your applications to make them a little bit more robust first reading data really awesome that i got to go after cami because i don't really have to
explain the graph too much so you know everything academy just explained about the graph is really helpful for like reading data no matter what type of application you're building you're going to need to read some sort of data from the blockchain rating data from the blockchain is not the best thing in the world you know you know you don't want to be sitting there right writing a whole bunch of like getter functions here and there until you get all the data that you need the graph makes it super super easy to like get a lot of that information indexed and sent over to you through a graphql api uh just like kenny mentioned right before me um so we'll move into like a little bit of file storage uh file storage there's a couple of different uh options a file coin or ipfs is a really good one as
well as r wave i've used file code and ipfs specifically their web3 storage and their nft storage um uh projects those are really good have generous free tiers for just like you know putting up like if you if you don't even want to like have um anything to do with like uploading anything directly from your gap you can just like drag and drop upload assets if you need marketing assets available or anything for like static websites all of that can be done really quickly through filecoin um using like web3 storage uh rwev very similar has a lot of really cool toolings in that sense one of my favorite things in the rv ecosystem is bundler
bundler allows you to upload and keep like storage on the rv blockchain without the need for our weave native tokens you can even use bundler and use matic to actually pay for storage on the rv blockchain so bundler makes it really easy and accessible to use the rv black blockchain definitely recommend checking that out for your storage needs one thing i wanted to add on top of the storage side of things is a really cool protocol i've been like looking into called lit protocol so they provide decentralized access control for web3 for apps private data um on the open web so let's say you have some you know you know some assets that you have put
on like uh file coin or on are weave and you want to make sure that not everybody has access to it lit protocol can actually help you with encrypting it making sure only specific people maybe certain allowed users and their addresses can access to it maybe certain people in specific like nft groups maybe you're trying to make like an uh nft gated blog or something like that lib protocol is really good for use cases like this and providing that level of access control so now we kind of go into different like off-chain data protocols uh two my favorites in this area are ceramic and threaddb ceramic is doing a lot of really cool stuff in this sense where um you know
you can have like these different data streams and profiles because like not everything needs to be saved on chain not everything should you know be saved on chain uh but it should be saved in some type of decentralized manner so i definitely recommend taking a look here i really like ceramic because they're also doing things in the sense of like improving on top of like different ways of doing sign in with ethereum identity as well so check out ceramic for that type of thing now um one thing i want to stress this is not a complete list there are like tons and tons of protocols out there that are going to help you make it easier to build you know actual robust decentralized applications so
definitely check out all of the new things that are kind of like always popping up it's hard to keep track of things because i feel like every day on twitter you see this new protocol with this new thing that you can do to add to your app but you've got to like kind of like vet them to see like what's useful for you what's useful specifically in the application that you're building now what i want to mention here is like web3 portals again they're your building blocks it's kind of like how you use them together to build that gets you to that eventual final state of like a full stacked centralized application but what about the cherry on top how can we tie everything together we can use polygon to supercharge your decentralized applications ux and i'm going to go into what i mean
about that but i mentioned all these different you know protocols all these different building blocks and tools you can use them all together you can use them all on top of your adapts that are built on polygon i want to show you this tweet um from a while back from my friend denison uh he is working at tally and uh this this tweet always like it was funny to me at first but it resonated with me a lot so he says that the biggest ux fail of ethereum is gas i absolutely know why it's necessary please fam i get it i know but regular people absolutely do not get it they do not care and they do not want to care
and they quite frankly hate it so now we're in a bit of a conundrum right how do we get regular people who don't care about why you need gas why you need this level decentralization to start using your applications income something called gasless meta transactions so i have a little bit of a diagram here i'm sorry i'm not the best person at these diagrams but i wanted to first kind of like take you through the flow of what a gasless meta transaction would look like first thing would be doing something and i'm going to break these down so there's going to be like further slides on each of these points but the first thing you do with a gasless minute transaction is you sign a
transaction using your wallet using eip 712 with structured signed data and we're going to break that down a little bit further in a second you take that signed data you send it to a relayer something like opens up in defender or bikonomy that relayer wraps the request into a transaction and sends it to that contract into the contract right but what happened before this relayer received that transaction you as a developer might have loaded up that relayer with somatic right to cover some potential gas fees that your users might might incur that relayer is going to take the inputs from your signed data as well as some
loaded upmatic and send that transaction to the contract to be executed on the user's behalf now let's say this is you're minting an nft you have a actual free minting nft experience with someone who doesn't have to pay anything to mint someone who doesn't have to pay any gas to mint you now have the ability to onboard someone who is completely new to web3 without them having to go to an exchange buy somatic buy some tokens put it make sure it's you know it's not a good user experience as much as you know we like to pretend it is so let's break this down a little bit further uh signing eip712 this builds off of the concept of don't trust but verify
we verify that the user has access to their wallet because they're the ones signing specifically this crypt account this cryptographic signature you design some data structure on your front end could be a json object or whatever with specific inputs that you know whatever end function is being called needs if you're using something like ethers the implementation is this like signer.sign type data this is in the ethers documentation you can take a look at how to build out this signature using that functionality and from a javascript front end this creates the signature and makes it ready to be sent to some http endpoint for a relayer so we're going back to web2
you're just sending a request to some endpoint using the relayer like i said we're making an http request to that relayer relayers can be loaded with funding uh for gas again opens up their defender by economy ethereum gas station network all great options here and we just make these requests for to actually we sign the data make the request it executes the contract on our uh the transaction on our behalf this is implemented by uh lens protocol and i think this is one of the best examples of like how to use a full robust decentralized protocol without paying any gas because if you use any of the um any of the projects that are built on
top of lens protocol like lenster et cetera a lot of them are using lenses graphql api and the graphql api that they built uses a relayer i believe it's on by economy i'm not 100 sure so that you don't have to pay any gas anytime you like a post anytime you comment anytime you you know make a post or whatever because all of these things change some state on the blockchain all of these things all of these interactions would use some level of gas but now you don't need to do that as a user you don't need to care about that because we have the relayers acting on your behalf in the background this improves your ux by a very very large
amount people don't need to care especially folks who are not native to web3 because if we're going to be going for mass adoption we need to be building our decentralized applications in a way that is inviting to people who don't understand how this kind of works and you don't have to do this for your entire application if you think about like how um certain software and everything works in the web two world you know you have like your 30-day free trials or something like that it doesn't exist in web3 you don't have a free trial you just have gas fees that you have to pay now all of a sudden you don't have gas fees you have to pay you can you know front run and like pay for at least your users at the beginning to like get used to how your applications work they have a way to
actually try your applications in a real production environment without having to spend any of their own money this is economically viable on polygon as a chain because of our incredibly low gas fees that i mentioned you know kind of at the beginning we're a lot more of an accessible uh blockchain versus you know imagine doing this on ethereum mainnet especially when there's like a huge nft gas war going on right so what should the title of this talk actually be title of this talk should actually be building better user experiences in web3 on polygon that's what we really care about we really care about making sure your users are able to benefit from your services use your applications in a way
that benefits you and benefits them this entire ecosystem is built on folks like you the builders and the users who are using your applications so we're aiming to make sure that the experience is as good as possible and hopefully what you can take away from this is one way of doing that for your applications so again i'm a hot developer relation engineer polygon a few places you can find me up here again i really enjoyed talking to you all today and thank you [Music] so
[Music] hey everyone it's very glad to be here and see so many people on this stage or the stage over there and very excited to be here talking with uh developers or hackers about ipfs and falcoin so my name is longfei and i work with protocol labs as a developer advocate for far coin and ipfs so today i'm gonna basically give a technical introduction about ipfs filecoin basically just trying to give enough knowledge and about how you're gonna build application during the hackathon for on top of the ipfs and filecoin and so let's first talk about how everything
gets started so as i mentioned earlier that i work with protocol labs so protocol lab is uh one an r d team which is building open source uh toolings and services for the web 3 services and the first protocol that we started building is ipfs it's back in 2014 2017. it's uh the peer-to-peer network and for file sharing files over the distributed network and then after that we start building the file coin on top of ipfs and it's a decentralized storage that we intended to store the valuable humanity data on ipf alcorn because protocol lab is more
of the research and development team so we need a falcon foundation to push forward the falcon community ecosystem growth and then and marketing so that's all we're working together as the open source team for the ipfs and firecoin so uh the agenda today i'm going to focus on first give a little bit introduction about uh what is falcoin and what is ipfs and because i know that hackathon is coming for the next couple of days i'm going to talk a little bit about what's the current use case of the alpha ecosystem and some of the possibilities and then the future plans for falcon ipfs hopefully that will be some of the reference or inspiration for the hackers to know what you can build
on top of ipfs and filecoin and obviously you need to know how to develop on top of it like what tools you can use and thanks for polygon thanks for graph they already introduced some of the nft storage webster storage and ceramic i mean that's great i like to see that all the projects will start building things together that's good to see and obviously i'm going to talk about them a little bit later as well and eventually like we have a lot of events a lot of hackathons going around globally so if you're interested and you can know more after uh you know about toolings or even after this hackathon all right first let's look at the ipfs so what is ipfs it's a we call inter interplanetary file system
so it's basically a peer-to-peer network that you can share and pass all the files across the we said in the planetary but like why we say it's an interplanetary because originally we all believe that we want to build a network that uh it will work will upgrade the network that will work even when the web stretched across a global and that's what the team's vision and goes to build and in nature that ipfs is designed as distributed which means you don't need a central server and you don't need to download your files download your website from sensor server so obviously it's going to be more resilient and there's no foil for anymore so in order to understand how ipfs work
and why ipfs is decentralized so it's better to understand how to adding and getting your content over the ipfs network so the process is different because on ipfs network we're basically obtaining and getting a content by cid so which is a content-based retrieval and then it's more of a resilient against the what you can get is what exactly you want so the process is first you upload your content to the ipf's network and you obtain a unique id which will call a content id and then you will publish all this information content along with the content id over the network it will be
stored into peers uh dst table which we call distribute hash table and each peer and eventually when you're trying to download that data dht table is where you go to query how to get your content and where to get your content so obviously i've been talking about this peer id a lot and it's actually i mean the content id a lot it's an essential part of what we call content addressing and ipfs is uh is addressing your content by what it is instead of where it is so if we think about like how we upload the content how we retrieve the content currently in the web 2 world so you will see first let's look at the if you if you are looking for the content on your computer locally you
basically go to a certain path in your c drive is the drive to look for the content it's basically where you're storing that content and it's the same thing for the web too like think about if you go to the website if you acc downloading some content obviously you go into the ur url and that's where which server is throwing in content but uh you don't really know that you requested that the content is the same as what it was been stored before but always ipfs is different we basically accessing the content by what it is so you're passing the cid which is the unique identifier for the content and retrieving it you don't really care where it's stored because it's
distributed network it could be stored in one or multiple node so eventually you will get exactly what you asked for by the content id so and then the content id obviously is the very important uh for content addressing it's actually you can think of as a unique cryptographic fingerprint for your content so because we say it's a fingerprint it's it's unique and whenever you want to retrieve the content you can grab the original content and use the same cryptography hash function you will get exactly the cids you uploaded before which means it's verifiable if you have original content and if you retrieve it using that cid you know and
you can verify is this what i'm requesting for from the ipfs network and also in the peer-to-peer network the peer is the essential part of the network that for nodes to be able to discover each other to be able to share and then store the content across the the network so all this achieving by adding the the different module to the peer so for example that it's because it's a peer-to-peer network we have an essential part was p2p as part of the peer that handling the networking into the all the peers in the whole pdp network and also i mentioned earlier that how to discover content and how to download content is actually uh
achieved by the dht table which is also part of the future of peer and eventually you need to download the you need to download the content over the peer which is achieved by the bit swap protocol in the ipfs peer and then we're putting all this together in the ipf's ipfs ps so to achieve the distributed network and i want to take a little bit of time to talk about dht because it's very essential to store and to discover content over the ipfs network so dht stands for distribute hash table and then it's actually essentially just a key value pair that's stored in each node or each peer and you can
associate it as a photo book then you can go and look at how you can connect to certain people and then like what the the idea for that people the difference is in the distributed network everybody every nodes maintain that dht and that will be used whenever you want to download data so think about the i i said earlier it's a key value pair in the in the table and it's essentially just a peer id and a content id so if you want to looking for content over the ipfs network you need to do two things first is you look into the dht table and then find out
who has so you're looking for the content id and you'll find out who has this content id and then you are looking for the phd table and see how do i connect to this peer id so essentially you will know where you can find your data and how to connect to the peer to get your data so that's a very essential part of the content routing in the ipfs network and the way that we use ipf's network now is very easy and but it's also very different you can basically choose to use ipfs according to your own needs so first you can run your own nodes host all your content and then serve to your clients but you have to maintain the infrastructure you have to make sure that your ipfs node is keep running and
then serving the content to your clients and also if you want to increase the usability and increase efficiency of the ipfs network you can run a ipfs cluster of nodes but also maintaining the infrastructure will be a little bit challenging for the team so for some of the team that you don't want to maintain the infrastructure you don't want to making sure that all the nodes are running and connecting well you can use the painting service what is painting surface is you can ping your file to the painting service of the ipfs note so they will make sure they serve your content over the network but it also means that you need to rely on this painting service
or otherwise you can just just throw the the content into the ipfs note and then hoping that your content is super popular and everybody accessing it so it will be expressed into the network and it's easy to retrieve and these are the options that you can use ipfs and but because i mentioned earlier that you if you you need to use all this or that but it's not essentially very uh verifiable or reliable but maybe we were wondering is any other options like any alternative sets more reliable and then verifiable and that's that's falcon coming into the picture so far coin is the
the storage network that were designed for web 3 and then for web 2. so essentially we built file coin compatible with ipfs and so it will be utilized the advantage of content addressing over the ipfs network and we're also integrating falcon with a lot of the web3 uh blockchains like ethereum polygon and nir and we're also working with a lot of web three teams that you making file coin ipfs available if you're building your application with any other stack into the web 3 world and why is it different uh why is filecoin different as ipfs is adding another layer onto ipfs which is the
crypto crypto economy incentive for the storage providers uh in the falcon access to making sure that they're saving the content uh over the falcon network and then verifiable and reliable and we're also growing far coin massively because now we're almost reaching like uh 18 gigabit of capacity across the network which is huge and that means we're ready for the massive adoption on the uh either web 2 world or web 3 words so why how did how much difference for far coin and ipf has to store content because uh in order to provide the verified verifiability over the falcon network storing data on filecoin is a
little bit different as ipfs so basically uh it's the storage clients are making storage deals with uh miners or storage providers uh so the solidifier has to make sure that they constantly saving the data constantly providing the verification for the clients so they will be ensure that data is safe and secure all those is achieved first by storage provider needs to stake certain file token which is filled as collateral so they can be insured to providing the verifiable and reliable storage and then also storage providers need to provide the proof the cryptographic proof that they are storing the unique content a copy of
your data which we call proof of the replication and then also over time the storage product need to very to be able to provide that they have been storing the content constantly over the time and so they submit the proof of space time to change so all this proof of are going to be recorded and be able to verify it over the filecoin blockchain so i've spent a little time talking about what ipfs and final coin is so ipfs essentially is a protocol a protocol to share your files and your data across the distributed network and it could be work with any any distributed network any any like storage network obviously found coin is going to be the best
best match with using as ips and filecoin so you can take advantage of was the faster retrieval uh over the ipfs and you also be able to use the advantage of long-term persistent and verifiability storage on the farquard network so by saying that i will highly recommend all the hackers developers if you're building during this hackathon use ipfs and filecoin together then you'll be able to take the full advantage of the features the good the features from both protocols and i'm going to introduce some of the tools that you can use without actually touching the ips file coin but be able to store your data over the two network all right
so and next i'm uh gonna go through a little bit of the ecosystem use case hopefully that's gonna be some inspiration for the hackers to know what you can build over the filecoin ipfs network let's look at the picture first and then we have a growing fast ecosystem around ipfs and a lot of different projects are building on it for example the web hosting services and the nft and gaming virtual metaverse and uh also some of the content creation upgrade over the ipfs network also falcoin network is also growing very strong and we have a lot of data set on board on filecoin either through the web 3 applications or web 2 data set
so for example in web3 applications they are like nft platform and content live streaming and music platform are built on file coin and then for the web 2 and a lot of the enterprise company they are storing the large data set on file coin and i will give a little bit instruction later on the slides so overall that fall coin storage uh has been growing for web 3 and the web two words i will just go through on top of the use case for example that obviously nft and gaming metaverse are growing super strong over the falcon ipf's network and we have a lot of application building on top for example uh mona is building a
a marketplace for the 3d artwork and op games it's a gaming platform they're building the gaming community to bring all the game builders or game gamers together so to explore more opportunity and a more interesting game mantavers ai so they're using the ai technology to bring the vr and then to bring all the metaphors together to the users and also obviously nft marketplace and nft content creation as well as some of the nfd infrastructures or two lanes to make uh nft developers easier are all building on top of the ipfs of our coin and apart from nfts there are also a lot
of other contents uh creation platform they storing the data uh on filecoin ipfs uh hadoop01 is one of the uh live streaming conference that using ips filecoin and also a couple of the platform that's uh like live streaming music and the sharing music sharing platform are also building on ipfs and filecoin also fm is storing the videos and everything on iphones and falcoin there's all the like use case that you can use to take the falcon ipfs as decentralized storage also i mentioned earlier that not just web 3 but a lot of web 2 companies are storing the data
on the file coin network for the long term and safely verifiable storage and for example internet archive they are storing and backing up the data for the website public website and documentations uh on filecoin so to be able to provide to the uh public access and then zoro is also uh storing their climate data on far coin so it would provide it to the researchers to access and also uh the soil foundation is storing the testimony data over the file coin all this all data set and we also have more more use case that i didn't put it on top of before example that uh we are working with new york city public data
to store the data on back up the data on file coin as well so all this or example of web 2 of the user case or as well as we have 3 use case but apart from the use cases i want to also talk about some of the social goods initiatives that from file coin that i think is very very important because it's gonna essentially bring a huge impact into like web3 or maybe our society in general falcon plus uh is the program that uh incentive uh the incentive that restoring the valuable and on on far coin so here because falcon is incentive storage provider to verify to accept the
valuable data set for humanity on far coin so we gave them 10 times of the possibility to claim rewards uh to get the block reward from from from our coin storage provider and also it has the the console to constantly verify and ensure that your valuable data are storing on file coin plus and another very interesting and program that i'm very excited about is falcon green falcon green is uh the issue initiative that's uh trying to bring make a foul coin uh blockchain as carbon neutral maybe eventually carbon negative so uh falcon grain has this kind of uh uh foul
coin energy dashboard that will display all the electro electricity consumption from all the storage providers over the falcon network so we bring up the ball that make it transparent for all the storage providers or the miners in network about the electricity consumption and besides that falcon grain is also partnering with storage providers as well as the renewable energy company because we're trying to encourage the storage provider from far coin network to use more of the renewable energy uh instead of like electricity and everything so essentially falcon grain program is trying to make file coin as a
sustainable as possible and uh i also because we have a lot of hackers and developers here i also want to talk about uh what's coming next with allcoin and then essentially falcon is building the foundation uh for decentralized internet we are achieving that by we make making the four key components uh the first obviously is providing the verifiable storage and we have been doing that since the main at launch and then we'll reach into the 18 gigabyte of storage which is already massive and then then the second is a retrieval because we are the other team the team is trying to building and then providing the cdn quality retrieval market over the network and currently we have a
saturn network has already launched the test net and i think uh programmability over the file coin is the is the most looking forward features that over filecoin and i'll talk about next slides and eventually the computation of the file coin and the team is working on that as well so this is the the most important part that falcon team is keep building and working on so i would just focus on the fvm a little bit here because it's uh one of the most looking for the features on falcon network so essentially that fvm is going to bring the programmability to falcon network so either
with the evm compatible smart contract development or a native file coin smart contract system so eventually far coin storage providers falcon developers can build everything on top of the far coin with storage with smart contract with computations over the data all this is going to become possible of the file coin so the team behind it our core team uh is actually splitting the development process into different milestones and recently we released the first milestone which will give the falcon nodes the ability to run our native actor which is smart contract over the uh fvm and by the q3 of this year uh the fvm
will uh will bring the ability of uh writing the evm compatible smart contract and deploying to the falcon network and by the q4 or maybe early next year we will have the ability to support both evm compatible smart contract as well as native our coin smart contract so i think those fvm is most exciting things that are happening in the falcon ecosystem and all the partners all the ecosystems are looking for it so stay tuned and i think by q3 you'll be able to try smart contract on filecoin all right uh i hope all those use case and uh all the initiatives that we're doing will give you guys enough
information on how or what you can bring build on top of ipfs filecoin and if you need more inspirations you can also check our website the hackathon website uh hackathon.falcon.io to look at the there's a part we call a hollow frame it's all the winners from the past hackathon and you can get more inspirations on what they are building and what's the whole ecosystem of building on falcon and ipfs so we know what we can build i think it's time to look at how we can build on top of the ipfs filecoin now i'm going to talk about some of the toolings i think you probably already heard a lot of like nfd storage website storage and i'm going to cover it here
so basically there are many ways to use ipfs filecoin for example you can directly communicate with ipfs note uh and as well as follow coin notes but those will require you have a deeper knowledge about ipfs filecoin and how to commute how to communicate with them over the apis but there are also other options that you can use is a storage helper what we call storage service storage help and the storage service will give you the ability to use ipfs and far coin just over the single core to store your data on both network so ipfs then you can get the faster and flexible retrieval and using file coin
you will get long-term uh verifiable storage so i would highly recommend hackers or developers are building for this hackathon trying to get to know some of the storage helpers instead of going directly into filecoin ipfs nodes so let's look at a couple of them the first i will introduce is the fleet hosting fleet hosting is a decentralized way to host your website so you can fully make your application your website go decentralized so you can think of as a ci cd tool and then it's super easy and simple to use so if you if you deploy your website in the web to words use verso and other platform you will be able to use uh
flick hosting very easily but the difference is fleek hosts their website on ipfs so it's completely decentralized and then the process of using it is very similar as reversal basically you just connect to your your code and then adding some configurations and eventually if you have any push they will deploy to ipfs immediately and then web three storage i guess you guys already heard about web storage a couple of times and website storage is built on top of the both side pfs and filecoin and it's giving you the ability to use the decentralized service and always very fast and then a very good ui ux as polygon mentioned that ux
is very important so it's super easy to use and you basically just integrate either javascript library or go library into application and then you will be able to use the apis simple code like for example web3 storage dot store and then putting your files in there it will automatically store your file on ipfs and filecoin and if you are building an nft and nfd storage is the best option to go it's the free service that you can use currently thanks to the falcon plus program and it's also storing your content and your nfd asset over the filecoin and npf network what is it different as web 3 storage is it take care of all the dirty
works to upload your content on ipfs and also creating the metadata compatible with your c7 21 or your c1155 so you will be able to use single core to to upload your asset to ipfs and focal network and getting your metadata which you will store in the smart contract and and also nfd storage uh provide the fast speed of a gateway so then you retrieve your you will be able to use that gateway to retrieve your nft way faster than any other nfd gateways i mean and another ipfs gateways uh currently we have a lot of data a lot
of nfts stored over nft storage already over 16 million and then they'll be nf2 storage are being used by a lot of projects like open if you link to nft on openc all the data of the nft will save to ipfs and falcon automatically through the nfd storage and also like magic eden and a lot of the nfv platform like solar metaplax on solana is also using nft storage to store that the data so if you're building nft application you can look up on nfd storage and if you are developers that are looking for more flexibility more control over your nodes uh over over ipfs selection or falcon storage private
selection you can try powergate powergate is is more developer friendly and then it's essentially a darker image which bring the ipfs and falcon node together but instead of wrapping around the service it also gave developers the options to configure the network for example like which storage provider i want to use how many copy i want to store on pfs file coin and when do i when do i want to renew my storage deals on file coin all this can be configured through power gates but uh with nfd storage and and web storage storage you are losing those uh flexibility because they will take care of you but if you are more you want to
have your control of the storage deals and then storage over the ipfs power gain power gate is the option to go and apart from that we have other tools like uh s3 is also building on top of ipf's final coin but it's meant for more meaningful data because they will verify your usage and making sure that you store a meaningful meaningful data on ipfs filecoin so if you want to use a decentralized database you can go with the orbit db rpdb is a key pair key value pair database uh for a build on top of ipfs to provide the peer-to-peer decentralized database but if you're looking for more complex more
structured and a relational database you can try it with the table land table that will provide we provide the relation on the highly structured database on ipfs and falcoin and also it's going to be used evm compatible layer 1 layer 2 smart contract to record everything and also ceramic that polygon also just mentioned earlier that you can have id and then combination data if you want trying to use ceramic and i think those are the tools that i want to introduce and i highly recommend all the hackers and developers to use uh to um to build on top of the ipfs of all coins during like couple days of the hacker hackathon
and if you want to keep learning or keep building after the hackathon we have uh you can check our slack or discord and go to the website of ipfs.io and filecoin.io to look at that document and we also have we also have a protocol school which will dive a little bit deeper on different knowledge like how how leap p2p work and how content addressing how dht table work and also if you want to learn more about nft we also have nfd school giving you basic information knowledge about nft and how to mint nfc on different blockchain and if you want to keep building and you can look up at our website hack us on the filecoin.io we are sponsoring a lot
of the hackathon cross globally and now we are here with is so and at the same time we have like infinity hackathon happening in singapore and uh we just finished a great hackathon with hecatfs if you're interested in building with falcoin and ipfs definitely go check out the hackathon website and we have a lot of exciting events coming up all right thank you thank you very much i'm very glad to be here and hope you guys have a great building during hackathon thank you [Music]
[Music] [Music]
yep okay uh hi everyone my uh my name is nicholas kunkel uh i'm from makerdao and i'm the oracle's core unit facilitator uh so uh i wanna talk to you guys today about something i came up with called community consortiums and uh like everything else in the space right there there's something familiar but they're also different and i and i
think uh the way that they're different makes them fundamentally different to what they're based off of and i i think the the way that i want to do this is i kind of want to start with with three stories so i want to tell you about like three different kind of scenarios uh that come up in in crypto a lot there's certainly other ones and uh you know we could be up here all day and talk about dozens of different ones but uh these three are just kind of examples and so as i'm talking about these three stories i want you to kind of think about what are the underlying trust
assumptions that are happening in each of these stories so story number one imagine a blockchain that has validators and these validators decide you know which transactions are included in a block uh the validators you know decide and reach consensus on if a block is valid or invalid and the nodes on this network you know decide what is the canonical chain by looking at the chain which has the most blocks right so this is uh this is known as
like a nakamoto um kind of longest chain rule okay story number two uh you have a oracle right so the oracles are right uh the way that you get data off chain right on chain right uh so uh typically right you see this in d5 right where an oracle you know represents the uh the price of of some kind of asset right so uh if you're a d5 protocol and and you're generating loans right you need to know what is the value of the collateral so you can make sure that the the loan is sufficiently collateralized right
so so how does that oracle work right well typically there's some kind of um price kind of submitter right so someone who who submits the price right and typically it's not even like one person's submitting the price right it's a it's a group right and we say that uh this is some kind of like distributed consensus right oh we have 20 people we have 30 people right you know submitting this this price right and we take i don't know the the median or we take the average right or we do some kind of outlier analysis or we take a t-wap right but the point is um there's a group and it reaches some kind of consensus
around what a price is and then story number three uh think of a down so a dow that you know with your token right you can vote but the vote is a snapshot vote right these are very popular right because uh they they don't require right you know users to pay transaction fees and we think this is very very inclusive right because no one is uh you know uh you know blocked out from participating in governance right we've removed all the cost barriers to participating in governance
so the token holders right they vote on governance proposals via this snapshot vote and then typically you have a developer team right that has some kind of multi-sig and they then execute the transactions that were uh you know represent the proposals that were ratified by uh these snapshot governance votes right but it's important to note here right it's the multi-sig right that has control of of the smart contracts right and so today i want to convince you of of three different things the first is
i want to convince you that from all these three stories i just told you they're exactly the same they're not different in the slightest they work on the exact same mechanism um second thing i want to convince you is that this is absolutely terrible and we need to we we can't keep doing this i mean this is uh uh in in light of recent events which we'll talk about later right uh it's it's just showing flaws and cracks and and we can do so much better and then the third thing i want to convince you is that well actually it's not that bad
it's just being misused and that if you use it in a different way it actually becomes a really really powerful primitive that not only is not that bad but like you actually do want to use it because it's so useful so um first thing i want to convince you of everything is a multi-sig and as soon as you you know accept this great truth into your life you start to see them everywhere so every application you look at every mechanism design is around this multi-sig type of concept right
in the in the blockchain story right you have a bunch of validators and some subset of these validators right a subset of the signatories of of a multi-sig are reaching some kind of decision a reaching consensus right in the oracle story you have some subset of this you know signatory set that we call the price submitters and they decide that you know we this subset decides this is the price right in the last story right you have a multi-sig right that's actually has all the administrative authority over this crypto protocol right that's executing all of these state changes right it's
literally a multi-sig um and so this you see this mechanism everywhere right um and i mean this is just uh what like what what the hell are we doing right um this goes kind of against the entire ethos of of crypto and like what is the ethos of crypto like the ethos of crypto is that look we can make we have this incredibly useful decentralized neutral platform to build on top of and we have the ability to make trustless applications right you know
this idea that code is law right and users don't have to trust external parties right you just uh trust uh you know the code as written right and we believe that we can get this kind of mechanical deterministic behavior right and and you know and then what do we do we don't do that right uh like the whole reason for crypto in the first place right the whole reason that satoshi nakamoto even came up with right nakamoto consensus was exactly because of the 2008 financial crisis right and and what
happened well uh there was a our public institutions failed us our private institutions failed us there was a breach of trust and we ended up bailing out all of these institutions right it's fundamentally unfair and so then we look at crypto right and we tell ourselves right that no no right we are the reason we're building is because so we don't have to trust institutions like that right the reason we're building is so we can get rid of this trust component and then you look at events that happened recently right and you realize
we're exactly the thing that we we despise right we we saw recently right a bunch of the cd5 uh kind of platforms failing right um right the collapse of usc kind of triggered um a bunch of these cd5 lenders you know to go insolvent right so you look at something like celsius right celsius promises users right that hey you can deposit your tokens with us and we'll give you some yields and uh you know we're not doing anything risky we're being super safe right and we're giving you the yield what was celsius doing right they were
engaging in extremely risky investment activities unbeknownst to their unbeknownst to their users you look at and this is not unique to celsius right you look at voyager same exact thing you look at block fi same exact thing you look at nexo same exact thing they were all essentially participating in this fraud right and they all brand themselves as we are crypto native institutions but no they're the exact parallel of these fraudulent traditional finance institutions right that we that that we say you know that we are we're different but we're really not
and and what happened right well celsius went bankrupt um but you look at uh you look at some of the other ones you're like oh well you know they're still around well what happened uh well ftx bailed them out right ftx extended them hundreds of millions of dollars in credit so they would have the liquidity to withstand a bank run right without that bailout without this you know repeat of exactly what happened in 2008 all of those institutions would have gone under they would have needed to in the bankruptcy proceedings they would have needed to liquidate all of those holdings to pay back their credit creditors
and uh you know if you want to imagine what that means to have billions of dollars of crypto just kind of dumped on the market like it means a bloodbath right it's like financial armageddon so you know satoshi nakamoto is probably rolling around in his grave like watching watching this unfold right um i've probably you know made things sound pretty bad right like i'm here like a doomsayer like preaching in front of you that that things are terrible and we suck and we should all be very ashamed of ourselves um but i want to introduce you to this concept of community consortiums
and when i explain it to you like you're going to be like this is so simple it's really stupid like this is not novel at all but it's still really powerful so imagine this multi-sig right um and so when it's a small multi-sig or when when the the number of signatories when the number of validators when the number of price submitters right is small you have the centralization of power right you have from a mechanism point of view right you've inserted this trust element but i want to make the case that there is an inflection point
that once this signatory set once this validator set once this price submitter set becomes sufficiently large that instead of being a trust adding mechanism it's actually trust reducing mechanism and so the reason why i call it a community consortium is because essentially you want to onboard everyone in the community every possible stakeholder in order to reach consensus and have this consensus essentially be a public good and what you do at this point
is any kind of application that is dependent on this community consensus you're essentially betting on the industry not to decide to murder itself which i i think you'll find is a bit of a is a bit of a ludicrous right uh assumption so um i i want to kind of briefly go into like how we're using community consortium's app maker today and then how we kind of want to develop them in the future and then how all of you can be a part of this right and help kind of secure
our applications and secure our ecosystem and secure our communities and secure our tokens so um makers oracles today work based on a community consortium so i don't know if you've ever like thought of this like so if you're using dye or using maker right uh what are you trusting right now you are trusting a community consortium and i'll kind of go uh in a little bit i kind of go into like who exactly is in that consortium who are you trusting but you are trusting a consortium for all of the oracle prices in maker um later this month we're going to be releasing what we call maker teleport
maker teleport is essentially a bridge a bridge from any chain to any chain and so [Music] essentially what do you need here well if a user wants to say transfer their die from ethereum to optimism right you need to have some kind of consensus that something happened on one chain right so you can affect some kind of action on another chain right so if a user excuse me if a user burns their die on ethereum right there needs to be some validator consensus that then tells you know maker
on optimism hey give this user you know some new fresh limited die right uh if someone on starknet right wants to transfer dye to arbitrarium right you need consensus that some events happened on starknet right that a user burned their tokens right in order to then trigger the minting of the die on the other chain and kind of what's really cool about this mechanism is it actually and kind of what makes this bridge unique versus other bridges is one it uses the same community consortium consensus as the oracles that maker uses so there's no extra trust assumptions that you're
making right there's no compounding trust assumptions it's just the same exact trust assumption that already exists today but more importantly um this lets you kind of avoid this one week kind of exit delay that you have when it comes to roll-ups right so if you're like you know uh if you have some ether you know some tokens on optimism or on arbitrarium or on starknet right when you try to exit you know that chain right uh there is a dispute period right that has to happen right and uh typically i think this is one week right but that that parameter is is kind of dynamic right in that one week if there was any kind of fraud
right someone is supposed to be able to submit a fraud proof on layer one right asserting that you know this transaction is fraudulent and that's why you have to wait this one week period but what you can really do is essentially because maker has the ability to mince die what maker can do is essentially underwrite that risk if it knows the transaction is not fraudulent so you can if a user wants to withdraw you know say some die off of optimism okay normally they have to wait a week but instead what they can do is
the community consortium can look at that transaction that happened on optimism it can run the transaction on its own and verify you know each individual in the community consortium can verify hey yeah that transaction is legit and then once you have enough of consensus reach right though this is a legitimate transaction right maker can just go ahead and mint you the die on on the other chain that that you want to exit to and essentially what you're doing then is after the uh one week delay um maker gets the actual die right that you exited right from that uh from that one week challenge period right and then we
destroy it right so the accounting nets out to zero so it's like a really interesting way i think to avoid some of the ux challenges of roll-up chains while not actually giving any additional risk or any additional types of fees to the user right it's just maker underwriting uh this this risk right that that transaction is fraudulent right and like i said before right there's no additional trust assumptions uh that maker is making right so if the community consortium is corrupt right uh maker was already screwed to to begin with so um so what what is this community consortium that i've been talking about
right i've been talking about in abstract terms right as this nebulous kind of group but who is it today so it's all of the ones that you see up there this community consortium is not new we have had this uh effectively since the launch of multi-collateral dye which was about what two two and a half years ago at this point right so big thank you to all of like the og partners right that are part of this consortium but this is not good enough right i i talked about at the beginning right this theoretical inflection point
of like oh you have a small validator set right this sucks this is just a multi-sig versus you have an extremely large validator set right now it's a community consortium this is not yet a community consortium this is not representative of enough of the stakeholders in this industry like to build an actual community consortium which i don't think a single one exists yet today you really need to get everyone right you need to get everyone's reputation it's almost like staking your reputation right as a protocol right to participate in a community consortium and then to
um you know potentially right commit some kind of malicious action right that reflects on you as a protocol right but even more so right the challenge of getting a malicious getting consensus around a malicious action um it becomes a coordination problem right it's how many people in this validator set can you convince to be malicious with you and i would argue that if you can get every single reputable protocol every single reputable stakeholder in the ecosystem to be a part of the community
like the community consortium you will never be able to get the community to turn on itself right and it ends up becoming this flywheel right the more places that the that uses the community consortium for their consensus needs right and the more of even the users of the community consortium are part of the validator set in the community consortium right you just have this compounding compounding compounding flywheel effect and that's that's what i'm kind of here today for is i want to convince all of you to join this community consortium
i want you to help not just secure maker but i want you to help secure the entire ecosystem so we can get away from these flimsy architectures that are based on multi-sigs and get towards this and i know this sounds a bit utopian but bear with me right a [Music] almost like a community owned public utilities right that are powered by community consensus so um if
what i said today interests you and you want to join the maker dial consortium uh i would love to talk to you come find me here or you can reach me on any of these socials on twitter telegram shoot me an email also if you're interested in working with maker we're always hiring talented individuals it doesn't matter what you do we just want the best people so if that's of interest please come find me come come hit me up let's talk awesome thank you very much [Applause] [Music]
i think i got it okay you can hear yeah all the way in the back okay cool hello my name is graham i'm the cto of mirror you might know me on twitter strange chances i'm curious to know who here knows mirror.xyz maybe you've seen a link or something okay cool a fair amount um it's really important to know because i don't know whether to do like a super intro um or to go into something more technical um so what is meri.xyz it's a web3 publishing platform it's become one of the main places where people make announcements in web3 so we have
examples like optimism presenting next uh they described their their token on mira they did the announcements for that we have a lot of um pretty famous well-known writers in the space like paulinho he talks a lot about um l2s and ethereum in general and and blockchain technology chase chapman we used to have investors like chris dixon and some other pretty well-known people uh blogging on mirror so what makes it web3 i said it's a web 3 publishing platform and there are a few things so for one writers log in with their ethereum accounts and we view the ethereum account as the primary identity of the internet of the new web
that means we don't use login with email and password so if you use something like medium or sub stack or naver here for example you're going to log in with an email and password and we just think that the ethereum account is the new identity of the internet and you're going to log in with that in instead and i think that that is something that's very surprising to a lot of people um who are new to the space um who view the crypto wallet just as something that holds cryptocurrencies and maybe nfts but we're actually seeing all these non-financial use cases where people are logging in with their ethereum accounts and they're using it for things like messaging signing content uh verification of identity and that's
actually going to be very important the same private key that you used for doing financial transactions you can actually use to verify content and social messages and that's really important so we're going to play this video here and this is going to be in lieu of giving a demo it's just going to be a video of um signing in tamara and i'm going to show you some of the basic features so if we could play the video yeah okay cool this is the this is the um mirror xyz homepage i should say it was as of this morning we updated it so rugged but um it basically looks like this um we have some projects that have written things on mira
and if you go through you'll see you know ens for example announcing their token and a bunch of thought you know thought leadership pieces on mira as well and if we click into this you can see you know it looks like a blogging platform and uh it's you know what you kind of typically would expect from something like a medium it you know has a nice title etc but then there are some other things as well that you'll be able to see that are really interesting so for example you can embed blocks like web 3 blocks for example nfts you can just embed in we've had people embed things like crowd funds etc if you click on the
byline the user identity of the post you'll see it's an ethereum address and it links to ether scan and so you can start to see the interoperability between other platforms um and so that's sort of like the social network of ethereum itself is based on the address as the primary identity and that's something that is you know just just front and center of the authorship experience on mira here you can see uh brantley.eth this person wrote this post with their ens address linked and they wrote about ens and they were a prominent figure in the ens community and that form of identity and authorship is a lot more trustworthy
than you know something like an email and password login if ens were to do this post on medium how would you really know that it's ens because you can't tie it to an address and you can't verify signatures and so you want something like this where the content is very valuable to look a little bit more like financial transactions than just a blog post that's hosted anywhere okay so here i'm showing you you're signing in you can sign in with wallet connect metamask coinbase wallet and it's pretty easy what you'd expect here um it's you're signing a message that is generating a token for you to basically use to authenticate on the website
and from here you'll be able to this is this is my account um so these are some of the posts i've written and you'll be able to like edit these or create new entries or update your settings and every time you do any of these actions you'll be signing the action with your private key and so any change that you make on meria is tied to a verifiable signature that anyone can go and verify yes this person did mean to post this from this account they wanted to change their settings uh and so on and so we'll be able to decentralize all of that content because it's always verifiable you don't have to trust our website you don't have to trust our database
so as i said the ethereum address can sign messages and then all the content is signed with the address and is verifiable through the signature and then gets stored forever on a decentralized file storage system so we are using our weave at the moment and we put a link to the bottom of every post to an externally hosted copy of all the content including the signatures from the author so why is this so important it means that the posts will always be available even if mirror goes away the authorship can always be proven from the account signatures and so once something is published on
mirror we don't have ownership over the content and the writer can always rebuild their publication from that externally hosted content and the signatures and would be able to validate that that indeed was what they meant to say and what they were posting at the time this is just simply not true of web 2 platforms so if twitter bans an account or if it goes out of business then the authors lose all of their data and that's something that's happened quite a lot it often happens in political contexts for example the president of the united states the previous president was banned from twitter and then lost all of their data and there was no way to rebuild his account um and and that happens quite frequently with
you know lesser-known examples as well and i think i think you should also consider cases where people will post from a twitter account but it's not really the person you think it is and one example i have is the ceo of twitter jeff dorsey once had his twitter account hacked and people posted things from his profile that he didn't actually say it was somebody else who had hacked into his account and so that sort of thing wouldn't happen if it was private key based you might still have hacking but the security guarantees are are probably better so in total we don't believe that the platform should have ownership over the user's creative work and here's another video we're going to play
of the optimism post and i just want you to think a little bit about you know what i've been talking about in light of this post which is so important it was optimism which is one of the most important projects in the space announcing their governance model and their token introducing the optimism collective and when you think of all these things like being able to rebuild the publication being able to have that content decentralized and stored forever and have all of the provenance of the signatures available that becomes so important when you think about these historical documents that are starting to be generated in the web3 space so we want to use these new technologies to do important things and i think that this is one of these
cases so this is optimism you guys okay so as i said at the bottom of every entry there's a link to a our wave transaction and we call this the nutrition label of the post so it's going to basically show you um where that file is stored on reef and so here we have a link to the content and anybody can go and view this this is not a mirror website this is external and all of the content here is hosted externally so this is a big json file that has all of the content in markdown and also includes
all of the authorship information that you would need to verify the authenticity of the post so it has you know signing key signature the type of the type of signature that was used and so on as well as some information about on-chain data which i'll touch on in a minute okay uh this is the mirror development blog so this is where we just give updates about you know things that we're working on um here introducing subscriptions etc and i wanted to show you that we wrote a post about how to retrieve the posts directly from our weave so you can just very easily use the rweve graphql endpoint to go and pull this
data which means that it's permissionless for people to go and build on top of this publishing platform this protocol they can just use a javascript sdk the code is very simple they can go and pull all of their data and so if at any point a person wants to outgrow like grow out of the mirror network and wants to go and build their own front end they can do that very easily just with this sdk okay so we also focus on making an excellent user experience and we think that this just makes it easier for anyone to start publishing in web3 even if they don't understand
complicated topics like d5 not everybody wants to be a trader or do speculative things in the space so if we really want to have mainstream adoption we can not only have things like nfts and cryptocurrencies on mira all you need to do is have a wallet to log in with and you can start publishing so i think that this makes mera an excellent place for people to start having a voice in web3 if you want to do things like governance and political things you need to start having citizenship and i think that that starts with people having a voice in web3 and mirror is a good place to start because it's free to use all you need is a wallet to log in and there's always going to be a clear way to exit for mira if you prefer
something else right okay so i'm going to get into some other features we're going to play another video next time live demo this time video okay so i'm just going to show you for a second here about you know just making it a good user experience we focus a lot on making it pretty similar to a web 2 experience so what what does that mean it just means that the things that people are used to doing for a publishing platform they should be able to do on mirror it should be very easy to create an entry it should look nice and user friendly you should be able to you know drag and
drop images to create the cover image um it should have good seo and all of those things you know we focus on and we take very seriously so we're not merely a you know a protocol company that's highly focused on just the abstract technicals we think about the product a lot and we invest a lot in design so all these things that you would expect from an editor are there but then we also have these extra things so you saw you know blocks you can embed things like edition sales so you can actually sell nfts like from a blog post you can create a story and then at the end you would embed a crowdfund or something like that so it blurs this line of funding and publishing
here is an nft embed so you can do things like that too if you have a an nft on sora or foundation you can just embed it into your post ready user friendly and then people can interact with it and see some of the metadata about the nft here i'm saving it as a draft you know all functioning correctly okay then i'll go back to my dashboard and the first one was saved as a draft i'll just clean it up and remove it nice and tidy
okay cool does anybody have any questions at this point okay okay uh as i alluded to there's a lot more that you can do with the web3 publishing platform than just published content so every post on mirror is collectible as an nft we call these collectable entries so for example one author chase chapman minted a post of hers as a collectible nft and she set a
limit of 333 editions that could be collected and she had a bunch of fans in the community and she probably didn't even realize this but a lot of them wanted to collect her purse as an nft and she raised 5 200 from the entry she had this amazing quote in the piece she said to co-own something is to have a connection with someone and so while individual ownership is great collective ownership is the social primitive of web 3. and as i said you know 333 people co-own this piece of hearse and that sort of forms a community of collectors who are gathering around ideas and writers
and they are funding work and building up a library of entries that are meaningful to them and so this is really important because while giving funding to the writers that people love they're also building identity in web 3 by collecting things that are meaningful to them ideas that are meaningful to them and then in the future you'll always be able to go and see you know what people have been interested in over time and that you know breeds a lot of trust and reputation and credibility for people in the space which is always going to be important for things like governance and other things that we want to achieve in web 3.
here is the founder of pull together he's just saying that the new collection feature on mira is his favorite crypto thing because he he loves ideas he loves reading and now he's able to give authors you know a couple of dollars that he would usually pay for a book he can collect an entry on mirror and use it as like a bookmark and he's supporting the work and it's it's just something that's pretty cool to be able to do it's sort of like tipping in the space um here's some people on twitter just like talking about their collections so they're just saying you know you know what's your library like you know if i go over to your house and you have a bookshelf of books i can understand more about you through what
you like to read what authors you like to read and you know we don't have that on the internet there's no way to really look at somebody's like bookshelf maybe something like goodreads but nfts could be a really interesting way to do that and of course nfts exist out of a particular platform and so they'll be able you'll be able to see them on your wallet like rainbow wallet or coinbase wallet or wherever you're using by getting funded through nfts the writers can also keep their work public and open so this is really important because online publications at the moment they often have a subscription model where you have to pay to subscribe and then only if you're a subscriber can you actually access the content so that
happens in academia but it also happens in you know uh products like sub stack oftentimes you really want to read a piece in the new york times and then you can't get to the third paragraph because there's a big box that says you need to pay and subscribe in order to see the content and that's the state of the internet right now but with nfts the work actually becomes more valuable to collectors the more that people read this um so you know this is sort of the the mona lisa hypothesis where a work that everybody knows is more valuable than maybe an artistically better work that not many people know so the more the meme spreads the more um the more value it often has
and so collectors actually want people to read the content and so they pay for it and then make it open and accessible and so we can have an internet where the information is free but the creators still get funded and paid okay so in this video i just go and show how you mint nfts as as a blog post and a surprising fact here is that it's still free to mint so authors don't have to pay to make their entries collectible um all entries are just collectible by default so we do that by basically having the creator sign all of the the data but they don't have to post it on
chain until it gets collected here i'm specifying some funding so if i want to enable funding and make the collection paid then i can do so and i can set a price so here i'm setting one dollar with the maximum supply of 2000 it means that 2000 people will be able to collect the post for a dollar each and i will make you know 2 000 or something on that blog post if people collect it and it sells out i'm going to show some examples so this is um chase chapman's blog which i was speaking about a little bit earlier and i'm going to scroll down to the post where she sold 333 nfts of the post
and so you know just like a lot of other platforms where you would see the likes you know how many likes the post has how many claps um you know a like doesn't get you lunch it doesn't get you paid as a writer but collecting nfts really can and so here i've clicked on the list of collectors and you can actually see these are real identities in ethereum you can go and see this is david phelps he collected this piece i want to go and see what other pieces are in his library i'm so curious about like what he's reading and i can go and take a look at his wallet and you know in future i'll see that the art that he's collecting and the uh the entries that he's reading and collecting it and then that sort of just creates a much better
community experience for creators and collectors and um and you know we can form identities and networks and communities around ideas and artwork and things that are just more cultural unchain so here's a list of polynya's you know his library which is so cool because he's a thought leader in the space so i want to see what thoughts are influencing him and is causing him to think about the things that he's writing about and in this post you know chase is really talking about exactly this um exactly this sort of concept of ownership being contextual relational and social and its ownership
is actually connecting people into these communities and groups an evolution in human connection so as we create digital communities online nfts and on-chain records are going to be part of the ways that we do that and they don't always have to be speculative um although they can be but oftentimes they can just be free it's just a token in your wallet to show that you care about something this post was fully collected she raised 3.3 eth which is uh yeah 5400 it sold out and people can actually go and collect this now on a secondary market because it's an nft it doesn't exist just in mirror it exists everywhere on ethereum and so
you can see people are actually reselling the nft of the post for a higher price so there is some speculative aspect to this too which can juice the funding so you know if an author is very well known maybe they choose to make the nft mintable for free but then it goes for a much higher price later on the secondary market and that can be something that's very interesting to their their readers their readers might um really appreciate that and so it sort of incentivizes um people to um you know pay attention and read and um take take authors seriously which is something that can bring you know efficiency to to the the writing market if you will
does anybody have any questions on this yep yeah okay so i'll repeat the question on the mic um so the question is yeah who pays for this if the if the writer doesn't pay and um the answer is that the collector pays so in a lot of situations it's the collector that's incentivized to pay the gas fee because they want to own something and a lot of the times the writer you know we just want to make it as easy
as possible for them to get onto the platform and put content out so we make it free for them to publish we store this the signature that can mint the nft and then we allow it's almost like an off-chain order book like we allow the collector to go and execute that against a contract and then mint it and we'll decentralize all of the signatures so that you don't have to rely on mirror but it's a it's a process to get there i think a lot of writers will be the first person to mint or will want to mint their post immediately and we want to move to that world as soon as we can but it's still a little bit expensive the other thing i should say is that all of these nfts are minted on optimism on an l2 so
we were one of the first you know larger projects to migrate onto an l2 we picked optimism because it was ready and the community was um was quite favorable towards optimism and so we moved on to that platform and it's working really well and it costs about a dollar to collect an nft on optimism so all of these posts are collectible for pretty cheap and that's how it works okay so i feel like this is okay so the last thing i want to talk about is subscriptions on mira web3 subscriptions so um you know traditionally on like a substack you're going to subscribe with your email and password it works really well it's like a notification mechanism
the the writer gets to see all of their subscribers and see all their emails and in some of the platforms they can download all of their emails and you know send other marketing messages to them it's really important on mera we decided to have email notifications but the real subscription happens through the wallet through the the web3 wallet you actually use an ethereum account to subscribe so that makes the community of subscribers web three enabled what does that mean well it allows the writers and projects to engage with their communities in new ways when you're commit when you're communicating with someone not just through an email address but through a wallet
there's so much more power that you have for example you know if you want to airdrop nfts to your community you can do that and those nfts maybe give them special access to content or to events you could have an event like this where maybe i'm speaking and then i could airdrop you know nfts that give access free access to the talk to all of my subscribers and so that's going to give an incentive for people to go and subscribe to writers that doesn't exist and all of these you know subscribers that people will have they have other things in the web3 ecosystem that they're doing they're collecting other posts they're collecting other nfts and the writers
can go and explore that and understand their understand their audience better they can do all kinds of new data analysis on you know the the subscribers that they have that they would never be able to do with email addresses so um you know the wallet is just going to be a much much more powerful way for subscribers um to get access to content and interact with their creators and then also for the creators they're going to want to build up a base of subscribers that are wallets a community of wallets rather than email addresses and then you know of course up-and-coming product products so i'm sure you guys have heard of you know peer-to-peer messaging products lit protocol was one that was mentioned
earlier they're going to be so many products that rise up that do social communication for wallets and again having that base of wallet subscribers is going to be more powerful because you'll be able to use those tools with your subscribers and you won't be able to do that with email addresses so drop your drop your email drop your ens anyway okay so uh one uh yeah so um one last one last video um that's just like a demo of the the uh subscriber interface and and then i'll be done this is this is erica's blog post and so i hadn't subscribed yet uh to her
um before so i'm gonna use this as a demo um so i'm putting my email address in and so yeah so i will get email notifications as a subscriber i think that's important and then i'm signing that with my wallet and so this is saying my address is subscribing to erica's address and and then i will get email notifications and erica will receive my wallet address as a subscriber in her dashboard and then you know i can do that with other posts as well and it's easier the second time because you've already signed for your email the first uh yeah and then i'll go back to the my dashboard and i'll just quickly show you
what it looks like as a creator at the moment we'll we'll add more things in the future to this to make this more powerful but at the moment it's very simple and it just you know you'll have your list of subscribers here and you can go and they're you know real ethereum addresses so you can go and look at their profiles see what they're writing see what they're collecting go to their ether scan check their balance etc so this is one of my subscribers and i'm looking at his you know list of entries and collections okay so that is the end of my talk and i would encourage you to please check out mira um write a hello world post and um see how easy it is to
get a voice in web 3 um and then you know see if you can get some collectors once people collect it goes on to other you know it goes onto the graph protocol that you saw earlier all those things get indexed it's all on ethereum and uh it's all interoperable with other protocols um as well so really fun stuff okay does anybody have any questions yep [Applause] [Music] do
[Music] do [Music] better like this yeah all right hello everybody i'm north swap i do research and development at optimism and what i want to talk to you about today is how we secure the optimism blockchain so optimism is a layer 2 rollup
so first of all if you're not familiar with wrap i'm going to give you the real short version of how an optimistic roll-up works so the issue with ethereum is that it doesn't scale it doesn't scale for a very good reason is that they want to stay decentralized and so sort of the line in the sand that was drawn is that everybody should be able to validate their own blockchain at home using only a laptop and you know maybe some extra equipment but it should stay relatively affordable and free and that's pretty good but we still have a problem that people want to transact there's not enough transaction space available
so roll ups our way to fix this and the way it works is that you have your uh l1 blockchain so that those are the little computers you see there and if you are a l1 user you're rich so you have a top hat and a moustache and you can translate directory on ethereum if not your l2 user can can transact with one or multiple entities known as the sequencer and sequencers are big entities and there will be much less of them than l1 nodes so what the sequencer do is that they process the l2 transactions just like they were normal transactions then they send the data of the transaction to l1
only a transaction these transactions are not executed on that one they're only executed on r2 they also send to the l1 blockchain the result of executing a transaction so that's a a stage route that commits to the whole state of the layer 2 blockchain then you have these other actors called verifiers and what the verifiers do is that they download the l2 transactions that have been posted to ethereum they re-execute them and then they check if the results that they get is the same as the result that the sequencer got if they get the same result it means
everything is fine and the sequencer did a good job if the result is different it means that there was a bug in the sequencer or sequencer attempted to do some malicious action to steal funds or something like that so if they detect such a case where they disagree with the result of the sequencer what it can do is something called a fold proof so this is a process in which on ethereum they are going to challenge the results and this presentation is really about explaining how this fault proof process works you know how how can we be secure right so there is one compared to ethereum it's almost as secure there's only one security assumption
that is added and the security assumption is that there's at least one verifier that exists that is honest you only need the one and then you're fine okay so the next step is explaining these fault proofs so as i recap optimistic roll-ups are secure if the term is secure and we rely on this single verifier default proof is played through something called a challenge game and it's played between two actors a verifier and sequencer we also sometimes call them a challenger and defender but for simplicity you can think of the very fire that detected the problem
and the sequencer that posted the result in the first place that is being challenged so the guarantee is that as long as ethereum itself is secure then this process will work and then the challenger will always be able to challenge the sequencer successfully as assuming he is indeed right and the sequencer misbehaved and so if you given this property it means that using the main bridge of optimism you will never be able to transfer stolen funds back to ethereum so this is the same thing but in a
graphical way for for those of you that are more graphical so you have l1 ethereum the verifier reads the batches so these are groups of transactions of l2 transactions e he executes them and creates these output roots he also downloads the output root from l1 then he compares those if they're the same everything's peachy but if they're different then it does this challenge game this fault proof on r1 so now we run into a problem so we have determined that the transaction leads to different
results for a sequencer and challenger how do we decide who's right and who's wrong you know if you were to take a naive approach what you want to do is re-execute all the transaction ethereum the problem with that is that it's extremely expensive so the very simplest approach you can take is to rerun the block on ethereum so in an evm interpreter that is itself running on the evm there are huge overheads in doing so and it's not possible because you're executing a whole block worth of gas within a transaction that is itself limited in gas and because you have overheads a multiplier
in the time of execution it's just not possible so another solution would be to say well blocks on layer two they are actually um evm right like turns out we on the optimism we use the evm and so the the code that we're executing is the same that is being run on r1 so what if we could just execute that code directly that's a good idea but there is a problem the problem is that there's a lot of up codes and operations that depend on the context of the blockchain and so a very simple example that is the blocked number up code so when you run block number on r2 you will get
the l2 block number but on r1 you will get the l1 block number and so there is a way to fix that and is that you need to patch the up code to remove this and put a call to a contract that holds all the context and you run into similar issue if you're trying to read the blockchain memory for instance this is still way too expensive but what if we did this but instead of challenging a whole block we would just challenge a single transaction um so this works and this is what optimism tried to do the first time we tried to do fault proofs we try to do exactly this there are very there are a lot of nasty
issues with this it's so expensive and to give you just an example of one nasty issue that happens with this so ethereum has a limit on the size of contracts so the number of up codes that you can put a contract is bounded and the problem is that we need to patch the upcode so we take the l2 contract and we replace some of codes by some calls to special context contracts on r1 and these dispatchers they are bigger than the original thing that we replace so the contract size grows when you deploy it on r1 and that means that effectively your r2 contracts are much more limited in size than the l1 contract so this is
a very very bad user experience because you try your contract on one it works but on l2 it doesn't work because it becomes too big so this was very nasty so what is the solution it's through something called a challenge game so now we're stopping with the idea of executing the whole block or the whole transaction what we want to do is figure out exactly where we disagree in a small part of the computation and then we want to execute only that small part on ethereum and so what we will call this as a single step of this agreement so the goal is to find the symbol step of this agreement
and what is a step there's different way you could do it but the two most common way are one evm instructions or one assembler instruction in the program that validates a block and executes the transactions i'm going to explain both of these things so our fault proof and uh challenge game system is called canon it was originally designed by georgettes with was a very famous hacker he was the first one to unlock the iphone and he also hacked one of the playstations and now it's under development by optimism so including me it's not the first system of this kind
so uh carly z does something different arbitrarium also thing truebit so this is an idea that has been around it's the idea of verified computation so you do have chain computation and then you verify it on chain however it is the first system of this kind that supports evm equivalents so anything that works on ethereum also works on optimism you can reuse all the tools hard hat foundry whatever you use to do your development it will work on optimism out of the box so to figure out where we disagree the challenge game performs something
that is called uh orders for just for the full proof you do something called a challenge game and what that change game is really it's a bisection on the execution trace so what is the execution trace when you run a program you run a bunch of instructions one after the other and the execution trace is just the list of all the instructions that you're going to execute so um but what's being executed so there's two ways to do it you can think of evm execution then your trace is a bunch of uvm up codes but validating a block is more than just executing transactions and so if we go this way where all
traces eem up codes we need to do the rest of the block validations in specialized evm contracts that we have to write the other way to do it is to say well the program that we execute is not the vm execution of the transactions it is the validator software so go ethereum or arrogant all those they validate blocks so what if we could take those software and run them and that's our execution trace and that is what we'll be able to challenge and so that's that's the approach that we're taking and we have this um piece of software called mini geth so it's a subset of geth augerium that is patched
um to support our system and compile to maps and the difference between um go ethereum and mini gaf is very very small so we just removed a bunch of codes that's very easy and then we made like very small a very small amount of changes so that it supports the system and that's important because it means that whenever go ethereum is updated we can always update mini gf very easily so how to figure out the step of this agreement over this execution trace the the general principle and i'll give a graphical illustration of this after is that you want to hash the memory of
your program at different points of the exchange trace and uh you're going to start at the midpoint so at fifty percent of the execution after half the up codes you take your whole memory you create a hash of it so for those of you that are familiar there's actually a merkle root and you send that to the l1 challenge contract the verifier does this the sequencer does this and they compare the results if the results are the same we go to 75 percent of the excuse executions race so that's like half of the remaining span and if it's different
it means that we disagree before and so we go to 25 percent right so if you agree at 50 it means the disagreement is after if you agree if you disagree at 50 it means the disagreement is before and we can keep doing this cutting the space of possible disagreement in half each time until we find a single instruction where we agree on the memory before but we disagree in memory after so executing this single step against the memory will tell us who is right and who is wrong so once we find this step we need to execute it on the blockchain and
so we compile mini gif to the mips instruction set and we use maps because it's a very simple instruction set so we have a on-chain mips interpreter that there's less than 400 lines of solidity and we use that to execute the instruction but this instruction will need to access the mini geth memory right and the mini gif memory is not on layer one it also needs to access the transaction batches and those are those are on layer one but they need to be accessed so accessing memory is relatively easy because we already have a hash of the memory we have a miracle root of the memory
and this micro route lets us prove any possible piece of memory against it right so america root is a a tree structure made of many hashes and the property of it is that you can say well this byte is this value and you can submit a proof of that that you can verify on chain and a single maps instructions is not going to touch a lot of memory memory spots maybe you know two or three at most and so you only need to provide three of these proofs which are relatively small to be able to execute the instruction so
to access the batches and i should have said these transaction batches they are posted to ethereum but they are not stored in the evm memory because that would be too expensive instead they are posted as call data so they live with the transaction within the transactions and to access them with something called premature raccoon and this is what i will explain next this was already like a lot of content so when i pause to see if there's like any questions or you know there's no stupid questions so don't be afraid i know i look very intimidating but i'm very nice i swear everybody all right
if you're really too shy you can come find me afterwards and ask you questions so all right this is a illustration of the challenge game graphically so these boxes on the top and the bottom these are the extru the execution trays of the challenger and the defender so every single box is one assembly instruction so you start at the middle you are gonna take a hash of your memory you submit it to ethereum and you compare in this scenario we're going to say it's the same so the disagreement is after the midpoint so you go 75 percent
again you take a hash of the memory you compare it and the scenario is different again you cut it in half 62.5 you keep doing this until you find a single instruction that you disagree on all right so the the next thing we need to talk about is the pre-measure recall and this is the way the previous work is a way in which you can access any data on the interim blockchain ever and you can prove that this data existed there so how does it work so the interface of the premier account is simply a function that given a hash return a pre-image of the hash
so the primitive dash is the thing that needed to be hashed to produce the hash and so assuming that you implement this in a contract because yeah so it's very important to say that if you're using a cryptographic hash it's normally impossible to do this you cannot take a hash and find the pre-image because there are many possible pre-images and also it's compute computationally infeasible but if you give the pre-image in advance to the say to a contract then you can query these pre-images that you've stored say hey here's the hash give me the pre-image why is this useful for us it's useful because in ethereum you get
a lot of hashes that commit to important information so you have an upcode that gives you block hashes and a block hash is a hash of block header which contains useful information each block header contains the hash of the previous block header so that's also something that you can use and so using those you can already see that if we have the premature oracle we can walk the whole blockchain backwards by starting with the hash we get the header then we can walk we have the hash of the previous header so we can walk there then we have the dash of the previous header so you can just traverse the whole chain using only the simple interface so i already see that it's quite powerful
and the other thing you can do is you can prove any state in any block so any state that the intern blockchain had over all the blocks or any transaction that was ever included and that's because every block header has a miracle route for all the transactions in that block and numerical route for the whole state of the blockchain in that block so you go to the block you want and then you find the marker route for the state at that time or for transactions at that time and you can go down there and prove via the premature arcol
any state and and this works because a miracle try is a tree of hashes and there will be the next slide will will show this graphically so it will be a bit more understandable uh okay access and yeah on that that's that's what i just said okay so this is the graphical slide so these two trees at the bottom these are marker tries and the way american tri works so this is a binary marker try so each node has two children and basically each node can be represented by the hash of its children so if you start from the bottom with pure data
right you can see that you have a piece of data l1 so maybe this is a transaction and the node h00 that's just the hash of of the data l1 then to create the the node as zero you hash the two children 0 0 and 0 1 and these two are only hashes right and then to create the top hash you hash 0 and 1 together and so you can see it's a tree of ashes all the way down so to take an example of working this so say i'm interested in getting a transaction or transaction batch that lives in block 41.
say i'm at you know block 42 i use the blocker shop code to get the latest block hash then each green arrow here is a use of the pre-image oracle so i have the blocker shop code i use the premature code to get the block header then from the block header i get the hash of the previous block and i use the parameter article to get the you know previous block headers the block 4d one in block 41 i get the transaction micro route and use the premature rocker to [Music] get in the tree and get the children and then for each children i each time use the premature call to get the child
until i can get the transactions that i'm interested in and this is exactly what we use to read those transaction batches that contain all the l2 transactions so concretely in mini geth which is or uh you know re-implementation of the well not or modification of go ethereum that validates block we use this to [Music] re-implement the the database right so normally if you have a go ethereum node it has a database of the whole state of the blockchain of the you know the blockchain is validating and it turns out you can use the premature record to
implement that and we actually have three implementations of the premature recall and this is where it gets a little bit tricky it's implemented on chain and this is is used for the single step execution and on chain we simply submit the pre-images and store the hash to pre-image mapping very simple it is we also have one implementation of this in that we compile to mips and this one is necessary so we need to run mini geth
in mips off chain because we need to hash the memory for the challenge game otherwise we need to run maps of chain but we need to get these hashes so we can do the actual challenge game and these users uh prefetched hash prefetch hashes so the premier record was similarly like we already know the hashes in advance and so we just read from a hash to pre-image mapping and then but then we also need to run mini gif in you know normal instruction set whatever runs on your laptop or server and for those we need to get the pre-images and we use the json-rpc methods
that you know online nodes expose in particular we use a get block by hash and we use this thing called ethgate proof which we use uh very creatively there are some challenges there but basically gift get proof gives you a microproof or of any piece of state in ethereum all right so a small summary optimistic wraps are secure as long as there are one last family editor the radiator if disagrees with the sequencer can initiate a fault proof using canon that's our fault proof system so the validator and sequencer they play
a challenge game and they find a single status agreement in the execution of the validator which is compiled to maps so this is called the challenge game and finally this single step is executed on chain and we can access the memory of the validator through some microproof and the batches of transactions that are being you know executed can be read using the primitive oracle and yeah that's that's how it works oh yeah yeah the final slide very important where with this so this is actually not fully implemented yet this is the design design is fixed we know how to do it but
george gave us a prototype which allowed us to challenge l1 blocks on l1 this is useless because by definition l1 blocks are correct right but it's a proof concept that shows that this can work and so what we're almost done with is changing l2 blocks on l2 so it's a simple transposition of this concept but shows that whatever changes we made to the original go ethereum that we're using on optimism uh still doesn't break the system and then the real thing that we want to do is challenge l2 blocks on l1 right that's the whole point and for doing this we need to add something called l2chain
derivation to mini-gf and that's the part where we take these transactions that have been posted on r1 so the l2 transaction on r1 and we create blocks from them and that's a logic we already have written and we can import it fairly easily because everything in this stack is in the go language so we can use the go module into our node directly to do that and so this will be probably probably our next focus after we release bedrock which is the next version of optimism there you go if you have any questions again feel free to ask them now or find
me later [Music] hello everyone i'm viviane from efpsc team
and i want to introduce the unirep which is which means universe reputation and yeah why we use unirep because we are nowadays we have a lot of applications their uh their own reputation system for example we have followers in a subscriber in youtube or airbnb and booking.com reputation and also we have comma in reddit but how can we integrate them together in one reputation system so uni rep is introduced here and first
now i took an example if an alice is an airbnb user and he wants to she wants to prove to a booking.com landlord that she has enough reputation to live she has enough reputation in the airbnb but the landlord of boosting booking.com doesn't believe she has enough reputation and now how can alice uh proof to the landlord in booking.com the easiest way is that alice can take a screenshot of the
[Music] history of his airbnb history but now the alice's privacy will be compromised and it's really easy to forge and so that the landlord of booking.com are is hardly to be convinced but now unirep can solve this problem unirep is a private and non-reputable reputation system so user can give others reputation and also he can option voluntarily prove how much
reputation he or she has and also users cannot refuse to receive bad reputation and i will introduce the protocol behind the universe so there are two actors in unira the first one is the attackers who who will not be anonymous in this system like airbnb or booking.com it it represents user to give reputation like it like they each they can issue reputation token and the users which
uh which means the uh alice or or a landlord in booking.com and they are anonymous and they can receive reputation and also proof of reputation so others will will never know that um who is who receives this this reputation yeah so you can achieve privacy and in this system we defined in epaki to receive reputation and also we defined and a period of time called epoch
for example seven days and then each in each airpod user can have k apar keys to receive reputation and the applique is like and hash so it will link it is hardly to link to an identity which is like alice here and in this system when user signs up and we use the identity system called semaphore and similar form consists of a private identity and a public identity commitment so the user use the public identity
commitment to sign up in a unirep smart contract here and uh there's a global state tree is computed and is completed by hash of identity commitment and the user state tree route so we will introduce what is useless day trade route in this protocol a user statutory route is how much reputation a user has in the unira protocol so the index of the tree is the a tester id and the um the leaf value is hash of all the
reputation data for example the positive reputation negative reputation and gravity and also a sign of rack for example is if a user has signed up in airbnb and he will get a set of flag here so the tree is street lift is the hash of the reputation and the global stage 3 is we said before is the hash of id commitment and the user's day 3 route and
when user signs up and he will it will insert a leaf in the global state tree in this protocol and also a user state transition will cause a new leaf inserted in and we will introduce the user state transition later and also we introduce how the a tester can sign up in this protocol so the now the attester is non anonymous so the a tester can use the ethereum wallet or a smart contract to sign up
in the unirep contract and the unirac control will assign and a tester id to the attacker like if the airbnb is the first tester to sign up in the universe protocol and it will get a tester id one yeah so it is the overview of the site up in the universe protocol the user used the ident id commitment to sign up and the tester used its ethereum wallet address or smart control address and we we say before user use the epa key to receive reputation
and the app pocket is hash of identity and epoch and nouns and the nouns is zero to k k binders one to let user have k apar keys in this protocol and how can we make sure that the user the user is the owner of the apa key and how can we make sure the user doesn't doesn't compute the apar key of it is not a render number of the apache so we use the zero knowledge proof to let user convince others that the apache is computed
correctly yeah so it is what in the in the zero knowledge proof circuit so we take the epoch and the identity and announce here and check if the id has the user state reroute is together with the merkle tree proof to see if the global stage route is uh matches the matrices the protocol and also we check if the epic key is computed by the id hash of id and epoch and nouns
and the red red words here is the private information and the green words here is the public information yeah so the other user can check that the other user only knows the the proof output apache and global state tree root and the valid empire yeah so when user generates a epa key and apache proof and others verifies it is valid and then the attacker can send the reputation to this epa key
through the unirep smart contract and now we if we want to make sure that the reputation it cannot be ignored by any other every user so we use the hash chain to prevent the prevent users to do this so we hash the reputation together with the attester id positive rotation negative reputation gravity and set off leg and each epoch has its
its hash chain so when whenever the epa key receives a reputation and the hash trend will be computed so if the if the user ignore any reputation here the hashtag resolve will be totally different yeah so now if the alice received the five rotation from airbnb and three negative reputation from twitter but now remember of the ls user state tree hasn't been updated now so
in this protocol we use a epoch transition and uses the transition to let alice proves that he owns this epa key and process this reputation and and receive this reputation yeah so the in the apart transition the hashtag of the faq will be sealed to let to make sure the apache cannot receive the epi receive the reputation anymore yeah so and then and then the apache
will be computed and the index of it is the apa key and the value of it is the sealed hash chain and this tree is also used to prevent users ignore any reputation yeah so how can users receive the reputation for example the user want to transit uh the user will perform the users they transition from up and to epoch m and then it is what she will do the
first one is that he will prove that he has signed up or he has performed the user state transition in epoch and and process all the attestation and finally it will compute a new global stage relief in epoch m and this is how the user stay tree updated like for example in a initial user stage it will be empty and if a reputation comes and we update the um
the third the fourth the fourth leaf and it is index three and the leaf will be hash of the positive reputation and negative reputation and rest of it and also compute the hash chain and the second reputation comes and we update the uh we update the user state tree according to the tester id and also compute another hash chain yeah so after we process all the reputations
we will have a hashtag of all apa keys and uses the updated users they tree root and then in the circuit we will use the identity and epoch and we iterate all the nouns all the possible nouns and to collect to calculate all the apaches the user has in the current airpod and then we use the apache to compute the apache like we uh we checked the
the epa key and the sealed hash chain in its leaf and then to check all the apaki match the same epic route apart tree route yeah and then remember that we have update updated user state tree routes and then we will compute the new global state relief with hash of identity and the updated uses they tree route
and we also compute a nullifiers called apache nullifiers and it is used to prevent user from double performing double user state transition yeah so the uh so that if the user generate the user state transition zkp proof and submit submit it to the unirep smart contract and everyone in this protocol can verify if the proof is correct and then if they are correct then update the goldball state tree yeah then after user received this
reputation and he can voluntarily really prove how much reputation he has for example we can prove the reputation is bigger than the uh the minimum reputation we set here for example if alice have 100 positive reputation then he can choose to to prove i only have 10 here and also the pre-image of gravity and the gravity can be said of any any string yeah so it is it will make the uh reputation system more up um you can have more option to
prove things in the reputation system and also user can prove that if if the user has signed up in the tester's application and the idea to prove the reputation here is that we can compute the user stage relief by hash of the reputation and also check the user state tree root and hash of identity is one of the global states relief we can see in this this picture the left side left hand side is the
user state tree root and it is its leaf is hash of the older reputation from one attester and the right hand side is the public global state tree and the user sleep would be one of the leaf in the global state tree yeah so here's the overview of unirep protocol the user with the public identity commitment will sign up in the unirep system and the tasker can set up with its ethereum wallet or smart
contract address and then user generates an epa key and apache proof and submitted to unirep contract and then the tester will give reputation to this epoch key then it will perf on every certain epi length the apar transition will be performed and the epi will increase by one and all the apa keys will be sealed and and apart 3 will be computed then use how user receives reputation is that
user will generate a user state transition proof according to all the apa key he or she has and process all the reputation then the user will according to the reputation he has to update the user's day tree and then check the apache rules if they match the same one and then others see these users stay transition proof and verify it is valid and then update the
whole uni-wrap state and if user has one of the least in global state tree and he can prove that how much reputation he or she has in the um in the universe protocol and use a reputation proof to convince others and there is one of the example of uni-rap particle we built a social media called unirep social
and it is a decentralized and anonymous social media so user can pop can publish a post and comment others and also upload and download reveal how much reputation he or she has and instead of user has a real name or account it will reveals only the the the epoch and it just looks like a hash of it
so it can prove we can preserve you the post the author's privacy yeah and we build this system with we build the anonymous social media is with a reputation assistant is to force users to take responsible for what or what what they say in the decentralized social media yeah and this is one of the example of univariate protocol and more more applications that with reputation
requirement can be art is also welcome to build upon the unira protocol and here's our github m documentation yeah i'm also welcome to join our discord to discuss this protocol with us thank you [Applause] [Music] [Music]
[Applause] [Music] hello everyone i am i'm guilty gyoza i
go by guilty or gyoza both fine my co-founder of topology we are building games uh fully on chain on start net okay um so uh we're going to talk about a lot of about video games today and we think that there are a lot of past evolutions in the game industry and every time video games transformed right last time around mobile came and we have mobile casual games and mobile gave us access to games 24 7. but we think that blockchain will transform video games in a very different way we think blockchain will bring significance to gaming because blockchain is the place where things are
immutable they are permanent they are hard and so things happening on chain has significance and so it will transform video games in a very unique way we think that the game industry right now is akin to web 1.0 so we're kind of calling it game 1.0 what game 1.0 means that there are very few people creating video games and the majority of people are consuming the video games so there's a massive skill towards read very few people write to the game as a medium this is like recent statistics in the united states for every one employee in the game industry there's 1 000 gamers
in the us and so you know when we think of gamers we think of people the persona where people are consuming the content and game logic provided by the game developer while the game developer created content program everything to give you the experience all right so a bunch of video games here on top left we have fortnite um when you play fortnite and you basically uh that's a port of four you basically click your left mouse button aim and release your left mouse button and you deploy a castle and all you do is engage with your mouse but the game developer did all the fun stuff right modeling the castle programming creating the computer program that would model the castle
place it place the geometry in the scene and so on all the wonderful stuff and you as a gamer are only enjoying the mouse clicking action that is kind of unfortunate we think the game developers are enjoying so much by creating games and gamers are thus far still passively consuming what is provided to them on the right you have a street fighter and so when you're using a space your special um hadouken in this case you're pressing a combo of keys and you're triggering the computer logic program by the developer you're not doing anything more than that right but the computer programmers did a lot a bunch of interesting things drawing the animations programming every little bit of the logic to give you that experience um same for uh
ghost recon breakpoint same for witcher 3 cdpr there's just a lot of things that go behind the scene game developers did and we as gamers are consuming the content and experience provided by them now this sounds terribly like game web 1.0 right and so how do we go to game 2.0 um well one way is to think about system one and system two this is uh thinking fast and slow um and so when you play video games a lot of fast twitch keyboard and mouse that's system one system two is like slow thinking strategic thinking right uh burning your brain sort of thing um in fact a lot of the ten thousand hour games so-called games with incredible depth they are engaging system two uh intensely all right so
this is the uh beloved age of empire two uh we are looking at uh the famous mbl placing a town center next to the opponents town center this is the famous persian douche right and so by playing persian you enjoy like half resource placing your town center or building your town center and your town center has double hp and so you can basically pull this troll off right so kill your town center move all your villagers to the front and rebuild your home right next to your opponent's home and just shoot down your opponent's tc this is a funny thing and game developers programmed everything um you know program the the logic program setting all the parameters that define what is what each civilization means as gamer we engage our system through we
think strategically about these different strategies to utilize the logic provided by the game developer but still we cannot touch the the game code right well other than modding right but the canonical primary game operated by the game developer we can't touch it we can only modify the game as fans okay so when it comes to players creating things in game we have to talk about ugc right we just have to talk about it user generated content and when it comes to ugc it has a very long history so this is a ghost recon future soldier as fps player we love customizing our guns we like to love to customize how
our scope is how our muzzle is our magazine size all that stuff um another kind of customization is the appearance editor so this is a naraka blade point people love to customize the avatar how they appear in games and this customizer gives you the ability to sort of parametrically play with the sidebars to tune every little details about your facial expression and your body appearance just to give you a benchmark so this is a game with like chinese uh kung fu usha kind of background uh with some japanese influence but with the parametric facial editor player gamers are creating ridiculous stuff you know like iron man uh uh geralt's from the witcher 3 series and
so on it's like incredible stuff right so we we have felt this trend where gamers want to actively participate in creating games creating things that exist in games we have to talk about roblox if we talk about ugc so this is the roblox editor where an interface is provided to gamers mostly young kids very young kids that are using this interface to design their little worlds and design little games for other kids to play and furthermore there's a scripting language embedded in the interface which is the lua scripting language so young kids are learning lua in order to play roblox and create games for their friends to play so this is very cool and let's come back to blockchain for a little bit dark for
us we have to talk about dark force if we talk about on-chain games and what's fun really fun about our force is we have a whole part of the game that is not provided by the game developer right gamers are writing plugins and scripts that are automating they're automating various different things and there's like whole marketplace also created by gamers not the developer that are hosting these different plugins and these are all user-generated content user-generated scripts so this is really fun but can we take a step further um so i like to use this mental model uh thinking in like schematic terms so let's start with this we have a set of rules the gate rules of the game and
basically the rules would spawn a space of play right so if like in linear algebra you will have like a basis spawning a vector space kind of like that concept right so the rules define the boundary of play outside the boundary is illegal you can play within the boundary now let's put the people here so we have gamers playing in the space of play and we have developers that are building the rules and the rules exist as computer code as that's what video games is and the way gamers can influence the rules thus far is indirect right so the gamer can choose to play or not play a game where the gamers can go to steam and upload or download the game or put negative comments to influence the developer to change the rules of the
game and so gamers have indirect way of influencing the game and it's basically engaging market forces and capitalism so that you know game developer would sometimes are aligned with gamers they would change the game towards what gamers want sometimes they will fail and the game would die now let's put blockchain into the picture so what if we run the rules of the game on chain right so rules define transitions from games game stay in the game state and their computation right so we can write this computation in the form of small contracts and put it on chain so we have a games running fully on chain when the rules are enforced on chain we have a functioning game like dark force
conquest excracia and so on what's interesting here is that because the rules are unchanged they're transparent people can audit it and we can also govern it so we can say well no change can be made to the on-chain game unless some community you know reach a consensus to approves or disapproves it right so we can put an end gate there that logical end says developer can develop new feature but it is gated by some governor's decision players have to pass that proposal for the new feature to be implemented into the game and because the game is unchained we can govern it in a in a fully transparent way and notice that the play stroke color of play is the same as stroke color of
govern we think it's important for the gamers to govern the game not coin voting not people with you know capital power and so you have to play the game to have a share to to govern the game and basically we can just replace the gate with the with the dow so that right there is a dow right we can have a dow that governs the game where every change made to the game has to be approved by the gamers and gamers would get governance right by playing the game not by buying doubt tokens in the market and i think dark force establishes a path here which is gamers themselves are developers they write programs that enhance the gameplay that expand the gameplay and so we can perhaps break that boundary we are all gamers building
games playing games and governing the games um lastly i want to add one last component there so so far we have established that in order to change the rules of the game we need consensus right so the dial will form some kind of consensus to approve a new feature to be added to the game a new character or a new special ability or nerfing or buffing something another way to change the rules perhaps is through some autonomous route so imagine some meta rules beneath the rules that are just completely immutable and they dictate the some kind of algorithmic change of the rules one example i can i can think of is imagine darwin darwinism evolution so
the meta rules will be the darwinian evolution and the rules will be the species what exists in the world and the evolution doesn't change but the species change over time right new species come up some species goes into extinction and so on but there's some kind of algorithm the meta rules that govern the autonomous evolution of games and this perhaps is can be called as autonomous games okay um so we're making this thesis that we think game right now is at game 1.0 and we are moving towards game 2.0 which we think will have such significance it's a different kind of reality and we're calling them unchained reality and it has a couple of characteristics first of all the core game systems are
fully unchanged so it's fully transparent auditable smart contracts it's immutable by default and it's only immutable either by some kind of consensus reached by the community and there should not be coin voting involved that's why it's called merit-based consensus or or by some kind of autonomy of smart contracts so small contract runs some algorithm that dictates the change of rule and the algorithms are immutable and so no one can change the laws of the universe basically in order to demonstrate these concepts we have typology have made a hunting game or arching a reality called isaac isaac is the first thing about newton isaac newton because we're
running uh basically the three body problem in a small contract and for people who have read the three body problem story uh is by a famous chinese sci-fi novelist and essentially imagine a solar system where there are three suns and there's like a planet that revolves around these three suns and it's a very poor planet at any given moment time you may be crashing into a sun or getting too close or too far away from the sun so you will be either too hot or too cold and so on it is a very harsh environment and so players have to work together to change their fate and so isaac is a game inspired by these stories the three-body problem and also the wandering earth by
the same novelist and also the famous factorial building game resource management game documentation open source uh small contracts all open source and we're currently doing close alpha all right so the game can be understood as three suns and a planet everyone is on the same planet and uh everyone is building these production pipelines that are harvesting resources and transforming resources and eventually they build uh planetary engines this is the wandering earth story and so imagine planetary engine as a rocket right and you basically mount your rocket on the surface of the planet and you launch the rocket and you know by newton's layer law there will be a reaction right so you can drive your planet by launching the rocket that's
essentially how players work together to build rockets place their rockets and launch them to drive their planets here and there to dodge the sun and evade the sun and eventually they can escape the sun if they can drive accelerate their planet to escape velocity so they can just escape from this hell hellish environment and that constitutes a win right so the game treats uh uh escaping the solar system as a win all players win together and when the planet crash into a sun all players die and lose together okay so uh this is a screenshot from the front end we have three suns and a tiny planet and this is the screenshot at the front end where
players are building pipelines that harvest resource and transform resources and so on uh this is enclosed alpha okay so uh again all players are united against the common objective there is no pvp it's entirely co-op pve and what's special about this technically speaking is that the physical loss is operated in a small contract and also the regulations that you know dictate the logistics um you know how much resource is harvested is transformed every single tick and so on all these different things are enforcing a small contract so what do we mean by physics when we talk about when we talk about suns and planets right orbital mechanics we have to talk about
newton's law of gravitation so we have the inverse square law right the further you are the less gravitational pull you exert on me and so on and we are approximating this using the standard numerical method right so for anyone taking classes in numerical simulation you know this is the standard very simple uh fourth order ranking cuda method for approximating the uh the differential equation of the gravitational wall and we are running this basically this numerical simulator in the cairo small contract on starknet on ethereum so that's a layer too and um there's also a chaotic system all right so three body problem is a chaotic problem so we are living in a solar system with
two body we and the sun and everything is pretty stable we just go around in circles and ellipses but in a three-body problem things are very chaotic you can't really project far enough into the future where you are and that's why it's easy to go into destruction but when we run everything on a blockchain everything is transparent and deterministic right so as a gamer i can take the contract from the blockchain and run it locally basically run it forward by like 1000 ticks and i can perfectly predict what will happen in the next 1000 ticks everything is deterministic okay so that reduces the difficulty so we can put back to chaos by injecting some randomness and again randomness oracle
the the rabbit hole so we're not doing any oracle we are deriving random numbers from player actions if you if you know fiasco mirror we're taking inspiration from fiasco mirror randomness is derived from sort of hashing together a bunch of player actions in the last tick and so players either optimize their actions and forget about gaming the randomness or they gain the randomness but they they make a bunch of unreasonable player actions so either one or the other which we think players would definitely choose to do the right action and forget about gaming around this so this is the fiasco mirror idea um again there are production lines and there are power grids and so the problem is about players working together to
solve this optimization problem at the civilization level so it's a massive co-op factorial game multi-ingress we like the idea that when we make a game we want people with different backgrounds and interest to come in right so you think about counter-strike it attracts people that love muscle twitches and shooting people and that's not everyone right and so this game uh caters to uh different people uh people want to look at circuit layouts um engineers people want to look at production throughput uh right uh people working in like um heavy industries and just or oftentimes just nerdy about throughput optimization people that have interest in physics and want to look at the orbital mechanics they can come in and look at that
and finally there's the human coordination problem because everyone needs to work together to pilot their planet around right and imagine a planet with 1 000 people all in the same discord channel and they're all discussing who to do what when that's a human coordination problem and so people who love to do that can join the universe and help coordinate people just by talking they don't play the game and finally just like dog force this game is client agnostic so gaming running on chain everyone can build a front end that interface with the game and visualize the game and so this also presents a client building game how to build the best client that visualizes the game in a optimal and enjoyable way just as a bonus we are doing uh open
alpha soon and we put up this on-chain puzzle constituting uh 50 different puzzles and we're saying that one account can only solve one puzzle and only when you solve a puzzle can you uh choose to can you join the isaac later and so if you haven't already solved the puzzle when later we do open alpha and you send a transaction to join isaac your transaction will revert so this is kind of a way to say well you need to have already solved the puzzle to be able to participate in our alpha and it's all unchained and finally coming back to governance we think governance is super important here um and we want to explore non-coin voting mechanism so we're uh pushing this idea called car style
cars is coming from james cars the author of the proposer of the concept infinite game card style is essentially a governance pattern where you govern in order to govern more and play more instead of you play in order to win and stop playing so this is a concept of infinite game okay so the schematic card style is you as players on the top left will play the game which is a subject there and if you play the game well you would earn voice in the down right and the voice will be mapped into votes and you can vote on uh proposals proposals are exactly on chain changes to the on-chain game so everything is fully auditable there are small
contracts in order in order to have governance right or voice in the doubt you must play the game well the voice is not some token on the market you can buy so you have to play isaac well to get voice to have votes to vote on proposal to govern the change of isaac on chain in order to play isaac better and repeat that process right so you play more to play better and so on instead of having this sort of dow token mechanics where if you buy dow token you would somehow vote for proposals that would get the price appreciated and then you will exit and then you will stop governing that's finite game and we are all about infinite game so this is the architecture
diagram of isaac so isaac implements the car style pattern you have the dow governing the game on chain um the proposal uh contract the charter contract everything is unchanged so every change made to the dow needs to be approved by the voters and voters are gamers they play the game and finally we want to mention our partners yagi builds the ticker on starknet is you can see it as a clock basically the gelato network on layer one but on starknight layer too and apibara is the indexer that listens to all events emitted from the isa contracts and and put up a nice back end for the front ends to query efficiently okay and lastly we want to talk about
our upcoming unannounced project we want to explore more the space of play we are very inspired by dark force the ability for gamers to write scripts and automating things and expanding the complexity of play we want to do something like that and we also want to explore meta rules so many rules again are these algorithms on chain that are immutable they would evolve the game algorithmically and so the gamer game the rules of the game are evolving by some algorithm you can call that autonomous game and we want to build this on chain obviously and we are exploring the fighting game mechanics we love fighting games and um oh it's not repeating and so what you're seeing is it's a female character with a katana
and um can we repeat the the video again sorry yeah thank you yeah so there's a female character with the katana and what she did is you know four dash a backward dash then a four dash but she cancels the four dash into uh attack a sequence of attack animation so uh you know for people who play fighting games you will know what i'm talking about and what's special about this game is there is an ai that drives the character so this sequence is not controlled by me pushing keyboards and mouses this sequence of action is driven by some very rudimentary ai in a small contract that dictates the behavior of this girl also the physicist is in a small
contract obviously so you know the characters move forward and backward accelerate they accelerate the physics is the physics is enforced in a small contract um yeah so this is our next experiment and we are very excited to explore the paradigm of game 2.0 we think we are moving into this new paradigm and in order to build this we are in need of talents as we're looking for smart content engineer we're looking for research engineer and also front-end designer if you're interested in this vision come talk to us thank you [Applause] [Music] yep
well good afternoon um hi i'm jeff from ethereum foundation's privacy and scaling explorations team um i'm i'm helping out with an ethereum project the um kcg trusted setup ceremony uh if you've been following on uh the the roadmap for ethereum you will have you'll be familiar with um eip 4844 that's uh proto dank charting and um data availability sampling for um for roll-ups
and the the that's all driven by kzg polynomial commitments and those polynomial commitments need a trusted set up so uh what we what we want to do as a community is get everyone contributing to this trusted setup now once upon a time what i've heard i learned that koreans don't say once upon a time they say back in the days when tigers smoke long pipes sounds like a great time to to be around so um
anyhow back in those days trusted setups were a pretty complicated difficult sort of thing with lots of uh complicated interactions between the participants but these days the protocol is quite a bit simpler and the other things we have going for us in this situation is um is we don't have a zero knowledge trusted set up it's just a it's a polynomial commitment trusted setup and [Music] it's it's only for us a relatively small number of points like 2 to the 16 or 2 of the 15 is our is our largest sub-ceremony so um it's it's like much
smaller than if you've contributed to trusted setups before this is quite a bit smaller than those so it's going to be nice and easy for people to contribute to it'll be a fairly quick computation um maybe the actual computation should be a few seconds maybe 10 seconds or something and then less than a minute to upload and download and do the computation so everyone is going to find it really easy to do it's going to run in a browser be you know quick sign on protocol and then just let it run so nice and easy for everyone to do
um uh we need to get um each each contributor has to do has to we can only have one at a time and uh there'll be a coordinator collecting these contributions and then figuring out who to pass it on to and so one at a time the contribution is passed along around the participants [Music] and the security properties are that if we get one person who successfully uh discards the secret they that they put into this computation then it's going to be secure so um
just an analogy to to to understand how that works um if you have a if you have a private key and you do the elliptic curve multiplication and you end up with a public key and if if you pass your public key to me and i mix it with my private key we end up with a new public key and if i then throw away my private key then we can't derive that that new public key again so um so we'd need to have both those yours and mine yours and my private keys together to rederive that public
key now if we multiply that situation by hopefully thousands of times then all we need is one of us to actually successfully throw away the secret that we put into that that private key that we put into the computation and then we're secure so that's what we're aiming for um we uh we need to defend against the tax we need to make sure that with the whole process is secure so our main avenue for defence is to get lots and lots of participants so we're going to make it nice and easy
for people to just do the contribution and hopefully we'll get thousands um so you know if we've got a chain of a thousand contributions all we need is one one of those people to successfully hide their their secret and we're good um we will however um think of other possibility are the possible avenues of attack um if if somehow the software we're using is is compromised then we need to we need to think that someone might be siphoning off all those secrets um so we need to defend against that so
what we're going to do is have lots of variations in the actual software that people are using so we're going to try we're going to build apis so people can write their own client and we'll publish our own client so that people can just use it out of the box or people can use the apis to build their own and then we get some variation in the the stack that people are using to uh to do this ceremony and by that mechanism we hope to get better resilience against the tax it won't just be uh
the actual client the client will do like interactions with the coordinator um to uh you know maintain that cue position and accept the the download and do the upload uh we'll also have an sdk that purely does the computation part of it so um so if if you for anyone who's interested in building some of these components uh we would welcome old contributions um and we'll we'll publish the apis so so you can do it fairly easily um
and as well as that we'll have security checks around around uh each contribution to make sure each each one is valid we can check that the contribution is valid that it there's no um [Music] uh yeah that it's a valid sequence in the chain of of contributions uh you will get a like a fingerprint for for your individual contribution as a contributor so um and you'll be able to uh match that against a public record of all the contributions so we'll make all this data public we'll have a big dashboard that will show people contributing and and and a link
to like a permanent record of of all contributions so you should be able to remember your signature for your contribution and look it up in in the in the public record and that ensures that the coordinator is not like swapping in their own data and and um and corrupting the the ceremony that way um yes so the actual process of uh contribution is um there'll be a simple sign on very simple like three clicks probably signed in with with uh
uh your ethereum address um then you can join the queue at a time of your choosing uh and we'll as i said we'll have a dashboard and it'll show like how long the queue is we're hoping that the queue will be uh fast-moving but of course this is going to be quite um widely publicized and we're hoping for lots and lots of contributions but so there could be a bit of a cue but it should be quite fast moving because this is a very quick contribution um so you'll join the queue you when you're when you come to the head of the queue
you'll request the latest valid contribution from the previous contributor uh you'll generate some randomness and that's that's your secret that must not leave your environment with that randomness you'll feed it into the contribution you'll update the uh the data and you'll send that back to the server and then make sure the randomness is thrown away so all of this for ordinary user this will all be uh behind the scenes you just do this couple of clicks to sign on and click a button to let it go and then the browser will look
after the rest but if you're interested in building a client api you'll these are the steps you'll you'll do we'll have api apis for all of these things um so yeah there's lots of ways to contribute um we want we want to get everyone just doing a contribution in the browser but if you're interested in doing a hackathon project or just doing a side project on your own we'd love your contributions build a client you can build a compute engine you could build a fancy client doesn't need to be a client that runs in the browser you
could run it in a cli you could run it in a google colab workbook just go wild with that when we're doing the like the bulk contribution phase we will have time limits um so we'll have some sort of expectations around how how fast this should turn around but we're gonna we're gonna have multiple stages here so there'll be that bulk contribution stage and then we'll go into another phase where we're a lot more tolerant about the timings and we're just inviting like open slather on how you want to generate
the randomness and compute it um and people you know if someone wants to put their laptop in a faraday cage and have a radioactive banana with a geiger counter to generate randomness and whatever just think of crazy ideas and we'll have a time for you to contribute like that um the ceremony i think will will looks like we'll start in october around the time of devcon probably uh that that uh bulk collection phase i forget the timings maybe a month or two uh we just need to get this um completed in plenty of time for the shanghai upgrade which is like sometime next year
um uh yeah and there's other ways to contribute too like this thing will need verifiers if you want to build your own verifier to to verify people's contributions that would be great um or build yourself a dashboard so if you want to we'll have a dashboard but um if you if you can want to build your own that'll be great um uh yeah so there's lots of opportunities to to build things around this and every contribution especially in those computation phases is going to be a really valuable bit of diversity that we can build into
this ceremony um so yeah this is really one of those upgrades that uh you know it's not just the boffins in in the back rooms who are who are developing it it's one that we can all be involved in in some way or other so uh look out for um [Music] look out for notifications about when the ceremony will start if you want resources for you know the apis the specifications for the data format the planning meetings they're all on this link here and
um please yeah you're welcome to come up and talk to me and find out more and if we have time then we can have some questions if anyone's got any or else or else have fun with the ceremony and we look forward to your contributions thank you [Music]
[Music] [Music] [Music] my name is aj um i'm a co-founder at radius
um actually we did a grant program of ethereum foundation called mev resistance aam amm a few months ago so today's talk is about the result of the program so um what's mev i i you probably heard a lot about mav but mav is maximum values that can be extracted when building a block by censoring or inserting transactions or changing the orders of transactions in a block so um we hear a lot about mev in blockchain and device space but the history
actually goes back to traditional finance michael lewis wrote a book called flesh boys to tell us that how maliciously wall street institutions are used inside the trading information to make a huge profit at the expense of regular trade so for example if you want to buy apple stock apple stock your trade doesn't go directly to exchanges some entities called high frequency trading firms seize your transaction first and then buy all the stock apple stocks at the exchange so you will probably end up
buying hot buying apple stocks with higher price than you expected so um and then this kind of user fund stealing was brought up to media again a few months a few years ago with robin hood when robin came into the market it attracted millions of users with a commission free stock trading but actually the robinhood make a profit by selling your trade to high frequency trading firms that runs dark pools to front run your trade
so that's why they can provide some kind of trading fee free and then so actually they manipulate your transitions to make a huge profit so uh the two uh the key point that i want to emphasize from these examples that if there is anyone who knows trading information in advance and is able to change the order of transaction it's actually the has a power to steal another person's money so
so um some mev is also happening in blockchain space um the set of transitions on the screen shows that the most common type of mev which is sandy ching attack sandy occurs that an attacker places two transactions before and after on open transactions we call it a victim to make a pro manipulate price and take profit so um i brought some statistics on um the standard attack uh more than 1 000 transactions are attacked on daily basis and then any
researchers or miners actually can make a huge profit from them the more important thing is that users pay more when they trade you just pay more than they would have without being attacked by sandwich attack ranges from at as little as two percent to at most 87 percent of your trade the worst part is that actually people don't realize that this type of mav attack actually happens so they actually it leads to a financial losses on your uh your assets so
um but there are certainly a harmful effect of mev but there are also alternative perspective of mev having a positive effect so there are two kind of different types of mav been discussed recently so malicious mvv such as front running and sanitation attack are definitely harmful to users they are just taking money from your pockets and then b91 benign mev is a harmless to you it's actually an essential part of independence space so we are we are not
trying to prevent all kinds of mev we just prevent the bad ones and the maximize good ones so yeah i'm b91 b9 mavs such as the arbitrage or liquidation is a essential part in device space um bad mbb at the malicious mev so we see that as biggest threat on ethereum and especially layer 2 protocol as well because layer 2 has the only single sequencer to make a block so it has more power to sensor or reorder transitions when they make it make a block
and we see we refer to hidden slippage that you pay more when you are mev attacked so and then as you can see on the graph mev extraction is growing at a significant scale so you need to be aware of that and also you just pay a really high transition gas fee because of mav mev such as compete each other with a high guest fee to take a good position to front run or take profit so
you know you just usually use our gas estimator estimator use this pga inflated the gas i think so um you usually end up with pain a really high speed when they like compete each other so that's that's the result of that's from the the uh the bad mmb and then um the worst part worst part is that it actually affects uh consensus as well if like if and maybe like if miners or sequencers capture some some kind of opportunity to
make a huge profit of mev they might reorg a transaction's history to take the profit so it leads to like it encourages our consensus uh instability so that's why we see that the bad mev is kind of a threat on ethereum someone say that it's like a predator in dark forest so our team's approach is that we want to bring a true information symmetry to create a fair trading environment so like in traditional
financial system we have we had to accept what was given um trading systems aims for efficiency and so that's we that's why we give all the authority to central centralized institutions for for the efficiency of our trade but ironically we are forced to pay some kind of tax um due to that the exploitation on our trade uh like a high high frequency trading that i just mentioned before so
in blockchain space we have uh we have the right we have we we have the choice to what's right so um that's why we want to build some kind of the fair trading environment to bring a true information symmetry so i will explain our approach to make so uh as i said before mav is all about the ordering of transactions mvp happens because your transactions is open to anyone so it's the ninth way to prevent mev is that just
encrypt your transitions to hide it from mvv attackers but if transitions are hidden the problem is that the transition is hidden at the global state also unknown so it's really difficult to make transition with unknown states so that's why uh people say that it's kind of difficult to make private unison so that's why we came up with a delay encryption in which encrypted transactions are automatically decrypted after a specified amount of time and
before this time ends up our sequences or miners have to confirm the transition order without seeing the contents of the transactions so that's how we build a fair ordering also and then to build a delay we adopted a timelapse puzzle terminal puzzle is just a specified number of sequential computation so and then the solution to this timeline puzzle will be used as an encryption symmetric key to encrypt transactions but um
encrypting transactions leads to another problem especially on the the sequencer side for example malicious users submit encrypted transactions with invalid key with invalid transactions um sequences can't distinguish if it's invalid or not because it's encrypted so that's why we need some kind of verification to prove that this encryption process is done correctly so that's why we came up with some kind of validity proof with the gk the zero knowledge proof
so yeah so if uh with this gk based proof uh sequences verifies this proof and then if verification is true then try to like try to solve the timer puzzle to get the question key or without this decay based validity validity proof um sequencers might waste their computing resources to solve an invalid time of puzzle so okay um the boxes are checked for like preventing the user funding stealing and
prevention of ddos attack a dos attack on sequencer side but generating this gk based validity proof should be done on user's side with limited computing resources so we need to make more practical so that's why we come up with some kind of tricks and the first that to delay as i said before the timeline puzzle is based on sequential computation actually it's rsa the hidden order group so but you just use a user is the one who generated this timer puzzle which means
they know the what the hidden order is so they use it as some kind of trapdoor to make to solve terminal puzzle really fast so i we said it's a practical on the user's side and then um as for validative proof um it turns out that it's really uh it's almost impossible to turn those timer puzzle and encryption into gk snarks so that's why we combine the gk snark and sigma protocol to make uh this generating validity proof process to be done
on general macbook in five seconds so that's the result of our approach so that's how we came up with the pvde practical verifiable delay encryption um the most important part is that um on step three when a user submits transactions with validated proof a sequence of verifies this validity proof and then if this verification is true a sequencer responds to you just with other commitment some kind of a promise that your transition will be included in a specified uh
order in a block and then you you just can make a claim when they find out that sequences break the promise so that's how it works so um let's let's deep dive into pvde scheme um as i said before i we developed we developed this scheme when we when we are doing a grant program of ethereum so thanks to once up and barry whitehead from ethereum foundation we measured the proving time for to
generate this validated proof especially the timer puzzle in zk socket so and then we run it on the general macbook so you can see the specs on the screen um so um there are four approach to make this the timer puzzle into the gkp to generate the ability to proof um the simple way is that just to put the timeless puzzle function in gigi stock's circuit you can see that rs we are using the rsa based the hidden order group so to achieve 182 bit security we need to set up a generator g as a
20 48 bits and then and then if we want to make a 10 seconds delay we need to set the specified number of steps which is 2 to t is 8 million bits which is ridiculously large so we can't make it to be integrated inside the circuit so actually we failed to get some result so we thought okay we thought that okay let's let's reduce the the number of steps uh to to make the timer puzzle so that's why we come up with the trapdoor
as i said before the users know the trapdoor which is the the the order of rsa group that using a that is used to make the timelapse puzzle um so uh as you users know the hidden order group a hidden order so we can we could reduce the steps of steps for terminal puzzle but it turns out that white matters is not the steps of timeless puzzle actually it was the the size of a variable to for the steps to be stored in the circuit so
actually also failed and then another one is actually we are getting uh the number therefore proving time um we we tried to reduce the size of the variables for the steps to be stored in the circuit so actually we run uh truss trusted the setup so we generate the parameter of two to two t and then we used the number of steps as a 128 bits as a secret value so as easily can see that um
g to 2 to t to s is the same as g to s to 2 to t which will be used as an encryption key so but as you can see in in d um we still need to calculate the um 20 48 bit scaling um 128 bits twice inside the circuit which is why we we've got about 540 seconds to prove to generate proof so it's you can see that it's in in is not practical especially on user's side no one wants to wait for
the that amount of time to make a single unisop transaction so that's why uh finally we actually managed managed successfully to generate this gk based the validity proof within five seconds um [Music] we as i said it's uh we are difficult to just use only 3k snaps so we used not only snug and also sigma protocol so um so finally make it uh we think it's a
practical um we will tell you the details of the scheme after we are done with writing of thesis and then also the previous experiment the result as well so um okay so another thing that i want to point out that is pvd scheme is actually agnostic which means that we make a separate the transition ordering and transition execution so you can deploy pvd-based some kind of depths on anything so when we
did a grant program we actually built ppd-based attacks on optimism this is the architecture that we did at that time so you can see that there's a transition order management based on mrr and the older contract management as well so and then also um a few months ago we um participated in a hackathon called hack money 2022 at that time we also built we modified the uni shop and deployed this mev resistant decks without any hidden solid pitch on polygon so
at the time also we had a great result as well and then lastly we published uh technical articles on ethereum um foundation forum so you can check out that we this is the ultimate goal of our projects which is the mev resistance gk roll up with a pvde so mev is happening not in deep not only in the fire space but also actually in happening nft and bridges as well a few months ago actually the bold ape nft is attacked by mev as well so
so that's why we want to build some kind of decay roll up i mean the ecosystem not just only one specific type of adapt okay so this is the end of my talk if you are interested in mav resistance or pvde and or the dk roller please the co deliver comment on the the articles on ethereum foundation or just contact me to our team at the radius so uh we believe that some people said is mav is inevitable but we believe that mvv is not inevitable if we choose to prevent it
thank you [Applause] [Music] [Music] [Applause]
hello hey everyone uh thanks for joining my talk is about building x-chain cross-chain applications with connects oh sorry okay so just as an intro my name is rahul i'm the co-founder and cto of connext uh i've been in the space since about 2017 we started connects in 2017 so we've been around for a long time been doing a lot of different things in the space like state channels fiat on ramps dows and now we've actually moved into interoperability
which we think is is a really cool space so just to give some background this is how the old world you know like back in the day in 2016 2017 et cetera used to look you had eth you had bitcoin you have these very like kind of distinct and separate ecosystems where there was no real way to link between them like if you have funds on ethereum and you want to get to bitcoin really the only thing you could do pretty much is go through a centralized exchange and now what we're seeing come together is a multi-chain world so you have these distinct clusters of different chains that are popping up all over and they have these very distinct ecosystems between them
so you have eat plus the roll-ups they're sort of forming this own little cluster and then you have cosmos which has its own little cluster as well you also have polka dot and now you have even things like polygon is launching like these things called sub super nets avalanche has subnets bnb has these app specific chains so you're really kind of starting to see multi-chain as in a multi-cluster ecosystem and with that we get to what bridging means in this new multi-chain world so the first type of bridging is intra-cluster bridging so that means you have like these little connections within these little clusters and uh some of these ecosystems have done this really well like for example cosmos has
built ibc so from the get-go they wanted this thing called inter-plus intra-cluster communication so they're built uh inter blockchain communication as ibc protocol also polka dot has uh xcm so these uh in between these little clusters you have this communication that's a very powerful communication tool uh polygon avalanche all these other cluster-based ecosystems are all building bridges in between like this uh but then you get to this harder problem where you have like this problem of how do you get from roll-up on ethereum to this chain on cosmos then to polka dot then back to some other roll-up so that's where you have like kind of like a harder problem that is not solved by these intra-cluster
bridges um now like what exactly is a bridge so let's back up and figure that out so bridge is you have alice who's on origin chain a wants to send a message to a destination chain so she will say something on an origin chain then something happens some kind of magic process then you get something to happen on a destination chain and then this can either be this can be like sending tokens this can be sending messages this could be like sending data this could be a smart contract call it doesn't matter what it is but something has to happen so let's dive in and figure out what is this magic so there's a few different ways that you can bridge and i'll try to talk about some of the main ways that we've thought
about bridging so far so natively verified bridges that means a chain's own validators verify the tx's so this if we go back to this sorry here i'm going to back up a little bit but this intracluster bridging is built using native natively verified bridges so in practice a natively verified bridge means that a chain's nodes are running light clients of all the other uh chains within this cluster like if you go to roll-up bridges all the ethereum nodes are actually verifying the transactions that are going on in roll-ups if you go to cosmos ibc every cosmos node that has a ibc connection to another cosmos node is running a light client validator of that
other chain so this is the probably the most secure and best way to bridge but the problem is it's not generalizable like you can't have ethereum validators validating transactions on cosmos that's just never going to happen so this this the problem with this the trade-off that you get with this type of bridge is that it's not generalizable if you want to solve that trade-off you can do this other kind of type of bridge which is called an externally verified bridge this means you have a third party of validators so you have the set of validators that uses proof-of-stake multi-sigs other things like that to validate a transaction from one chain to another chain and this solves the generalizability problem but
now you get into an issue where this is not trust minimize you have to actually trust the validators of this bridge and then you have another way you can do it which is a locally verified system so this means you have an off chain counter party that verifies from one to the other so if you want to bridge from let's say chain a to chain b you will run some kind of off chain client that verifies that the transaction was done on chain a and can be done on chain b so an example of this is like an atomic lock or a hash lock base bridge so these are these have been pretty popular in the past they're really good for like just transferring funds but the trade-off here is that they're not extensible so basically the bottom line is each of
these kinds of bridges comes with their own different sets of trade-offs uh that brings us to this thing called the interoperability trilemma as you know we're on the blockchain space so we love trilemmas so this is this is the trilemma that comes with interoperability you have on one side you have extensibility which means i i want to be able to compose my bridge with other smart contracts essentially make it like a d5 building block you have generalizability which means i want to be able to pace this bridge and connect to every single chain in the world and then you have trust minimization which obviously you want to be able to not have to trust some like some set of parties that you know doesn't have your best interests at heart
so you can see the different kinds of bridges that we've we've outlined before you have the mpc oracle validator bridge on one side you have the atomic lock base bridge which is the locally verified system on the other side and then you have light client relays which is the natively verified system so all of these different bridges unfortunately have trade-offs um so how do we solve this trilemma well there's a new kind of bridge design that has kind of become popular fairly recently and connex has kind of like written a lot about this so i'd really encourage you guys to look into some of the writing that we've done about this so this is an optimistically verified bridge so this system is slightly different because you have a message that's going from chain a to chain b and then this is not like an instant
system so before the message on chain b is determined valid you have a set of actors in the middle one of n that can prove fraud so they're not in charge of like holding funds or like you know they don't have any control over funds what they can do is they can basically pause the bridge if anything goes wrong and then this brings its own trade-off where it's not instant so now we go from a trilemma to a quadrilema which you know that that's annoying because you know you're just adding a new trade-off here but there is a solution for this as well so this is kind of like the the holy grail type solution so you have an optimistically verified bridge but in
the middle you have this little pink thing which is a liquidity provider so the liquidity provider can come in during the fraud period and basically like front run the fraud period to actually send the funds to the user on behalf of this optimistically verified bridge and so essentially the liquidity provider takes the lock-up period but the user does not have to experience any type of lock-up so with fast liquidity and optimistic bridging we can basically solve this quadrilema okay so this brings us to like hacks you know bridge hacks are kind of like the flavor of the month or the flavor of the past few months everyone is aware that bridges have been getting hacked left
and right i think what this shows mainly about our space is that bridges are a huge weak link in the system they're pretty new technology so they're like a huge honey pot of attacks um you know what i what i think is that like this is just new technology that is being experimented with still and it is a huge uh basically target and it's kind of going through a trial by fire process where blockchains themselves have been through this trial by fire process they're battle tested technology now bridges are kind of going through this trial by fire but with that said i think this optimistic version gives us a very good uh way to sort of like mitigate the effects of hacks and security because of this fraud proof window so like i said
you know you're going to have some time between message a and message b to actually do some kind of checks so these watchers in this fraud proof based system are looking for fraud but they can also look for other things like if you say some stable coin got d-pegged and you want to immediately like stop the bridge you can do that with this kind of like fraud period so the the watchers can check for more than just fraud they can check for suspicious activity and bring us to this thing called a circuit breaker so basically you can just like stop the bridge and stop the process and you can basically mitigate the risk of users losing funds liquidity providers losing funds and kind of this this whole like uh crazy consequences of these bridges being hacked
now we're going to get into developing zaps which is uh cross chain apps uh this you know going on this this whole x motif connects we have developed this new interface and this new paradigm called x-call so this is a low-level primitive to facilitate asset and or data transfer across arbitrary chains it's designed to mimic solidity's built-in call method the way we're approaching the developer experience for cross-chain applications is that we want it to be as easy as possible for developers to pick up and learn the process of cross-chain it's like it's you know what we've seen when we've gone to hackathons and we've
interviewed developers is like a lot of them are interested in the idea of cross chain but they find it really hard to wrap their head around what it means to actually develop a cross chain system uh so we're trying to make that as easy as possible by uh creating this new primitive that matches basically the built-in version of solidity so developers don't really have to learn anything new they can just kind of like augment what they already know in terms of like how to develop uh decentralized applications okay if we want to look at a little bit of code i apologize if this is small but this is basically the x call a primitive in action so as you can see what we're trying to show here is that this is a very simple
function signature it has a bunch of params in it and there's a single call so all you do is you initialize your connex handle or contract and you call xcall and the args in here are quite straightforward so i'll just go through some of them the two addresses who is going to receive the funds on the destination side call data this is something that's very important so what you can do is here is you can pass data through so if you say i want to call a contract on the destination side what you would do is you would encode the data so you can see we're just calling encode with selector then we're hashing the name of the function so this is the function signature hash so this is exactly what gets called in solidity
on the destination side so we're calling a function called update value it takes a you in 256 and it's calling it with some number we want to update it to then you have origin destination domain so this is just a encoding of what the chain you want to go to and from uh agent recovery so this is kind of just some uh like fallback parameters so in case the transaction fails on the receiver side then you have a way to like get the funds back for slow receive local these are kind of like not very important parameters that are kind of like advanced configuration parameters call back callback fee we'll get into this a little bit later this is also important and transacting asset id and amount so
basically what we've done is we've made it really easy to send funds across chain and also send data if you want so transacting asset id and amount are basically the token that you want to send so if you're saying you want to send like dd token on gorilla chain to mumbai chain which is what the origin destination domain are this is basically the signature you have here so what this is going to do is it's going to send this amount of this asset to the destination domain and as well as call this function so when we get into call data what i talk about data passing you have distinctive flavors of data so it's important to know that there's like two
different types of data when you're passing data there's a type of data that's called authenticated data this means the destination target needs to verify the origin source domain and address so you need to be able to verify on the destination chain that this came from a specific address on the origin chain for example if you're voting in a dow on chain b from chain a you need to know that the person on chain a actually voted in that dow so that's very important to verify that this came from the bridge so in this case that needs to come through this fraud proof window so you can't bypass the fraud proof window in this case
however there's another type of data called unauthenticated data this means this is like a meta transaction so the destination target does not need to verify the origin source domain or address so for example like and these these use cases are actually more than you might think so a swap a swap can be done by anyone it doesn't check message.sender if i want to deposit into ave i can say i want to deposit on behalf of somebody else so that doesn't check message.sender if i even want to like check that an eoa on chain a signed a message i don't need a message.sender i can just check a signature so this is an example these are all examples of things that can actually be done very quickly through a
liquidity provider so the whole key to this is that you don't know who is going to fulfill this transaction on the receiver side it's not going to be done through a bridge contract it's going to be done through an external actor who is a liquidity provider so because the data is not authenticated this could be done fast and you can see this little like pink guy there can instantly do this so if you want to essentially do like a cross chain swap where you swap usdc for like ethereum you can do that by doing this fast pass so it'll send the usdc through the bridge and then it'll swap it immediately through the liquidity provider calling a uniswap contract or something on the destination side um then you get into the thing about gas
so how are you going to pay for gas like we want essentially we want the system to be sustainable so we don't want to be doing gas subsidies a lot of other bridges do things like gas subsidies and things like that but this is not sustainable we want all the gas fees everything that everyone who is a relayer in the system or liquidity provider all their gas should basically be reimbursed by the user so that's one of the desired properties is that the user pays for all the gas fees another desired property is that the user does not need gas on the destination chain this is super important because we want this ux to be extremely abstracted basically our end goal at connext is that uh you don't even need to think about what chain
you're using like x apps dapps should be building cross chain systems that basically abstract the entire process of chain so you should say like i want to deposit from any chain do something on any other chain get the funds back on any other chain and like all that process should be handled by the bridge itself so the main point is that users don't need to have gas on any of these destination chains but at the same time we want to make sure that real layers are properly incentivized to submit these taxes so we don't like i said we don't want any kind of don't want any kind of subsidies or things that are not going to be really sustainable long term so this is kind of a complicated diagram here but we can walk through pretty
easily so on the origin side alice is going to pay for the gas fee on the origin chain in the native asset so for example this if the destin if the origin chain is polygon alice is going to add some extra polygon like in addition to what the transaction fee is for this transaction which is going to basically be locked on the side on the origin side as a claimable relayer fee then we go through the bridge the relayer who is the one who who does the fast liquidity stuff on the destination side will basically complete this transaction send it to the user on the end the end user on the destination side then once they
do that they will actually submit this proof back through the bridge so it goes back and then they are able to claim the real air fund so they prove that they send the transaction on the destination side and then they're ready to claim the funds on the sender side um this brings us to asynchronity so when you're doing cross-chain app development uh you can't assume synchronity anymore so what then what does that mean so blockchains are synchronous that means everything happens in one transaction it's an atomic transaction so either the entire transaction goes through or it doesn't so you don't have to like worry about anything and this gives us basically all the properties of blockchains that we like like you can do unit swap swaps the
reason uniswap works is because it's synchronous the reason flash loans work is because it's synchronous so when you're doing cross chain stuff you actually lose that synchrony and you have to kind of think about how you you're programming stuff very differently but the interesting part is that like we already do asynchronous programming everywhere so you know if you're a developer you're developing javascript you're developing anything on the internet with distributed systems you don't have synchronous environments you have basically you send a call somewhere you do some work with the with the callback essentially so you just send your call out and then it processes something later so this is a very common pattern in functions like java or in languages like javascript for example you have this dot then called so you do
some work which is an asynchronous process you have a callback that you attach to this uh function so now this dot then function gets called sometime in the future you don't know when but you you have some handler function written that can handle it when that happens okay so now if you want to do this same thing in a cross chain world it looks a little different so you have your origin chain you do some work on the origin chain then on the destination chain you will do some work back on the origin chain once that process actually happens on the destination chain so basically you're gonna like tell tell something to happen on the
destination chain and then you're gonna get the result of that back on the origin chain and that's basically how a cross-chain callback works so how does this work in connext like i mentioned before there was this callback parameter let me see if i can go back to this slide sorry i'm going to go back here i just want to make sure so we have these parameters called callback and callback fee so this callback if you set this you can set this to address this if you want this address to actually implement the callback sorry i should have included that in the parameters but there's a very simple way to basically set it so that you're going to get the result of the call that you make on the origin side from the destination side so
for example we're calling this function called update value if update value returned a result basically like a true or false or something whether or not it was updated then you would get the result of that on the callback address if you specify something other than address zero so in theory you would specify address this so let's go back here so then we have our xcall function which does some stuff and then we have callback so we just all we have to do is specify a function called callback and then we specify only promise router which means we're going to verify that this data is only going to come from the bridge and then we have some handler which call which you know in this contrived example all it does is update
the data on one smart contract with the result of the callback value so this is a very simple interface for implementing asynchronous solidity essentially and what are people building so you know i think this this kind of unlocks a really cool set of use cases for cross chain apps and we're starting to see now that there are more and more things that are being built with cross chain applications uh for example super fluid is a company that's building on connects they're building cross-chain money streams uh we have keeper which is building cross chain uniswap t-waps this is really important this is going to be like a d5 building block so essentially you have a uniswap t-wap which hap which
has liquidity on one chain but you want this price to be carried to other chains as well but you can't guarantee you have liquidity on these other chains you can only guarantee you have liquidity on the chain where you have liquidity so instead of you know fragmenting the liquidity and making the whole tiwab more unsafe you can just move the tiwa price from chain to chain um fuji jaw is another project we're working with they're doing cross-chain lending aggregators so like i said you know we want to be able to uh make the cross-chain process kind of completely abstracted from the user so that means users should be able to get yield from any chain they want without even thinking about what chain they're getting so fuji dao is helping make this happen nft hashi is another project we'll be
collaborating with they do multi-chain nfts so nfts are something that should be able to be on any chain without really worrying about you know which chain they're minted on so they're making this happen and dow govern is a really important thing so you want to be able to vote from one chain to down on another chain this is just something that should be there and should exist so why not um and then this brings us to like you know what we want to see next so we want to see builders taking this to the next level and really figuring out what the next applications of cross chain are so you know the world is basically the oyster at this point there's a lot of things we haven't even thought about here so cool thanks for listening everyone uh
you know these are the links here if you want to get more involved with connects please reach out to me if you have cross chain app ideas we'd love to talk about it and yeah if anybody has any questions happy to stick around answer or can find me later [Music] you
