New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Beyond the Oracle: Verifiable Off-Chain Computation with TEE & Quex - Aleksandr Bannikov | Quex

ETH Belgrade CommunityTue, Oct 7, 2025, 12:00 AM

Beyond the Oracle: Verifiable Off-Chain Computation with TEE & Quex - Aleksandr Bannikov | Quex

Transcript

So let's start. Hey everyone, uh my name is Alex. I'm a developer at Quax and today I'll tell you uh about our project product and how you can use it in your hackathon projects. Uh moment. Yeah.

Uh what question I want to cover today? Uh first one, what QuX is? Second uh what is trust execution environment? Uh the technology we utilize to uh build our solutions. And next one uh how uh can Qu be useful in your projects?

and I show you an example of its usage. Let's briefly start with uh what uh Quax is. Uh Quax is uh data transfer layer for web three uh solutions. It's based on trust execution environment technology uh which uh about which I will talk later. Uh two main cases uh of use quax is when you need to get an external data uh or you need to perform some heavy computations.

Um let's start with uh let's continue with what trust execution environment is. uh TE is uh hardware isolated uh environment which primarily designed for uh perform secure computation of uh sensitive data. uh two main thing you uh need to know about uh TE it uh ensure that no one even host owner that uh even even privilege user on the host uh couldn't interfere the execution process and couldn't get any sensitive data uh from this environment and when you communicate with uh this secure environ environment. You can be uh you can ensure that you can communicate with secure environment by uh procedure called remote attestation. You provide sign report of this environment and uh get information about code inside and stuff like this and it's uh provide full chain uh of trust to some root certificate from vendor.

Uh T is not uh uh theory things. It's uh uh has lots of uh usages in real world applications. Uh everyone has mobile phones and all biometrical data when we uh use our fingerprints to unlock our phones or our use face ID on Apple uh all this uh computation formed inside uh trust execution environment. uh second case uh where it can be useful it's confident confidential uh AI inference um you can uh it helps to protect both model and uh input data it can be helpful in cases like healthcare data where data is really sensitive and protected by government by law uh confidential cloud computing Uh so you can uh pro run uh sensitive workloads uh on untrusted uh infrastructure and what we are do uh in qu with this technology we uh create uh oracles for uh web three solutions uh to provide verifiable offchain computation uh and uh to provide also uh secure data transfer compared to other Oracle solutions. Uh with qu you need only one uh server to execute something.

You don't need some consensus mechanism or if compared to uh zero knowledge proves uh it's much faster. Its execution time uh almost uh the same as outside of trust execution environment. So it's pretty fast and it uh provides uh trust minimized uh result trust in qu uh utilize nowadays uh pretty modern uh technology called Intel trust domain exe extension uh compared to previous uh trust execution environment solutions uh techn uh this pro uh runs uh at virtual machine level. So it allows run whole virtual machine not uh some application and um what this provides to us we can run any uh legacy application inside trust uh inside the x we have uh full uh OS uh operation system support uh So richer tooling, better compatibility and to wrap this up uh uh it makes uh trust execution environments practical for real world world workloads. And next question I want to cover is why qu?

Uh today I'll talk uh about one possible usage of quax. It's about uh calling uh HTTPS APIs. And with qu you can uh call any HTTPS API uh not some preapproved feeds or handpicked in points. You can uh you can even call uh a credential protected API uh because um you can encrypt uh secrets and only particular instance of uh TDX will be able to decrypt this data and uh by design this data uh won't be uh leaked in any way. Um so you can get uh relevant clean data which is already uh to use on chain.

Uh so lots of web two APIs uh designed for front end not for smart contracts. Usually it provides duplic JSON objects and uh your smart contracts probably need only one or two fields from this. And with uh GQ uh processing language you uh we uh provide opportunity to uh format uh this data in the way you need in your smart contracts. And we also provides uh on demand or pool based uh models. So request callback model where uh where you can uh ask for data whenever you need it.

