Introducing web3:// - Decentralized Access Protocol for EVM
EthPrague 2024 · 2 Jun 2024 · 29:12
The web3:// access protocol turns a URL into an EVM call so a smart contract can serve content, aiming to remove dapp front ends' dependence on centralized servers, DNS and IPFS. It starts from NFT projects that pay heavily to store image data onchain yet still serve it through centralized token URIs, and shows gateways, a Firefox extension and a native browser prototype. Open problems include browser support, gateways flagged as malicious and EVM storage costs, which the speaker proposes to address with an Ethereum-aligned design that verifies off-chain storage.
Speakers
Topics
From EthPrague 2024, hosted by ETHPrague.
Transcript
[Music] hello everyone uh it's my great pleasure here to present uh the web as protocol for uh e machine so um my name is chi and couple of create for myself I've been working in this space for six years before that I was a software engineer I'm in big companies and got a PhD my primary interest is in uh infrastructure
uh and Al uh for example e l to and data availability Technologies and also re couple of Grants and uh from EF and op like op um so today I'm going to give a intro of a access protocol so uh what is rep stre access protocol it is it's is an e uh Native protocol that designed to translate uh URL that is started with web 3 scheme into a EVN call if you're familiar with e IPC call there called is a call that's able to call the etherum watch machine in a simulated way so that we can access the
corresponding uh result of the transactions um and we G basically pushing this transaction into the etherum consensus Network and why we want to do so is that we are able to using the power of the smart contract that is uh transparent programmability and then allow to implement much more advanced feature besides current protocol for a lot of D apps uh especially the front end of the D apps right now is heavily relied on centralized components including centralized servers IP and also uh the DNS so basically we want the evbm is
able to us in this protocol so that it can be run as a decentralized Unstoppable HTTP server and so that you can not only be able to serve the for example Unis swap swap logic but able to host for for example maybe Tado cash for and it may maybe uh Unis foram but all the things now hosted on top of ethereum smart contract so it is already being um uh registered as a internet Authority scheme and also it has been its early version which which is 4804 is already finalized in uh ethereum ERC Ripple
so why we want to have this kind of like protocol to access ethereum onchain data one observation or one Trend that we observe is that with the eum scalability r m there will be more and more data that can be accessed on top of etherum either layer one or Layer Two in the evm way so for example right now etherum just launched their data availability uh uh in upgrade that is EIP 4844 of two two months ago and the future upgrade of The Da will allow to publish 80 terabytes of ta data per year on top of
ethereum that is a considerable amount of data that can be accessed from ethereum and it right now is mostly at layer to transactions but in the future you can easily to use it to for example L image or be able to use it to like host a personal blog Des Center Social Network all kinds of new types of transactions are now available on top of etherum with this scal Ro map and here even without the SC rap a couple of the projects are already published their data for example M mft images that is on top of AUM so
all this m projects like for example cyber blockers MERS I don't have any cyber blockers but I just just surprised found that they pay a large amount of money to store this SVG metadata on top of ether so that now you can read this data using smart contract course so that it returns kind of like SVG XML or this content on top of ethereum network for every node and this is a The Narrative is that the when the user buy the token of M it should not only just buy the token smart contract and token ID but also the corresponding asset the images should be
also own and available together with the smart contract because in the early stage when people buy a lot of mft they using centralized servers to host this data like images it can be using ipfs you can use HTTP server and but when after a couple years if nobody would like to support this project and all the data just disappear this breaks the rule of etherum a philosophy of ethereum is that deploy once runs forever but now I by the nity after maybe two years if somebody do not run this server sorry you cannot find
images you just have a token contract and via the token contract and then some token ID that's it and so those projects they follow the E philosophy so now I want to deploy ones access forever and they pay about 10 million US dollar per gigabytes in order to follow the this philosophy and so I was pretty impressed because they put so much effort so much cost to to realize that and then I take a look at all these projects and found the one one is called token URI that returns where the images can be
retrieved and I'm I'm quite quite surprised to found that even though all this data for example I can call this data using smart contract to return all this images like bit Maps or in whatever format they're still using centralized servers to hold this images I say uh why because this is no such a protocol to directly access those content on top of ethereum and display in the front end so for example they still need to using some ative server but we now you are using web asess protocol we are able
to Define hey this is their smart contract this is their inss address I want to call the random method of the smart contract and associate with this token then it will directly translate this URL into es call message and call into the evm and return these images and later you can find that you can use a Gateway or any approaches for example we have a native browser just so just type this thing then it will automatically show all those images fully on chain and so in this way we can bypass any centralized party even DNS which is
managed by a few rot servers and also HTTP server and other services like ipfs because ipfs is not guarantee the data is available as the same as ethereum and so this is my original motivation that why we need this kind of protocol to help to grow to enable more effent applications so how to use web URL first of all is highly inspired by HTTP so a lot of ideas MIM all this HTTP request response all these concept are retained in a
protocol but when major difference is that instead of using a centralized IP address or its DNS name it use a decentralized Smart contract it can be usings you can also using ZX contract so that you can using this single single link we can locate our dous resources that is on top ethereum and also multi-chain supporting which means I can locate on Main data that is chain id1 I can also locate any Layer Two or even other layer one EVN compatible chains and second is that there's a way to
translate the basically the the query part or the the rest part that is the domain specific location of resources into a core data that is supplied in the E core so that I can tell the contract hey the user would like to access the balance of Zuckerberg or balance of retoric or I want to access the images of some mmt images with its token ID so um everything here is now very similar to http except that everything now is now using more decentralized smart contract to host all this corresponding
logic um so to access the data right now we have the Gateway so that you can replace the corresponding ens domain all the address like ZX 20 HX using the gateway to supply as a subdomain so that now you are able to access those contain the Gateway will automatically convert those URL into a e call message and call a smart contract return the content from the front end and we also have multi multichain Gateway and a Firefox extension which allow users to type web stre come come
something automatically translate to a Gateway link so the users just paste their dis link and access all this content but still this is uh kind of like the sitting in the middle of web 2 and three we call Web 2.5 way to access this data and thanks to our community developers they just volunteer developer some fancy really cool ideas one idea is to develop a native browser so it's pretty like in early stage you see it has just a couple tabs without a lot of features of modern browsers but anyone you can just type web stre and with the link then it will
automatically translate it into ether code and retrieve the data and return from the front end this is example that we upload 100 GB megabytes of the Vitality block on top of AUM uh is on a layer two because layer one is too expensive but now that V can now can maintain its website within using ethereum um so that like he does not rely on any part third party services so uh one example now we are working on is to to onchain nft images right now even though the nft images is
not so hype at this moment but I think this is really great example is sp there are couple of mfts they already upload all this data on top of eum so we Implement a smart contract follow the Stander tells that hey if you call a random method or random blocker method with the token ID then we will return a string that tells how the how the uh images looks like is in the format of SVG and so that we can access those images directly without any Sur Services following the M protocol and another thing is metonic block
so uh oh at that time there about 40 megabytes right now I think it's about 100 probably I have some duplicate something but yeah at that time we upload 40 megab of data and because of ethereum is too expensive so we using Opa and so as experiment to see how we are able to pull a large number of data like megabytes of data but high value data on top e and access in a fully decentralized way and there's a couple of the crazy ideas that's fine flying around for example uh build a decentralize maybe Tik Tok a build decentralized GitHub build decentralized
prce uh one example is like decentralized GitHub why because we found the torado cash public rppo is being frozen even though it still uh be accessible because the Second Amendment of the uh United States uh Constitution but it's not able to modify or develop on top of the B because of sanction from the US government and consider extreme cases that maybe ethereum go e may be also sanction because like a transaction it process Alo many transactions how we are able to like circum all those centralized attack and one idea that is this extreme
cases then why not we Implement uh decentralized Gates on top of ethereum most likely in a layer two so that now we are able to developer etherum on top of etherum so this is something we we envision that we are able to I mean as a one indicator of the maturity that's we believe that we should everything can be self contained we may using some centralized server to accelerate this procedure but there will be the ultimate data that can be access using um this way and also following on the autopa E SC map and so right now we are we have
developed this Pro uh this protocol for about 2 and a half years there are a lot of interesting idea flying around people are developing uh all all kinds of crazy uh features and but there's still some issues that we are facing and definitely welcome everybody can help us to solve this problem uh one feature is like modern native browser supports uh for example uh we are working with one of the top power browsers to uh support this um uh standard and and uh especially some of browsers like Google Chrome has really really strict about how to support new protocol like uh ipfs or web3 into their native browser um so
we still need a lot of efforts to make it happen and this may also need some help from EF uh to uh make it happen and another thing is like um as we we have running the Gateway but we now someone maliciously report us and so when people sometimes type in maybe in different fireworks May classify as uh the SE website um so definitely we have put a lot of effort to fight back and fix these problems but as still uh some of the fireworks like kapasi is really spons slowly so I'm not sure they fix this problem or not but
they will be a different uh I think this is the situation of the wild world so um that's something that we experience another thing is like the storage issue on evm the main rasm is because the right now evm is super super expensive to store any pieces to data so the price is about 10 million per gigabytes right now can be even more because if the price increases these days which means that suppose we want some applications that can serve of users or maybe just one million of users it will be unac acceptable because the cost is so high and TP is so low so the situation the solution is generally following the ethereum ler to
approach uh both in terms of computation at the same time in terms of the storage that's why we are building the HDH storage which is ethereum uh align S Storage Solutions so that we are able to use an etherum to verify offchain storage for following similar row approach and using e da as a way to publish data there are a lot of extensions couple of erc's uh both uh for example we can use a Smart contract to standardize a file system interface so that now we are able to be able to use a Smart contract to Mark the our file system and synchronize among them um so that it will be easy to for example
create a jawbox on top of the is storage by managed by SM contract and we we are also running on couple standards for example supporting uh enss uh we create a field called content contract versus content hash that right now for ipfs so it tells what is which contract is responsible for returning web stre content uh in the inss uh mapping uh there's also a couple of others like for example support more customized HTTP features because HTTP has uh developed for about couple decades it has a lot of new features that's Incorporated especially there's a new http2 and there's a for example streaming protocol a lot of things now
uh has to be need to consider rather than a simple HTTP G uh request response um so that's all today's talk and really happy to answer any questions thank you very much [Applause] sorry thank you thank you so much it's really cool initiative um I wonder like it seems like the address doesn't come with the chain ID so I wonder like what what would the response uh look like uh I mean if if if it has and I haven't
seen oh there was chain IDE yeah but how does the response look like uh when for example you have you have unsupported change from the Gateway um that's the first question and the second question is about the the G this Gateway provider it seems like right now there's one gate Prov uh Gateway provider like is there going to be any mechanism for incentivization of this gateways because they are going to be spam by all these all these requests um yeah I have other questions but I'll just reach out later that's great um so first question is regarding how we support this multi chain right different chain ID um it's pretty simple it's just like for example have a list of the chain ID it's similar
to metamask right so I just configurate H chain ID and is bonding uh s IPC service configuring in right now the Gateway or in the for example uh right now is the using the uh evm browser it also has a list list of default uh IPC service so that you can just know that which chain ID is maps to which uh IPC and call and definitely in the future we want want to have all this to be uh decentralized one way or first is not decentralized first is probably called verifi verifiable so that the content that return from the front end we can verify is really from the smart contract and for that direction we are working with Halos which is like cine of
ethereum so that we are able to uh verify any content that is returned from ISO make sure that this is actually returned from the lat latest block of air and another way to enable fully decentral access is using ethereum protal network which are closely working with the E prot worker team so then now we are able to using our etherum prot Network to it is kind of like ipfs but every data is verifiable use on top of e theum so that now we are able to access all this content uh in a fully verified way and decentralized way um so but for that cases it would be much harder to support multichain because right now Pro
Network only support minut net um so this is current uh status of supporting different chains uh for the second question uh what's the question is about the the gateways different gateways gateways the Gateway is open source everybody can contribute to it everybody is uh able to play with it uh we may have to have some uh Grant to the uh to people who are able to maintain is personal gway for example ipfs has e do eth do Nemo and e. link and so we may offer some some kind of Grant maybe small but sufficient to uh to be able to set up and experiment all this feature
or something new things on top of that and also perhaps we've also help from E Foundation um so there's some some program that we are uh initiating if you're interested in it feel free to contact me and then we can have some early grant program um so that we have some basic support thank you for the talk you showed the slide where you showed the different browsers which you are in contact with uh Chrome and so on I wonder that I mean wouldn't it make sense to go talk to Brave I mean they have uh General ipfs support and yeah sounds like that it would be obvious is
yeah yeah that's definitely I been uh from crypto native perspective Brave is really canand I really should add one One logo that uh so one thing is like probably uh how to connect with brave uh in a more like organic Community way and then so that we can co- build these things is one probably way to to question uh so right now we are more kind of like uh prioritized how to enable the underlying infrastructure because like once we have more applications onchain application using web for example fully onchain gaming or fully unchain Social Network all these ideas C ideas being running on top of
that it will be much easier to develop this kind collaborations with the browsers because people have more Dem mind on verif way native way to access this data rather than using our Gateway or any Gateway that everybody can run and I think that would be the kind of like a good timing to say hey we really make need to have you guys to help us to enable this but definitely if you have any suggestions or connection to help to accelerate this procedure we're welcome to contact me and we would love to see how we are able to explore all this together thank you uh thanks for your talk um you
you're you're clearly pretty inspired by this project you're working on I was wondering what what what's the most um powerful use case you imagine using all this technology for when you're working on this like is is there one thing or or some things that inspire you as an image of of how this could play out in the future um so I think um the thing is like uh I think the web three as Chris Dixon wrote a book is re write on so ref free is something that enables ownership of everybody but ownership is now uh I would say is just partially reli
realized by the uh by the network and so I think for those new applications they require like higher level of ownership for examp images or higher level of ownership my social identity uh with my connections like for example FASA is working towards that direction I think we be other interesting applications that web access protocol will enable and definitely it's open protocol so everybody can experiment all these ideas so that um to especially to inspire people to think about what kind of ownership we want and what kind of maybe for example ethereum like deenal
as G that tells the the ownership of the code right now it's still most of code host it a custodian by the GitHub it's possible that we Host this code also on top of the ethereum so that we can own not only like fix images but also our code or of my trees all these things so there are a lot of open questions that flying around but thanks to scal ro map this is become uh it's becoming possible right now is before it's just like insane right nobody would like to pay 10 Millions per Gaby data but right now suppose we can reduce to one to the
1,000 or 1 to the 10,000 or 1 to 1 million then everything is possible probably last question yeah from what you're working what do you think is the best um yes I think uh right now in my opinion uh definitely if you have a lot of eer that and definitely you can use A1 but paying a lot of money but more practical way uh I would say is to using uh Le and especially uh ethereum uh all this data will published on top of ethereum layer one and then now you can
use in Layer Two so they will make make a copy of data and much much lower cost um um yeah that's the I think really uh also easy going way because all layer to now is fully compatible with evm um I think this is one down One Direction and suppose I would like to store um those like low value versus the the this are called values of data per bit and for those data that may be uh relative low and there's a also a couple couple of other solution of f coin RV um but it is not so if they Al line right uh it's out of ethereum protocol and
there's no way on top of e e is able to verify the data is being stored of chain um so that's why I feel there's a huge gap there and that's why we are like to go through this e offchain storage approach to solve this problem yeah for is a storage I have a talk yesterday so feel free to maybe go to the ISA pra there's a streaming and that will tell how technically we solve try to solve this problem [Applause] [Music]