Economic Security for Oracles: Quantifying the Oracle Problem

Blockchain Oracle Summit Bangkok 2024 · 11 Nov 2024 · 14:42

At the Blockchain Oracle Summit in Bangkok, Nate of Token Dynamics recasts the oracle problem as moving data between systems with different economic security assumptions. He proposes one measure, cryptoeconomic authority, meaning the cost of changing a piece of data, and applies it to Bitcoin, a simple proof-of-stake oracle, Tellor's challenge period and Chronicle's signer set. The Bonq exploit shows what happens when a protocol skips an oracle's dispute window. His rule for DeFi money legos is that no layer should demand more security than the one beneath it provides, and he warns against valuing staked tokens at their last traded price.

Speakers

Topics

From Blockchain Oracle Summit Bangkok 2024, hosted by Stable Summit.

Transcript

all right cool yeah so my name's Nate I'm going to be speaking about quantifying the Oracle problem introducing a metric that we use at token dynamics that I think is going to be helpful for all of you in thinking through problems related to Oracle security and fundamentally the security of the data that is behind that is coming from oracles and uh we're going to be thinking about talking through the value that underlies that data um so my name is Nate I'm the of token Dynamics we're a protocol design firm and uh we have a on economic security and on to a token Let's see we got some you guys good on the mics all right great so uh with that I want to introduce the Oracle

problem so I'm a little wary of doing this at a conference on oracles um first of all the meme you see on the right is not the fundamental Oracle problem that we're talking about um people typically conceptual as the um how to get web 2 Data or data from outside of web 3 on chain and I want to reframe that a little bit and talk about the ways that we try to get data to interoperate between systems with fundamentally different security namely Economic Security assumptions and so uh talking about Economic Security this is uh where technical security as a lack of bugs in the code Economic Security you can think of as a lack of

bugs in the incentive and so uh the functional definition of an economic vulnerability is uh something like no matter how you code and develop the application it's still going to blow up because there are fundamental misalignments in the design phase rather than the implementation and typically all economic vulnerabilities come from a way to profit change append or um omitting data that should be there and to do this we're going to put all of the uh value in that sort of the variables behind this data the economic value that is backing it into like

terms all right we're going to switch over to a mic here a little better um so we're going to talk about how to put this into like terms so you can do useful calculations with this value and calculate how secure a given piece of data is or how much trust you should put into it so this term we call cryptoeconomic Authority this is the quantifiable amount of trust behind any given piece of data on a blockchain and everything can be reduced to the cost that it takes to change that piece of data um so like I said aen transform withhold these are the few ways that you can change data on a blockchain and you can quantify exactly how much this is for anything

that lives on chain you can approximate it for things things that are offchain and you can sort of use proxies to calculate what this might be to get a a range a band of how secure a piece of data might be or how much trust you can put into it so the first example I want to use is just going back to the basics with Bitcoin U the security and the trustworthiness of a given transaction on bitcoin is proportional to how much hash power has gone into it nominally but there's also other factors there are the cost of the as6 and how much value those as6 would lose if people were to double spend if miners on BTC were to double spend the value of their A6 goes

down so note this is not the same for chains that are Forks like bsv bsv has been reorg a bunch of times as far as I know no one sold their Bitcoin because of it and so this is part of the calculation of crypto economic Authority on the Bitcoin chain the longer the blockchain gets the more secur the past transactions and uh you can also think of the future cash flows that the miners would expect all of these three things the electricity for hashing the Asic value and the future cash flows of the businesses are considerations in the cryptoeconomic authority of a given transaction and uh this works when BTC is the only asset but it starts to break

down when you have exogenous assets that are bridgeable out of the chain so uh for example tether used to be on bitcoin you can imagine a profitable double spend where someone double spends a billion dollars of tether that's checked by the exchanges actually doing these types of calculations to figure out how many blocks deep they're willing to confirm and say a transaction is final but ultimately that is a calculation that everybody who interoperates with a bridge is making or should be making uh is making or not to their detriment and so so the second example I want to go with here is just a a basic like implementation of an oracle like a naive proof of stake system so you can

imagine a system where one Oracle is randomly selected and they all stake about the same uh this was for the World Series Baseball Los Angeles Dodgers versus New York Yankees earlier this year and uh if you get a randomly selected Oracle to report on this you can only be as sure of their reporting as they have stake in the system so the value of their stake can't be any less than the value of the bets that they're reporting on otherwise they're likely to you know there's an there's a moral hazard there there's an economic security vulnerability so super basic example but just to illustrate the point before going into an actual

vulnerability this is an oracle exploit that you all might remember um bonow was a stable coin protocol and uh they had a reporting through tor and they had an improper implementation of telor where they didn't use tor's time delay and challenge period to augment the CA and I'll talk about that in a sec but basically the attacker who was probably an Insider staked $180 of trib to changed the price of one of the collateral assets uh they made it $13 billion and then they took all of the treasury they the protocol lost something like 13 billion there was some contagion there with the asset or uh 13 million there was some contagion there with the assets and the attacker netted

