LogoLogo
GitHub
  • Quickstart
    • What is EO?
    • EO Vision
    • Use EO
  • Build on EO
    • Introduction to EO Stack
    • What is an OVS
    • EO Features
    • EO Data Processing Flow
    • Builders Workflow
      • Set-up
      • Off-chain Computation
      • On-chain Components
      • Target Chains Publishing
    • Smart Contracts Overview
      • EO Chain contracts
      • Target Contracts
    • Aggregation Library
      • Median
      • Clustering
      • TWAP
      • Robust Aggregation 101
    • EO Cryptographic Broadcaster
    • Incentives Management
      • 🥢On-chain-Subjective Slashing Framework
    • Active Specialized Blockchain Oracles
      • EtherOracle - Peg Securing Blockchain Oracle by Etherfi
      • Pulse - Risk Blockchain Oracle By Bitpulse
      • ECHO - Social Media Blockchain Oracle
      • Borsa - Intent Optimisation
  • ePRICE
    • Introduction to ePRICE
    • Integration Guide
    • Risk Management and Market Integrity
    • Feed Addresses
      • Arbitrum
      • Arbitrum Sepolia
      • Base
      • Base Sepolia Testnet
      • Berachain
      • Blast
      • BNB Smart Chain
      • BOB
      • B Squared
      • B Squared Testnet
      • Hemi
      • Ink Sepolia
      • Ink Mainnet
      • Linea
      • Linea Sepolia
      • Manta
      • Manta Sepolia Tesnet
      • Mode
      • Mode Testnet
      • Monad Testnet
      • Morph
      • Morph Holesky
      • Polygon zkEVM
      • Polygon zkEVM Cardona Testnet
      • Plume
      • Plume Testnet
      • Scroll
      • Soneium
      • Sonic
      • Soneium Testnet
      • TAC Turin Testnet
      • Taiko Mainnet
      • Unichain
      • Unichain Sepolia
      • Zircuit
      • Zircuit Testnet
      • zkLink Nova Mainnet
    • API Reference
      • 🧩Examples
      • 🧩Off-chain Examples
    • Advanced
      • 🤖Automating EO consumption
      • 💱Getting a different currency pair
  • EO Token
    • The EO Token
    • Ecosystem Participants
    • EO Token Utility
    • EO Token Flywheel
    • Security and Enforcement
    • A New Chapter in Blockchain Oracle Design
  • Understand EO
    • EO Trust Model
    • Architecture Overview
    • Data Processing
    • Security
      • Cryptoeconomic Security
      • Aegis - Validator Set Configuration
  • Operators
    • Installation
    • Registration
    • Running the Client
    • Monitoring
  • 🔍Concepts
    • EigenLayer
    • Data Validators
    • Chain Validators
    • eBFT
    • OVS
    • EO Chain
Powered by GitBook
On this page
  • Measuring Cryptoeconomic Security
  • Profit from Short Selling
  • CES: A Tale of Two Oracles
  • Resilience to Attacks
  • Divergences in the Cost of Corruption
  • Market Fluctuation Impact
  • Beyond Profit from Depreciation
  • Scaling Cost of Corruption with Total Value Secured
  • Cost of Capital
  • The Dual Token Model
  • Proofs
  • Proof of Observation 1.
  • Proof of Observation 2.
  • Proof of Observation 3.
  • Proof of Observation 4.
  • End Notes
Export as PDF
  1. Understand EO
  2. Security

Cryptoeconomic Security

While traditional oracles rely on their proprietary tokens to maintain ecosystem health and secure operations, EO introduces a novel security approach with its dual-token design. The model synergizes the specific advantages of a protocol-dedicated token with the enhanced security and economic stability provided by a well-established token like ETH, used for staking purposes.

This dual-token approach marks a notable shift from the single token model. By incorporating ETH for staking purposes, EO connects to a broader and more resilient economic base. This strategy effectively mitigates risks associated with blockchain protocols that rely on protocol-specific tokens.

The following sections provide a mathematical analysis, showing the enhanced security and stability of such a system.

Measuring Cryptoeconomic Security

