Multi Dimensional Price Oracles by @Hundert1000

ETHDubai 2024 · April 2024 · 22:58

Filip Rogalski compares push and on-demand oracle models, examining update triggers, gas costs, cross-chain availability and feed selection. He discusses how these trade-offs affect applications built with rollup-as-a-service platforms.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

awesome hey everyone uh welcome few of you around here uh actually you might have seen on the agenda uh our co-founder Marchin uh but my name is Phillip and I'm here to replace Marchin as he couldn't make it here today and also since I'm not that technical person the topic is slightly changed instead of the U multi-dimensional price fits I'm supposed to talk about rollup as a service H and oracles and what the intersection between them so to kick things off uh I would love to introduce you Redstone a little uh for

those of you that are not familiar with us uh we've been around since 2022 uh our fer has been around in crypto for much longer obviously um but 2022 we announced our seed race with investors like Lem cup Maven 11 coinbase on the cup then in 2023 uh we announced another Angel round which was led by uh a lot of Builders um just to mention a few sandep uh Alex goosi as aing co-founder uh or Amin co-founder of avalanche uh were on our deck and you might notice that a lot of

these people that invested in us actually are building their own ecosystems that's because they understand the importance of oracles when you build out the new liar one or liar two chain again last year we launched our research arm and did a couple of uh very uh deep Dives and like very comprehensive reports and we did one on stable coins RW ybe products lsds and lerts uh and I believe like these deep Dives give you a broad like

comprehensive view of their particular topic but also like what's the intersection between oracles uh and the reaking for example um and our last alert report around 120k views uh we are still quite lean team and most of us live in waro Poland uh around 20 people uh and like 80% of them consist of actual Builders and developers uh in the space now to give you like a short intro um I think a good question is why do you need an oracle uh for your train so

basically oracles deliver data on chain for it to be used in smart contracts and now I really like this um short comparon of oracles being the internet connection for chains that are like computer that have computing power but they need the Internet plaque in order to be able to like do this the actual computation and like use this information farther and now in theory oracles can deliver onchain any kind of data uh so it can be like weather data election prediction markets Sports whatever um but due to a current culture uh of

crypto markets H naturally the most demanded data is the market data uh and that's what we actually focus on and I have a question to our audience if you guys have any idea what's the most utilized price feed through defi right now sorry yeah simple as that um if is this the most utilized feed that's simply because it's the asset present like pretty much all l1's l2s but also a lot of assets are actually denominated with in if so so if you have like LRT price feed or LSD price feeds they are usually um denominated in if and that's why the

if is quered like if responsible for 90% of the price fit queries now oracles have wide use cases uh in crypto but currently pretty much the whole dii uh or at least like most of the defi Primitives are reliant on oracles and just to name like a couple of different types of projects that rely on oracles those are usually lending markets like AA or Venus CDP stable coins like for example liquid or Prisma leverage protocols uh composable leverage gearbox uh or Delta Prime

derivative protocols uh synthetics or GMX yel protocols uh for example some famar enzyme extra Finance or aloric staes like M or FR finance and now the question to you guys can you come up with two D protocol types that doesn't require oracles just to whatever protocol that don't need oracles at all sorry exactly dexes are a perfect example uh they do have some intersection with oracles though uh

since dexes are a data source for most of oracles uh especially if you have like onchain native asset uh price feed um but yeah this is like one of the um one of the defi dabs that doesn't require oracles another one I really like is peer-to-peer Landing uh and I always like to give the blur blend example uh which is one of the few protocols that have sufficient liquidity while being Oracle less um and actually if you can build an oracle protocol Oracle as protocol uh while maintaining the capital efficiency then you probably should do that uh because it's always

like additional attack Vector uh but so far if you want to get the capital efficiency uh the highest one it's pretty much impossible um not to rely on price fits so why oracles matter so much for rollup as a service and basically if you're kickstarting the new ecosystem uh you need to have an oracle to have D5 present on your ecosystem and now with Ras uh it's very simple to spin up new chains you can the amount of time needed to create a new blockchain or like whole new uh liar and uh is like