Uh not wasting gas for some periodical delivery of the data. And let's have a look at some example and get more familiar with Quax through this. Uh let's imagine for that for your product you need to get current Ethereum price and its change for the last 24 hours. uh to understand how to uh tackle this problem, let's uh firstly have a look at request life cycle in qu. So user or the app uh define defines request specification and create request.

Uh then uh relaying services of chain uh gets that particular request uh and put it into trust domain uh the instance of TE that uh securely process this data. Uh so trust domain uh call external API receive response uh transform uh this response in the way you need it and pack it with AB encoding put this uh data uh and sign this data which is most valuable part here. uh then return this data to relay service which put data back to Quax contracts and Quax contracts contracts uh verify this signage or verify that that particular trusted domain was uh authorized to perform this type of requests and return uh data to returns data to your the app. So, uh having this uh request cycle in mind, uh we can think of uh four step uh steps that uh we have to perform to uh solve our problem. First one, we need to define the data source.

Um so I we need to get Ethereum price and it changed for last 24 hours. uh one of the ways to get this data we can use uh coin API uh request uh we can see on the screen right now uh it's uh so what's what's interesting here we have few query parameters we have uh few headers one of which contains sensitive data it's calling API key um from this API we expect to get uh response like this. So it's an object containing uh one field Ethereum and which is an object also uh containing two fields price and price change. uh in this way uh it's not useful. It's not worth it to return data in this way to uh back on chain.

We need to transform this data to be more more suitable for onchain processing. For this we can use uh jq. Let's have a look at some simple example of uh GQ filter. Uh so we call uh we take uh fields Ethereum and we'll get here object of price and uh it change and we create from that particular object uh array of uh two values price and price change. We uh after applying this GQ filter to our response we will get um the following array.

It's array of two floating numbers. In this way we also uh can't uh move it back on chain because uh on chain we can work only with integer numbers. So let's modify our GQ a little bit. adds multipliers and rounding and after this change we uh can get an array of two integers. So we completed our first part.

We understand which request we want to make. we understand how post-process this response and we know which data we uh get back on chain after this processing. So let's move further and configure request specification uh and response call back uh in qu uh in qu uh combination of uh request itself post processing and call back we call flow. Uh our library provide uh flow builder. You need to specify uh two addresses uh of quore and uh request oracle pool.

Uh first first contract uh responsible for storing uh routing information and verifying uh responses. second uh responsible for storing um configuration of requests. We need we also need to provide uh cost and point of our API and we said that it's a get method. Then we need to add uh our query parameters. Uh we had three of them.

Uh one is Ethereum. So we want price of Ethereum to USD and we also want to uh include uh price change uh in our response and we adding uh this way parameters to our uh flow builder. Uh the same thing with uh header which doesn't contain sensitive data. We create a header and add it to uh our flow builder. A little bit more complicated with uh sensitive data.

So our API key to uh coin gecker. Uh firstly we need to encrypt this data with um trust domain public key. uh this public key can be found in our documentation and as well as uh addresses uh of qu contract and um Oracle pool contracts I mentioned before. So we encrypt uh this and adds to our uh flow builder. Also it's possible to add um encrypted uh query parameters, encrypted body and encrypted um path suffix.

So at this point we uh finished to uh transform all uh our request to this code. We defined path, we defined point, we defined uh get method query parameters and headers. Then we need to specify a filter. uh filter was shown before uh and we need to provide schema. So uh in our case we expect to get back to of two integers.

Uh so it's um shown here and next part we need to say where to put uh data back. So you need to provide uh your call back uh contract and your callback function and specify gas limit for uh this call back. Uh so at this steps we finished with uh configuring requests specification. Oh let me get back for one moment. Uh as a result we uh we receive flow ID.