Cryptoeconomic security (CES) is a useful measure for analysis, consider the following;

Given a set of colluding validators that we henceforth term the attacker, we assume that the attacker has the ability to corrupt the majority of the validators. Therefore, the attacker possesses the power to manipulate the consensus process, potentially leading to double-spending, censoring transactions, or altering the integrity of the blockchain's state.

To assess whether attacking is beneficial, the attacker must take into account two elements: the Cost of Corruption (CoC\textit{CoC}CoC) and the Profit from Corruption (PfC\textit{PfC}PfC).

CoC\textit{CoC}CoC encompasses the total resources the attacker must invest to successfully manipulate the protocol, i.e., slashing of their stake, technical resources required for the attack and other associated expenses. Since we focus on assessing the efficacy of stake slashing as a deterrent and its influence on the CES, we assume that the CoCCoCCoC primarily involves the loss of the attacker's staked assets, while other costs will be disregarded.

PfC\textit{PfC}PfC signifies the potential gains the attacker would achieve post-successful manipulation. Our analysis requires a more subtle approach towards PfC\textit{PfC}PfC, and thus we divide PfC\textit{PfC}PfC into two sources as follows:

  • Profit from Manipulation (PfM\textit{PfM}PfM) is the internal profit the attacker can gain by manipulating the protocol. For instance, for blockchain Oracle protocols, it is the profit that could be extracted by a malicious price update. The PfM\textit{PfM}PfM is upper-bounded by the protocol's Total Value Secured (TVS).

  • Profit from Depreciation (PfD\textit{PfD}PfD) addresses the external profit the attacker can gain from betting on price volatility or depreciation through, e.g., derivative markets or short selling.

Notice that PfC=PfM+PfD\textit{PfC}=\textit{PfM}+\textit{PfD}PfC=PfM+PfD. A rational attacker will only attack if CoC<PfC\textit{CoC} < \textit{PfC}CoC<PfC.

We capture this in the following definition.

Definition (CES Margin). A protocol has a β\betaβ-crypto-economic security margin, or a β\betaβ-CES margin, if

CoC−(PfM+PfD)⏟PfC=β.CoC-\underbrace{(\textit{PfM}+\textit{PfD})}_\textit{PfC} = \beta.CoC−PfC(PfM+PfD)​​=β.

In what follows, we explicitly assume that increasing the CES margin implies a more crypto-economically (CE) secure protocol and say that a protocol is CE-secure or CE-vulnerable, referring to a positive or negative CES margin, respectively.

Profit from Short Selling

We now discuss thePfD\textit{PfD}PfD ingredient and suggest a (stylized and simplified) way to quantify it. Crucially, it does not rely on any property of a protocol and refers to any asset, be it cryptocurrency, fiat, or stock.

Consider a token we call $TOK, and assume that the attacker can short $TOK. Since we assume the attack is relatively quick, we neglect the shorting fees.1^11 The amount of short positions is bounded by $TOK's short interest. Namely, the percentage of $TOK's free float market cap that the attacker could short sell, which we denote by kkk. We stress that typically k∈[0,1]k\in[0,1]k∈[0,1]. Further, let mmm denote $TOK's total market cap (in USD). We therefore assume the attacker can open a short position of kmkmkm USD. Next, let ddd denote the percentage of depreciation due to the attack, for d∈(0,1]d\in(0,1]d∈(0,1]. A short seller can thus earn ddd for every $TOK they short. All in all, a successful short trade will grant the attacker a profit of kdmkdmkdm USD.

CES: A Tale of Two Oracles

To demonstrate how the CES margin is affected by the nature of the protocol's token, we compare the following two scenarios:

  • EnshrinedOracle, which relies on the base-layer's token that we denote by $ETH.

  • TraditionalOracle, relying on its own token that we denote by $TRD.

We assume that the only difference between EnshrinedOracle and the TraditionalOracle is the token used for staking. In both scenarios, the market cap of the stake is equal and worth SSS (measured in USD); however, as we show shortly, the two scenarios imply different CES margins. The reason is that an attack's ramifications are different.