$1.7 million just for $180 investment so this is one of my favorite economic vulnerabilities that's happened in the past um also the name just the memes you know it's it it all tied together really well um and so if you reduce this to numbers fundamentally the cryptoeconomic authority of what was being reported wasn't high enough and that's again because they didn't Implement telor properly um this were additional Dimensions there additional dimensions in the telor protocol that they could have implemented giving it optimistic security and when you get optimistic security you're basically uh the cont The cryptoeconomic Authority is as much as people would be willing to put up as

much as they have on top basically to challenge whatever the original incorrect value is and so I want to talk a little bit about the tradeoffs here um so you can think about the fundamental tradeoff between doing everything on Chain versus everything on chain and extremes um and the trade-off here is basically between enumerating everything and making it public for everyone to calculate that makes it a little easier to attack when everything is public and you can do these economic calculations as a a red teamer um so you have to get creative and find you know Solutions algorithmic Solutions or game theoretic Solutions

like tor has with the challenge period and optimistic security assumptions in order to solve this problem um You can compare that with Chronicle who has a really creative solution as well they have uh a handful of companies that are signing off on the data they're providing and so the cryptoeconomic authority is coming from these companies Goodwill and their future revenues so there's a vested interest in these companies or by these companies in reporting the accurate correct data and again that's using cryptoeconomic Authority but it's a little bit hidden and so this looks more like a lower bound saying if you trust these companies to this certain amount and you see their revenues there's at least a you know some number at least a billion

dollars or whatever their you know some fraction of their value um is backing each of these pieces of data until there isn't right until one has a fault and then new uh multisig set and you know you can keep uh upgrading the signer set to augment the crypto economic Authority so these are just two different approaches one is fundamentally more offchain one is fundamentally more onchain and the question for oracles that that underlies or that stems from cryptoeconomic Authority is how much value can we secure and even further than that when you're building an oracle you're thinking how do we monetize this how can we effectively charge for this and that's also going to be proportional

to how much value you actually secure and so I want to talk about this concept of money Legos um there are two good ways to build with cryptoeconomic authority in mind you can build vertically integrated where each layer is not making any more uh demands on the layer below it you know that the sort of the delegated cryptoeconomic authority of a piece of data uh at layer zero or layer one is uh at least as much in both of these cases as the layer above it and so these two first ones fit that um you know economic Authority uh profile so the last one though this is like where

you would have uh a layer that has too much value too much tvl depending on the layer below it and so um if you were to put like a physical diagram to the kinds of vulnerabilities that we've seen exploited in the past whether those are Oracle manipulations by replacing the Oracle or price manipulations by changing the underlying value through uh you know a flash loan swapping through an amm or even um t- wops you know that's going to look more like the uh Sombrero hat pyramid on the right um so just to give you a quick physical diagram before going into the next example I want to talk about something

I've been really interested in is ZK TLS and um so this stack over here is like loosely mapping to the uh security and the cryptoeconomic authority of these pieces of data at each layer and you can see it Stacks really high before it even gets to web 3 so ZK TLS uh notary networks have their work cut out for them and the reason I mentioned them is they're kind of like a pure form of um crypto economic Authority and economic security calculations uh for anyone that doesn't know ZK TLS is ZK proofs bringing web 2 data on chain so um the problems stem a lot from the base layer where there are many ways to manipulate

the underlying data that are not necessarily that expensive you could be a Facebook employee and change Facebook data you could hack into their servers you can get physical access to someone's Facebook there's a lot of different ways uh and you know many of them are rather cheap and so the uh value that the data depending on ZK TLS uh gets is limited or 10 the value that you can build on this type of data is limited by the security of the data itself and to quantify that you want to be thinking in terms of cryptoeconomic authority Loosely maps to cost of attack also abbreviates that way um but these are a couple of the considerations for uh

notary networks that I wanted to highlight um as an example of a protocol that is going to need to think deeply about uh Z about uh cryptoeconomic Authority so in summary um this mental model of like this metric of CA can tell you how secure a transaction is if you're a user you can be thinking as an oracle about how much you secure and how to monetize what you're providing and how to select an Oracle in the first place because different Oracles have different security assumptions and those are all uh basically reducible down to ca um there are other factors in oracles but what you want to make sure is that you

align your security assumptions as closely as possible or those are transformed properly into this reducible number or this irreducible number of cryptoeconomic authority um and so as a final thought uh if you can't calculate the ca this should be a sort of an orange flag for you it's like where is the authority coming from where is the trust coming from if you can't actually calculate it um and so there are many pitfalls that uh come with calculating the main one that I want to flag for everyone is uh assuming that the uh number of staked tokens you have times the last traded price is like the dollar amount of the value of those tokens that mental mistake has underlied most of the

economic vulnerabilities that we've seen in the last five years um so Tera Luna being like the main one obviously you can see that Luna was not worth what it was nominally worth as a you know an aggregate um and so the other follow-up question to this is how do you design protocols to be built on uh and you want to be thinking again in terms of cryptoeconomic authority how much uh how much outside how many outside dependencies and how much tvl can depend on your protocol is a function of the cryptoeconomic authority that you create in it and so uh this is my contact info that's what I wanted to share with you all today the uh you know if you guys

have any questions I'm happy to field those if we have time but um yeah feel free to scan the QR and I'll be available the rest of the next couple hours all right thank you

Related talks