DappCon 2023: Offchain Computation: Problems, Reality & A Trustless Solution - Zoé Meckbach

DappCon 2023 · September 2023 · 17:42

At DappCon 2023, Zoé Meckbach presents a talk titled 'Offchain Computation: Problems, Reality & A Trustless Solution,' part of the event's privacy track. Offchain computation refers to performing computational work outside a blockchain's base layer, then submitting only a result or proof on-chain.

Speakers

Topics

From DappCon 2023, hosted by Dappcon Berlin.

Transcript

thank you so much yeah great to be here hello everyone um I actually thought about it today I drive quite a lot and speak at different stages around the globe but it's my first time at Decon this year in my hometown berin so it's very great to be here and to share some of my knowledge or the knowledge that we develop and have acquired at Falla Network about offchain computation I'm Zoe I'm VP of growth um and partner at Fara Network and we provide in off or decentralized offchain computation infrastructure the title is problems reality and a trustless solution I don't I won't go too deep into like all the problems um but of course there are some

things that we can improve in repb 3 specifically when we talk about computation for depths backend Services as well as when it comes to offchain computation and as we all know smart contracts are a very important component in our web 3 Tex deck but we at Fara have to teach us that smart contracts are not really smart without connectivity and connectivity in terms of actually reading information from the offchain world and the onchain world but onchain or what is actually offchain we Define it in different terms because if you look at like different chains like polygon to or E from ethereum to polygon would polygon also

an offchain Network right it would be offchain uh from polygon to arbitrum is also an off chain connection however all of these platforms are trustless platforms or protocols so the question is or what we are trying to solve and look into is how we can actually connect these trustless Platforms in an offchain um or with an offchain solution and to explore this a bit further I don't know if you guys have heard about the fat protocol yeah some of you cool we actually got very inspired by the by by the name and the protocol you will find out later why um and I would like to deep a bit into this this a nice visualization that shows the initial web

we call it web 2 right where the value captured or also created is mainly on the application layer we have fed applications or Rich applications and a very thin protocol layer now in web 3 when we started to implement blockchain in the overall internet text deck we actually turned the page right and we have now value capture or value creation on the protocol layer but with this is coming also that we have quite thin applications so we have a Fed protocol and thin applications we now said okay or if we go deeper into the application there in web 3 where we have fed prot fed protocols but in applications what about

the smart contracts that are important component of these applications and if you look into most of the depths most of you guys are Builders I guess they also develop you develop your own depths we actually have very thin contracts at the moment but a very fat or Rich back end and fat in this case that most of the back ends are still hosted in a centralized way so we have a lot of computation um storage right on the centralized of provide provided by centralized uh backend providers and then a very thin contract that runs on chain which is also okay because we don't want to make the blockchain also too fat so but how would it be if we actually have

fat contracts so adep could be actually more rich or actually better could create more use cases if we provide fat contracts at a thin back end so we had father say okay to create this we need to upgrade the smart contracts and create smart contracts with verifiable computation so we can actually lean or make this this back end small or thinner and have the fat contract that actually dedicates or communicates with the depths more Rich so we say okay we need two things to actually create this verifiable computation or make this the smart contracts thicker or fat um the one

thing is ADD connectivity at the moment smart contracts don't really or they lack a little bit of connectivity they cannot con communicate with the internet um how about adding connectivity so your smart contract can send https request and you can talk to any web2 API or any Internet Protocol in in the web 2 world and the second part that we also need is to verifyable computation computation is super important but it as we just learned it's mainly uh provided by centralized services and we can verify maybe or we can verify the computation in an offchain world but uh Cent this information of uh safeties proof in on

the chain and this is what we have developed at Fara Network um and we call it fat contract that's where the inspiration comes from the from the fat protocol so it's um we actually adjusted it with the pH so it fits into our branding with FAA this is a contract uh we call it an offchain programming model that is run on our own infrastructure on our own desized computation infrastructure and fed contract because it's a contract that's richer than a smart contract we also like to say it can actually make smart contracts even smarter so what can this fed contract actually do or provide especially for us

Deb Builders the killer feature so to say is the internet connectivity this contract is mainly runs in our offchain Network and we actually have uh interesting architecture I will show it in a in a minute where we can provide secure verification um not Direct on our chain but in a separate layer based on this because we provide most of this commutation of this contract in an offchain environment we can easily communicate with web2 apis or Internet protocols via https requests Omni chain connectivity um very important right we want to communicate with several chains or have this this contract actually not deciding if it's based on evm or maybe also communicates

with the sub straight chain or similar so we can easily use our internet connectivity to to directly launch or connect to any RPC node on on any chain functions feature is very nice because this contract actually on a very low level is um written in Rust however we can we are evm compatible but not too many developers like this language so we said okay we abstract all of this and you can actually um modify or customize fed contract in JavaScript and the fourth benefit is the verifiable computation So based on the architecture we can verify any information in the contract before we actually send this on chain what can we do with fed contract

we are working very closely with the web social environment uh specifically with lens who are who's using lens lensar cool very good very cool protocol and a cool team also we have developed a use case called yeah uh web3 social actually the lens API Oracle lens has an API also in SDK you know this API however is not decentralized the web 2 API and the dep developers that want to communicate or send this information into their polygon smart contracts can't do this they do their own hand rolled up oracles or whatever so we created the lens AP Oracle which runs on our contract and

here's just an example what this Oracle or this solution can do it's more like a yeah in intent or a connection if you say if you have followed this profile then you can then we can actually verify or see that you get rewarded in mtic um if you have mirrored a specific post then you can be whitelisted so it's a if then connection that we can verify in the contract before you actually execute it in the polygon smart contract yeah I didn't want to do a live demo so I just put some screenshots here from our U of the UI um what I want to show with this is that we put a lot of effort thoughts and love if you want to