The value and utility of $ETH are independent of EnshrinedOracle's activities, unlike $TRD, whose value is closely tied to the operations of TraditionalOracle.

Resilience to Attacks

For Traditional Blockchain Oracle ($TRD), a successful attack on the TraditionalOracle will affect the $TRD value, as the $TRD's inherent value is tied to the operations of TraditionalOracle. The attacker can gain kdmkdmkdm USD by shorting $TRD prior to the attack; hence, in TraditionalOracle's case PfD=kdm\textit{PfD}=kdmPfD=kdm.

For EnshrinedOracle ($ETH), as the value and utility of $ETH are unrelated to the EnshrinedOracle protocol the price of $ETH will not be affected. Thus, the PfD\textit{PfD}PfD equals 0 for EnshrinedOracle.

Observation 1 is illuminating. To illustrate, assume that the TraditionalOracle is a medium-sized decentralized service (m≈1m \approx 1m≈1 billion USD) with a reasonable short interest (k=0.1k=0.1k=0.1).

Under a severe attack (0.7≤d≤10.7 \leq d \leq 10.7≤d≤1), its CES margin is smaller by 70-100 million USD compared to EnshrinedOracle.

Under the same attack, the EnshrinedOracle is far more cryptoeconomically secure, as the underlying stake is not derived from the operations of the EnshrinedOracle. In contrast, such an attack would devastate the cryptoeconomic security of the TraditionalOracle.

Divergences in the Cost of Corruption

External, unforeseen events can break the CES of the TraditionalOracle. A crucial observation is that the CoCCoCCoC, which is the stake SSS of the validators, is always smaller than $TRD's market cap mmm. Let sss denote the proportion of $TRD market cap used for staking in the protocol, namely s≜Sms\triangleq \frac{S}{m}s≜mS​. We use this formulation to analyze the robustness of the protocol and suggest it is susceptible to a death spiral.

The above observation means that attacks might be executed even if the PfM\textit{PfM}PfM is negligible, provided that the attacker can gain from a $TRD price decrease after the attack. The CoC\textit{CoC}CoC component should thus reflect not only the TVS (through PfM\textit{PfM}PfM) but also the short interest (through kkk).

Being able to short $TRD based on the TraditionalOracle's operations increases the potential profit from attack, whereas there is no such benefit for attacking EnshrinedOracle.

Market Fluctuation Impact

Next, we analyze the ramifications of a sudden decrease of $TRD market cap. Such a change in valuation could result from the volatile nature of the crypto space or the unintended fault of the protocol.

This observation is demonstrated using an example.

Example 1:

We analyze the CES of TraditionalOracle after a major price drop, which occurs due to, e.g., a major crypto volatility event. We denote by t0t_0t0​ the time of the price drop. We assume that the stake proportion is s=20%,s=20\%,s=20%, the attacker's foreseen price drop is d=50%d=50\%d=50%, and the short interest is k=15%k=15\%k=15%.

Before the attack at t0t_0t0​, we assume the market cap of $TRD is m=1000m=1000m=1000 (all monetary quantities are given in million USD terms). Consequently, CoC=sm=200\textit{CoC} = sm = 200CoC=sm=200, and PfD=kdm=75.\textit{PfD} = kdm = 75.PfD=kdm=75. Additionally, we assume that before time t0t_0t0​ the potential profit from manipulation is PfM=90.\textit{PfM}=90.PfM=90.

The event at t0t_0t0​, which occurs due to a major crypto volatility event, causes the market cap of all crypto tokens to decrease. Particularly, we assume that $TRD drops by 50%50\%50% and that the more stable$ETH drops by 20%20\%20%. Furthermore, such a market cap change also decreases the PfM\textit{PfM}PfM. TraditionalOracle's TVS is comprised of different tokens, for instance in $ETH, wrapped versions of $BTC, stable coins ($USDT/$USDC ), and more. Some of those tokens are more volatile than others, and some do not fluctuate at all. We thus assume that, on average, thePfM\textit{PfM}PfM drops on the same scale as $ETH, namely by 20%20\%20%.

