Skip to content

Commit f75851d

Browse files
Merge pull request #79 from john-walter-munene/feat/Article-Djed-Stablecoin-Oracles-Across-Chains
On adding new article: Stablecoin Price Oracle A primer
2 parents fc210b1 + 7554ac1 commit f75851d

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: "Stablecoin Price Oracles — A Primer"
3+
author: "Wen-Chiao Su"
4+
date: "2024-09-24"
5+
image: "/images/Stablecoin Price Oracles A Primer.webp"
6+
excerpt: "A clear primer on why price oracles are essential for stablecoins, how they work, and their key risks and challenges."
7+
---
8+
9+
# Stablecoin Price Oracles — A Primer
10+
11+
## Introduction
12+
13+
Oracles are external data providers that supply off-chain information to blockchain systems. This allows decentralized applications and smart contracts to interact with real-world data, such as asset prices, weather reports, or real-world events. Oracles are essential for bridging the gap between blockchain’s deterministic world and unpredictable real-world events.
14+
15+
## Why are price oracles critical for stablecoins?
16+
17+
Stablecoins require accurate, real-time data to maintain their peg to a fiat currency or asset. Price oracles provide these real-time asset valuations, ensuring that the stablecoin protocol can make informed decisions about collateral levels or market value. Without reliable price oracles, stablecoins would struggle to maintain their peg, leading to loss of trust in the system.
18+
19+
## How stablecoins use oracles
20+
21+
Different types of stablecoin protocols use oracles in different ways.
22+
23+
For example, when a crypto-collateralized stablecoin protocol uses price oracles, it monitors the price of the collateral asset. When the price of the collateral asset drops and the collateral ratio of a loan drops below a predefined threshold, the protocol enables the liquidation of the loan and the use of its collateral to buy back stablecoins and protect the peg.
24+
25+
Similarly, when a crypto-backed stablecoin protocol (e.g. Djed or Gluon) uses price oracles, it monitors the price of the reserve asset and uses this price to know much of the reserve asset should be given back to users who redeem stablecoins and how much of the reserve asset should be required from users who want to mint stablecoins.
26+
27+
Independently of the type of stablecoin, accurate price feeds are key to ensuring that stablecoin protocols function without de-pegging.
28+
29+
## Types of oracles
30+
31+
Price oracles differ widely in their design, particularly with respect to the following characteristics:
32+
33+
- Price Aggregation: The price may come from a single source or be aggregated from multiple sources.
34+
- Latency: The delay between off-chain price changes and on-chain updates.
35+
- Push (a.k.a. On-Chain): Oracle pushes data directly to the blockchain.
36+
- Pull (a.k.a. Off-Chain): Applications retrieve signed data from off-chain sources.
37+
- Deviation Tolerance: The acceptable difference between on-chain and off-chain prices.
38+
- (De)centralization: The degree to which oracle infrastructure is controlled by a single entity or distributed among multiple parties.
39+
40+
## Risks and challenges of oracles
41+
42+
Price oracles come with inherent risks. The most common is price manipulation, where attackers exploit faulty or inaccurate oracles. For instance, in the [Synthetix sKRW attack](https://cointelegraph.com/news/sophisticated-trading-bot-exploits-synthetix-oracle-funds-recovered) of 2019, a corrupt price feed led to a $37 million loss due to arbitrage exploitation.
43+
44+
Governance risks also exist — if a malicious entity takes control of a protocol’s governance, they can manipulate oracles by feeding incorrect data. A properly decentralized and incentive-aligned governance system is crucial for preventing such attacks.
45+
46+
The long-term viability of oracle systems depends on the sustainability of their off-chain infrastructure. Currently, many oracles, including those considered decentralized, rely on undisclosed subsidies from blockchain foundations to provide public data on-chain. This reliance poses a potential risk to the DeFi ecosystem that depends on these oracles. If these subsidies were to cease, it could disrupt the availability and reliability of crucial data services.
47+
48+
## Decentralization and governance in oracle design
49+
50+
A strong governance model is crucial for maintaining the integrity of oracles. Decentralized governance helps ensure that no single entity can control or manipulate price feeds. Incentive-compatible mechanisms encourage transparent reporting, as participants are rewarded for providing accurate data.
51+
52+
Decentralization of both the oracle itself and its governance system is essential to prevent 51%-style attacks, where an attacker gains control and forces the system to accept false data, possibly de-pegging the stablecoin.
53+
54+
## Conclusion
55+
56+
Stablecoins rely heavily on robust, secure, and decentralized price oracles to function properly. By accurately reflecting real-world values in a timely manner, oracles help stablecoins maintain their peg, while ensuring collateral or reserve levels are sufficient to protect users. However, oracle manipulation, faulty data sources, weak governance and economic sustainability are persistent risks that must be addressed to maintain long-term stability.
57+
58+
## About the Djed Alliance
59+
60+
The [Djed Alliance](https://djed.one/) aims to stabilize the digital economy through the Djed Stablecoin Protocol.
61+
62+
The Djed Stablecoin Protocol is deployed across multiple networks and can be used to create your stablecoin. Join our [growing community](https://discord.gg/ggxP4ttHgN) and together, we will advance the future of the decentralized economy.
23.5 KB
Loading

0 commit comments

Comments
 (0)