say so into the uh the UI and the developer experience this is actually how you use the lens AP Oracle almost no code or if you want to say low code um UI um we have here the infrastructure just for this use case you can pick the profile that you want to um yeah work with on the left hand side you have the API data from the lens API and you can customize it um in the Jason Parts below as well then you can review everything and then actually you directly deploy this kind of Oracle uh we use a stake to compute model because we have the commutation in the back end you at the moment still need a bit of our own uh Native token Which is far and you stake

this to actually execute this contract but whenever you decide to not use the the service anymore you can unstake and you have actually kind of recompute so in summary we want to um or with this use case we actually motivate or incentivize developers in the in the lens ecosystem to deploy their own Oracle in almost 5 minutes they pick what they need they customize it uh and they deploy it fed contract is this contract that executes everything what I just explained in the back end and the lens API orle what I what is this use casee is specific blueprint so we wanted to abstract it a bit and say okay we are building blueprints or want to inspire

developers to build their own blueprints with it and another use case or another blueprint that we have built is fat contract plus yeah a AI we just heard the nice uh the nice speech also about the combination and we build a web 3 AI agent actually at East Global in Paris more the engineering team than that myself but it was a very cool experience because we wanted to Showcase how fat contract can combine or how we can combine the offchain computation with the AI part this is our product we developed there it's called Smart Cookie and it's actually Brower extension that helps you or refers you provides you

information based on your activity in your web browser but focus on web 3 um applications this is actually how it works so it's a Chrome extension um it runs on fed contract and what is does it recommends you specific activities if you go back for example you like or you buy an nft collection on on openc then you open maybe lar and then you get the recommendation to follow the specific artist that you just bought the the um the nftd collection from or you own a specific token and then you also open your application on lens and then you say hey do you want to follow this person this leader it's actually his company that you just bought tokens

from yeah and here just again that you see um we integrated also the different Tex STS air stack for the for the API request lens and communicate there through https request that comes from fed contract and fed contract runs on our own blockchain network yeah the actually the first announcement or I announcing the first we are launching in two weeks soon fed contract 2.0 um which is just a little upgrade in terms of like adding more features to the overall key features of fed contract itself um the main feature that we adding is actually kind of like a functions functionality meaning that we expanded the contract that you able to

call any web2 API and push it directly in any kind of smart contract with the lens API Oracle we were focused on the lens API now we actually broaden up and with the launch we I think we have around five apis already that developers can choose and select and there will be added more so you can directly pick and choose the API configure what you want to read from the API and we push it through our fed contract into your smart contract yeah so this is uh the most important part actually so it's nice and cool to hear about fed contract but how does it work in the back end why can we actually provide this verifiable computation this is our pretty Innovative I like like to say

infrastructure do we have a L1 L1 which is our own blockchain and the cool part is that we separate the consensus on the blockchain from the actual comp from the computation so consensus is separated from the computation part the computation is represented by the black yeah by the black layer and this is the part where most of the contract also runs but it's hosted or secured by secure workers so every everything that's executed in this layer can be verified and then we just push the proof on chain the fact that we have this commutation part of chain we can easily connect to any evm substrate chain or whatever so this is actually the magic how we can offer this fat contract that

communicates um offchain in a secure way yeah and if you haven't heard about F Network before now you actually know what we are doing to put this into perspective we are actually the biggest web 3 Cloud completely decentralized we have almost 200,000 virtual CPU up and running we don't own any of these nodes or servers this is all Community run we have a pretty attractive uh tokenomics to incentivize all the note providers to provide their CPU D cpos they are secured by the online workers and then some more numbers on Cross chain transactions and onchain accounts and that's it and that's it from my side um yeah happy to answer

some questions thank you so much thank you very much so for that wonderful talk um so if anyone has any questions feel free to raise your hands yes you sir hi uh thanks for the talk could you elaborate a little bit on the verifiable part on what exactly do you mean by verifiable computation and what techniques do you use is it like trusted Computing modules like sjx or some cryptographic techniques or what is it yes everything you said no so as you as you saw on the infrastructure part um the offchain part is secure enclaves it is based on sgx on trusted execution

environments so every every node operator needs to secure or needs to provide an sgx node right we cannot use any other technology or Hardware um and we have implemented like a performance test that we can ensure that these nodes are also uh that they perform good and the slashing mechanism in case they are up or down to actually ensure that they also execute what they in a in a good way right that these are good nodes um based on this because it's based on sgx we can actually verify but if your only W host is off chain you don't have to proof because no one can access an sgx Hardware which is the good thing so that's why we have our L1 to send the proof to the chain and then you can have the you can verify with the proof on on chain

yes did you have your hands hand oh yes just um I guess I'm assuming this kind of works in a completely open way since it's decentralized so there's no privacy preservation right are you guys uh trying to tackle that problem privacy yes and like nobody can e drop into the computation itself yeah actually if you're we we actually just rebranded our old um website actually said the Privacy compute protocol um we we provide this privacy right through through the architecture we just don't position it

exactly like this because we found out that the more interesting part for the dep developers is this automation contract the FED contract with privacy included right they get it just addon if this answers your question or what prot dat yeah I mean if you look into the architecture it's set up with the Privacy Focus right it's a privacy computation actually architecture but we are not we yeah because there are other architectures now with DK coming up right and people discuss okay ZK or te like um we we

don't uh promote it as this privacy but it is set up and architectured with a privacy intent if this okay anyone else with questions then I guess that wraps it up uh so yeah thank you again Zoe mback give a big round of applause