The figure below depicts the situation before and after t0t_0t0​, as we formally analyze next.

Let us analyze the CES margin. Before t0t_0t0​, we see that the CES margin is positive, since

CoC−PfM−PfD=200−90−75=35.\textit{CoC} - \textit{PfM} - \textit{PfD} = 200 - 90 - 75 = 35.CoC−PfM−PfD=200−90−75=35.

After t0t_0t0​, which occurs due to a major crypto volatility event, the market cap of $TRD drops by 50%50\%50% and becomes m′=500m'=500m′=500. As a result, the CoC\textit{CoC}CoC falls to sm′=100sm'=100sm′=100 and the PfD\textit{PfD}PfD drops to kdm′=37.5kdm'=37.5kdm′=37.5. Furthermore, the market cap of all crypto market drops and, as noted above, thePfM\textit{PfM}PfM drops by 20%20\%20%. Overall, the CES margin becomes negative, since

CoC−PfM−PfD=100−72−37.5=−9.5.\textit{CoC} -\textit{PfM}-\textit{PfD} = 100 - 72 - 37.5 = -9.5.CoC−PfM−PfD=100−72−37.5=−9.5.

Thus, the event at t0t_0t0​ that sparked a price drop made the TraditionalOracle CE vulnerable.

Next, we analyze EnshrinedOracle, relying on the independent $ETH token. The CES margins of EnshrinedOracle before the event is

CoC−PfM−PfD=200−90−0=110.\textit{CoC} -\textit{PfM}-\textit{PfD} = 200-90-0=110.CoC−PfM−PfD=200−90−0=110.

The event at t0t_0t0​ affects EnshrinedOracle's CES margin as well. First, EnshrinedOracle has no PfD\textit{PfD}PfD as it relies on an independent token; thus, the attacker cannot gain from betting on price drops. Secondly, EnshrinedOracle's CoC\textit{CoC}CoC decreases due to the drop of $ETH, by 20%20\%20% to becomeCoC=160\textit{CoC}=160CoC=160. Thirdly, as in the case of TraditionalOracle, thePfM\textit{PfM}PfM drops by 20%20\%20%, becoming PfM=72\textit{PfM}=72PfM=72. Overall, the CES margins of EnshrinedOracle after the event is

CoC−PfM−PfD=160−72−0=88.\textit{CoC} -\textit{PfM}-\textit{PfD} = 160-72-0=88.CoC−PfM−PfD=160−72−0=88.

The figure below depicts the change in the CES margin of EnshrinedOracle due to the same event. Importantly, under precisely the same event, EnshrinedOracle remains CE secure.

The TraditionalOracle's CE security is far more susceptible to market fluctuations, whereas EnshrinedOracle's security is resilient to external market forces.

Beyond Profit from Depreciation

Until now, we have focused on PfD\textit{PfD}PfD, an element that plays a crucial role in the TraditionalOracle but not in EnshrinedOracle. The PfD\textit{PfD}PfD analysis assisted in understanding how an independent token ($TRD) decreases the CES margin (Observation 1), making the protocol susceptible to attacks even if the CoC\textit{CoC}CoC is orders of magnitude greater than the PfM\textit{PfM}PfM (Observation 2), and could result in vulnerabilities in times of price fluctuations (Observation 3). But relying on a dedicated token $TRD bares other weaknesses. In the next section, we extend our analysis to challenges in the CoC\textit{CoC}CoC, particularly around issues of scaling and cost of capital.

Scaling Cost of Corruption with Total Value Secured

Assume that both protocols gain traffic and usage, resulting in a ten-fold increase in the TVS. The higher the TVS, the higher the PfM\textit{PfM}PfM; hence, the CES margin decreases dramatically. For simplicity, we shall assume that the PfM\textit{PfM}PfM is a constant fraction of the TVS. How can the protocols regain their CE security?

Recall that for TraditionalOracle, CoC=S=sm,\textit{CoC} = S = sm,CoC=S=sm, where sss is the staked proportion of $TRD and mmm is $TRD market cap. The TraditionalOracle can hence increase its CoC\textit{CoC}CoC in two ways:

  • Passively, due to an increase in $TRD market cap.

  • Actively, by increasing the staked proportion sss.