moved from months or years two weeks or days and now what we can do uh as a rollup as a service Creator or as a rollup Creator you can go to chaining um uh ask them for deployment on your train but they will probably tell you um to Circle back to like talks with them in a couple of months the deployment will take pretty long time I mean don't get me wrong uh we uh truly believe the defi space wouldn't be here without chaining and they push forward uh a lot of great stuff uh and we're really thankful to them for this um but for like new ecosystems new Chains It's

pretty much impossible to get them on board in like any reasonable time and again question to the audience if you guys have any idea how many chains does currently chaining support you can just bet guess yeah that that's a close one uh actually they currently support around 13 uh from what I uh last time I checked uh but yeah that's pretty much the amount just to give you a little bit of the compression right now we are probably present on like 40 chains that are like actively growing and actively

developing probably 50 or 60 that are like present out there um and with current Ras we expect to give a couple new chains Integrations every month at least so now the question is why cannot chain link Deploy on all these new chains the key bottleneck is that onchain data storage cost uh is high and also every new integration requires much more additional monitoring and the key consideration is that you need to set up uh strict update conditions for any new feed you Deploy

on any new chain so that be harbit and deviation and now this is pretty important uh because if you implement oracles to your ecosystem there are a few models of data consumption that being push and pull oracles and now our like explain to you a little bit more about the differences differences between these two so the push Oracle model uh this is like the OG or like classic Model of data consumption it was introduced by trening in back in like 2019 2020 and there's like mostly popularized uh for the whole defi this is basically

the model where you set up lier infrastructure uh on Oracle end um set based conditions that be hardbeat and deviation so for example um every 0.5% deviation and 24-hour heartbeat you update if price on chain and constantly push the price on chain and the second model uh the pool model um works completely different so basically instead of deploying reler infrastructure and constantly pushing the prices on chain the data is stored offchain and is being pushed into the etm only when user makes transaction so only when data is

needed that's the moment when the gas is being paid and the data is being injected that allows for like higher fresh rate but also much more efficient way of consuming data now with push model um what's different is you have gas coverage and whole infrastructure coverage either on protocol or Oracle end that meaning like 24/7 monitoring needed and like additional steps uh and additional infra like lpcs for example needed um for this implementation while in pool model uh let's say user deposits into the protocol it's his transaction

that makes the price go on chain so he pays a little bit additional of gas uh but there is no gas cost recurring on Oracle end now in terms of cross chain uh scalability um if you like build new liar uh you naturally want to have at least a couple of Feats available like 10 is reasonable uh five at least is reasonable so with the push model for every single new feed you need to deploy a new piece of infrastructure uh which again gives you much more work and more costs uh with pool model uh you can maintain a lot of assets uh while not really like

deploying um a lot of riers or setting conditions for every single asset that's because it's automatically uh pushed on Chain by user transactions and again the second like uh the the the next condition which is the number of fets naturally in the push model it's limited uh with pool model it's much more versatile and much more flexible so you can have multiple data laying out there and just being injected on chain when the protocol close the data now to explain you how the standard push model Works basically the data is first being aggregated from data s

sources like data aggregators coin Geo coin market cap texes like for example binance okx C coin dexes like Unis swap Sushi swap wherever the liquidity is then node operators a data providers take out the data and push it into smart contracts on target chains then the data is read uh by dmart contract what's the problem with that model uh again it's non-callable across chain uh the cost of storing that data is expensive and you need to pay it even if you even if you um don't really need

that data at the moment and the number of assets you have is limited we like to uh really do this comparison of the push model uh to email so email was the first way of messaging is still used around and like it's still very good for some use cases but you currently have a lot of different ways of communicating like telegram Instagram whatever you use uh so we believe the push model is here to stay uh it will still be around and probably a good Feit for some types of DBS um but we believe the pool model will get more and more popular and more market share in the

time now what's the data flow with the pool model uh basically the first step is quite similar where you have the data sources and data provider nodes taking out the data but then the data is being injected into the middle layer um it's essentially like in our example uh stream of nodes offchain stream of nodes uh every single data provider that is allowing for on demand data has has this middle layer for example for piff it's piffet which is Solana Fork but they like own the whole supply of the tokens so it's like very cheap for them uh to