This flow ID is reusable if you need to perform uh uh particular request multiple times uh or you can uh create uh flow ids any time you need to perform request both option are okay so let's move to the next part uh it's creating request uh to create request firstly you need to get uh request fee request fee contains of two parts uh Price in uh native tokens uh and price in gas fee mostly contains of um uh gas limit for callback you provided on the previous state and we need to calculate full request fee. It's uh sum of native fee and gas fee multiplied by current uh gas price. We need to create request uh put value for this and provide we need to create a request with particular flow ID. We also need to store some uh context of this request to be able to uh continue process of our uh of soling our problem. Uh so in this particular case, it's just some action ID uh related to this request, but it could be some different things too.

And let's move to the last part of this usage example. We need to process result. Uh as a result we will receive uh request ID. We will receive response and we will receive uh ID type. In our case it will be uh request ID because we use uh here uh request call back model.

Firstly, we need to uh ensure that uh this uh message this message sender is qu to be uh sure that data uh verified and uh you can trust them. Uh then you need to retrieve uh your request context. Ensure that you know about this request and how to process it. uh and um you need decode uh response value with two uh tpple of two integers we specified before. So we receive our price and we receive uh its change for last 24 hours and you need perform some logic that you uh for what you requested this data.

So that's it about uh our example. Let's move further. Oh yeah, bound slide. Marketing insisted that I have to read it aloud. I resisted.

I lost. So let's do it. Uh for the first u so we have three uh prizes. For the first place, we'll be awarded with uh 1,500 of Quax credits. uh second prize with uh a th00and and uh third prize will be 500.

So yeah and winners may have a chance to share their project to the qu media resources. We also invite winners to co marketing opportunities posts streams ama session etc. and let's have in touch and questions. Okay.

Yes. Yeah. Yeah.

Yes. It's it's a library uh that we provide in uh our interface repository.

Uh okay. uh right now uh we provide only uh options to communicate with HTTP requests but uh uh what I didn't say here to make it a little bit more simple uh qu is not only one oracle it's uh it's also the platform you can run uh uh some your code inside trust execution environment and uh move um all logic about verif verification of the result to qu and you can also come to us maybe you have some interesting ideas uh how to what's interesting can be built on these technologies and uh maybe JPC is also the case what to do it could be I don't know running AI models it could be some heavy computations so you can get lots of data from um onchain and process this. it's not necessary uh HTTP requests but right now we uh focused on we we provide only one uh example of this how to use this technology in

uh actually no uh nothing was deployed before so you uh create on chain whole specification of the of your request. So you you provide let me move a little.

Yeah.

So uh GQ is uh processing uh language. So you you let me move to GQ uh part. So what's written here? I need some Ethereum. Uh I need to create an array of uh two objects Ethereum USD and Ethereum USD 24-hour change.

Uh so GQ provides lots of options to how how you can transform your uh JSON. We support uh subsequence of uh this because um GQ provides a little bit more than we want. For example, you can get uh environment variables from this. It's not good to do it fully to support it fully. Uh but uh so it's a language how you transform your uh JSON.

Yeah.

Okay. Uh okay. Okay. One moment. So yeah here uh here an example filter is uh GQ is pretty big.

Uh I didn't specify this. So you uh when you create flow uh flow you provide alo u jq you want to uh execute on

uh yeah right now we uh so it's https request with jq postprocessing and uh I been calling Uh but once again you uh if you have some ideas of what else can be done on T technology you can uh wrap uh this into virtual machine and it could be run on this technology

uh right now yes uh but on this technology uh different parties could be uh participate Um

uh in uh we support only intux it's uh yeah you get uh reports uh register this trust domain inside our solution and uh show that to the world I use qu so uh to configure your request you need not uh uh some https request but some other dates. Uh so uh yeah it's it's possible uh yeah uh it's also uh possible that you uh so you you run your row own or pool and uh you have a monetization option so uh qu uh will initially uh reserve fund for request and then you'll get some part of this. Welcome. So any other question? Oh, we ran out of time.

Yeah. Okay. So, thank you. Thank you once again.

Automatic transcript — names and jargon may be misspelled.