Let us examine these two solutions. For the passive approach of experiencing an increase in $TRD market cap, note that the TraditionalOracle cannot (legally) control the price and ensure a positive CES margin. Particularly, if the TVS fluctuation and the price fluctuation are not identical (correlation is not enough in this case), the TraditionalOracle could become CES-vulnerable (a scenario similar to that in Observation 3). The active approach is also challenging, as it requires the TraditionalOracle to call capital on demand while not being connected to an independent pool of capital.

EnshrinedOracle can mitigate a TVS increase by controlling the stake, allowing the CoC to scale accordingly.

Cost of Capital

TraditionalOracle's security scheme demands stakers hold $TRD , thus, stakers have to posses a token with relatively small market cap that depends on the protocol's performance. In contrast, EnshrinedOracle could accept stake in $ETH, the base-layer's token. $ETH is less volatile, does not suffer from inflation, and is a multi-purpose token. These differences allow EnshrinedOracle to demand less of its stakers compared to TraditionalOracle's stakers, who may demand a premium for the additional risks they take (possessing $TRD and being exposed to a potential turbulent macroeconomic environment). Additionally, since EnshrinedOracle's stakers could be re-stakers through Eigenlayer, their capital efficiency is maximized.

The Dual Token Model

An independent token makes EnshrinedOracle significantly more CE secure than its counterparts utilizing a staking token. However, blockchain oracle sovereign tokens offer other advantages if decoupled from the CES risks.

By rewarding validators with a token, an incentive structure can be designed to increase the rate of rewards. Factors such as uptime, accuracy , and longevity of validators may increase their rewards earned. This achieves both incentivization of higher quality validation, and alignment of validators with the interests of the protocol.

A token vesting mechanism requires validators to be aligned with the network by locking their rewards and ensuring the commitment of the validators during the vesting period. This enhances the stability and security of the network.

A sovereign token design also allows for creating a punishment structures , where rewards can be revoked on non-malicious misbehavior. To avoid slashing Beacon Chain ETH , all non-malicious behavior will addressed with sovereign token punishments.

Implementing all of these mechanisms while having stake rooted in $ETH retains the CES benefits of EnshrinedOracle while avoiding the CES vunerabilities of TraditionalOracle.

Proofs

Proof of Observation 1.

The TraditionalOracle satisfies CoC−(PfM+PfD)=βCoC-{(PfM+PfD)} = \betaCoC−(PfM+PfD)=β, with PfD=kdmPfD=kdmPfD=kdm. EnshrinedOracle has the same CoCCoCCoC and PfMPfMPfM, but zero PfDPfDPfD since it relies on the independent $ETH token. Its CES margin is thus β+kdm\beta+kdmβ+kdm. ■\blacksquare■

Proof of Observation 2.

Assume that CoC=q⋅PfMCoC=q\cdot PfMCoC=q⋅PfM, namely that PfM=smqPfM=\frac{sm}{q}PfM=qsm​. Therefore,

CoC−PfM−PfD=sm−smq−kdm=m(s(1−1q)−kd).CoC-PfM-PfD=sm-\frac{sm}{q}-kdm=m\left(s(1-\frac{1}{q})-kd\right).CoC−PfM−PfD=sm−qsm​−kdm=m(s(1−q1​)−kd).

The attack is thus beneficial as long as kd>s(1−1q)kd>s(1-\frac 1 q)kd>s(1−q1​). Specifically, if the short interest kkk is greater or equal to the stake proportion sss, the protocol becomes CE-vulnerable if the attacker expects a price drop of d≥1−1qd\geq 1-\frac 1 qd≥1−q1​. This vulnerability still remains even if q→∞q\rightarrow\inftyq→∞, since ddd could potentially reach 1 and 1−1q≤11-\frac 1 q \leq 11−q1​≤1 for any q∈[1,∞).q\in [1,\infty).q∈[1,∞). ■\blacksquare■

Proof of Observation 3.