push the prices to their middle ler um and then the data is being pushed from the middle layer into the target chain through different ways so for example piff uses Wormhole for it which is a bridge uh for cross chain messaging another way of injecting data from the offchain component uh is through Liquidator pushing the price on chain so let's say user gets liquidated uh and Liquidator who liquidates his position for example on AA is pushing the data with his liquidation transaction or uh the way we actually implemented it is to piggyback user transaction and inject the data in the

call data uh of user transaction so basically when user interacts with the protocol in any way he pays a little bit more in gas and it's his transaction that is pushing the data from the middle ler into the Target l1's or l2s uh and you can like go to our showroom. redstone. finance where you can find like 40 different chain integration and just query the data out for yourself check out how it works so now like what's the main I would say conditions based on which you should pick your

Oracle provider uh for the for your new rollup so the main conditions are waiting time so how long does it take for the Oracle to deploy on your new chain and now again with push model it's much longer time with pool model it's usually much faster what's the cost uh again push model requires uh much more monitoring and infrastructure uh to be present on chain uh pool model is faster and cheaper but uh you also should be aware of the types of application that you want to bring to your ecosystem that's because like being transparent at least for now most of the

DBS are used to consuming data in the push model uh so usually when you build build out new ecosystem there are always a lot of new Forks coming in for example a Forks compound Forks whatsoever um or a lot of like if you like well established want to on board Blue Chip projects they also consume chaining on other chains and if they want to come to your chain they usually like to consume data the same push model way uh which basically means they don't want to adjust the code in order to be compatible with the pool model so when you pick and uh which type of the Oracle you're looking for you really should first look uh into how the ecosystem

landsape look like and what you're looking to have into your ecosystem now to give you some case studies um Manta Pacific um this is one of the uh Ras uh User it's basically a chain that was built on top of Caldera and first it used op stack currently is built on the ZM stack it got like very fast almost 1 billion tvl currently fell down a little but we're securing most of the assets out there another example is Lisk uh for ogis around here might be aware uh of the dinosaur coin that is currently might be getting another life

thanks to building a new L2 and they are going to do it with gelato and op stack and this like there is a trend of chains going into some tech stack and like moving to evm l2s that's because at least from what we've seen so far except for salana for example non evm chains don't really get much users and like tons of liquidity so we are expecting this trend to accelerate of a lot of old l1s moving into l2s uh using the actual Tex stack of the other provider so now I'm going to slowly wrap it up uh

and we have to like touch upon main Oracle parameters to keep in mind when you pick the Oracle provider so basically customiz ability is one of them uh if you can decide which data providers you want to utilize for the particular assets redundancy uh so what are the potential fail points for the Oracle to go down uh how does the compatibility looks like so if the Oracle is like fully cross chain fully even compatible um for us for example with EVMS is pretty much out of the box compatibility at least for most of them um number and types of data feeds available so how easy it is to add new

asset but also how easy it is to maintain the price fit this is another important factor if you have the onchain and offchain price sources so basically there are a lot of yel bearing tokens right now that are very onchain native and you have to have proper tools to aggregate the onchain liquidity and onchain Data Solutions in order to roll out the feeds for them another important factors are aggregation methodology so if it's robust against for example wash trading so if it's volume based or liquidity

based you have proper sleeper checks in place what were the historical mispricing manipulations um if you get any guarantee any kind of collateral that you can get if there is some damage within the Oracle pricing um how much you need to pay for the Oracle integration uh and for the maintenance and fundamentals like how does the governance economics all this looks like and probably like 100 other different aspects when choosing the Oracle now slowly wrapping it up uh I wanted to show you guys uh if Oro a little that's because a lot of our team

members currently live in waro and we're also involved uh in preparing the conference um so I think it's a very good time uh to come towards so and like if you need a good excuse I to visit Poland uh next September might be a good one and yeah that's pretty much it on my end uh if you guys have any questions feel free uh to ask me I'll be around pretty much for the whole day and thank you so much for coming [Applause]