Assume that before the event, the market cap mmm satisfies PfM<m(s−kd)PfM < m(s-kd)PfM<m(s−kd); thus, the protocol is CE-secure since

CoC−PfD−PfM=m(s−kd)−PfM>m(s−kd)−m(s−kd)=0.CoC-PfD-PfM=m(s-kd)-PfM > m(s-kd) -m(s-kd)=0.CoC−PfD−PfM=m(s−kd)−PfM>m(s−kd)−m(s−kd)=0.

Assume that the PfMPfMPfM does not depend on the market cap mmm. This is the case for, e.g., lending markets that mostly offer contracts in $ETH, etc. Since PfM<m(s−kd)PfM < m(s-kd)PfM<m(s−kd), there exists a real number m0m_0m0​, for m0<mm_0<mm0​<m, such that PfM=m0(s−kd)PfM=m_0(s-kd)PfM=m0​(s−kd). Denote by m′m'm′ the market cap of $TRD after the event. Consequently, if m′<m0m'<m_0m′<m0​, it holds that

CoC−PfD−PfM=m′(s−kd)−PfM=(m′−m0)(s−kd)<0;CoC-PfD-PfM=m'(s-kd)-PfM = (m'-m_0)(s-kd) < 0;CoC−PfD−PfM=m′(s−kd)−PfM=(m′−m0​)(s−kd)<0;

thus, the protocol is CE-vulnerable. In other words, if the PfMPfMPfM is not affected by the event, a market cap decrease can spark an attack.

Proof of Observation 4.

For the sake of this proof, we use the subscript ttt to refer to objects in time ttt; for instance, CoCtCoC_tCoCt​ is the CoCCoCCoC at time ttt. The CES margin at time ttt is given by

CoCt−PfMt−PfDt.CoC_t -PfM_t-PfD_t.CoCt​−PfMt​−PfDt​.
CoCt′−PfMt′−PfDt′≤CoCt′−PfMt′<0;CoC_{t'} -PfM_{t'}-PfD_{t'} \leq CoC_{t'} -PfM_{t'}<0;CoCt′​−PfMt′​−PfDt′​≤CoCt′​−PfMt′​<0;

therefore, the protocol is CE-vulnerable at time t′t't′. ■\blacksquare■

End Notes

1^11 In practice, the attacker would buy leveraged contracts and employ trading strategies. We focus on short positions, ensuring our model is simple yet aligned with reality.

PreviousSecurityNextAegis - Validator Set Configuration

Last updated 2 days ago

. If the TraditionalOracle, which relies on its own token $TRD, has a β\betaβ-CES margin, then EnshrinedOracle, which relies on the base-layer's token $ETH, has a (β+kdm)(\beta+kdm)(β+kdm)-CES margin.

For any real number q∈[1,∞)q \in [1, \infty)q∈[1,∞), the TraditionalOracle could be CE-vulnerable even if the cost of corruption is qqq times the profit of manipulation, i.e., CoC=q⋅PfM\textit{CoC} = q \cdot \textit{PfM}CoC=q⋅PfM.

Assume the protocol is CE-secure. Any fluctuation in $TRD market cap can make the protocol CE-vulnerable.

To keep the CES margin positive, the CoCCoCCoC should scale linearly with the TVS.

Assume at time t=0t=0t=0 the CES margin is positive and equals β\betaβ. Further, assume by contradiction that CoCt=o(TVS t)CoC_t =o(\textnormal{TVS }_t)CoCt​=o(TVS t​), where o(⋅)o(\cdot)o(⋅) is the . Our assumption about the PfMPfMPfM being a constant fraction of the TVS implies that CoCt=o(PfMt)CoC_t =o(PfM_t)CoCt​=o(PfMt​) also holds. By definition, there exists a time t′t't′ for which CoCt′<PfMt′CoC_{t'}<PfM_{t'}CoCt′​<PfMt′​, and hence

little-o notation
Observation 1
Observation 2.
Observation 3.
Observation 4.
Figure 1: The TraditionalOracle loses its CES security after a price drop in its sovereign token.
Figure 2: EnshrinedOracle's CES margin decrease after the same event, but remains highly positive.