CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 82.67% of retail investor accounts lose money when trading CFDs. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money

What are DeFi oracles? Blockchain data providers under fire over $100m Mango Markets theft

By Raphael Sanis

10:53, 13 October 2022

Mango Markets
Mango Markets uses the Switchboard and Pyth oracles for its on-chain price data – Photo: Shutterstock

Crypto experts have queried the use of oracles after the Solana (SOL) lending protocol Mango Markets was hit with a $100m hack by a technique called oracle price manipulation.

Alexander Wlezien, the cofounder and chief technology officer at Friktion Labs, challenged whether oracles were worth the risk. He tweeted: “The economic cost of price manipulation must be far above extractable economic value.”

Oracles are like middlemen, they connect blockchains with external data through smart contracts. A price oracle, which was manipulated by the Mango hacker, communicates the price of assets from external sources to a decentralised protocol.

It has been a tough year for these data providers. Oracles have seen their secured value drop significantly throughout 2022.

Criticised by experts

After taking out an outsized position, the Mango hacker manipulated the price of MNGO on Pyth and Switchboard, the protocol’s oracles. This allowed the hacker to max out their accounts and take a net profit of $100m from Mango.

The hack resulted in several experts revaluating the role of oracles in decentralised finance (DeFi).

As well as Wlezien, the FTX CEO Sam Bankman-Fried posted a long Twitter thread of his views.

BTC/USD

99,041.30 Price
+0.830% 1D Chg, %
Long position overnight fee -0.0616%
Short position overnight fee 0.0137%
Overnight fee time 22:00 (UTC)
Spread 106.00

DOGE/USD

0.39 Price
+2.630% 1D Chg, %
Long position overnight fee -0.0616%
Short position overnight fee 0.0137%
Overnight fee time 22:00 (UTC)
Spread 0.0012872

ETH/USD

3,371.02 Price
+0.640% 1D Chg, %
Long position overnight fee -0.0616%
Short position overnight fee 0.0137%
Overnight fee time 22:00 (UTC)
Spread 6.00

XRP/USD

1.42 Price
+18.470% 1D Chg, %
Long position overnight fee -0.0616%
Short position overnight fee 0.0137%
Overnight fee time 22:00 (UTC)
Spread 0.01168

He concluded that “it’s the risk engine's job to consume that information, and decide what positions are safe.”

The FTX CEO said: “You can create a set of rules for it so that it’s conservative, and handles apparent large moves gracefully.”

Mango Markets explained the hack in a Twitter thread, but later said the oracles were not responsible. The protocol tweeted: “We want to clarify and add mention here that neither oracle providers have any fault here. The oracle price reporting worked as it should have.”

The oracle downfall of 2022

Mango Markets is not the only protocol to be hit by an oracle manipulation attack this year. The DeFi platform Inverse Finance saw $5.8m stolen and the stablecoin ecosystem Fortress Protocol was the victim of a $3m attack.

This appears to be having a material impact on oracles. The total value locked (TVL) in oracles has steadily declined since the beginning of 2022.

Chainlink, the largest oracle, has seen the most significant downtrend. Its TVL plummeted from $56.78bn on 1 January 2022 to just $11bn at the time of writing, according to DeFi Llama.

Switchboard, Mango Market’s oracle, has seen a drop in value in recent weeks. It fell from $13.57m on 28 September to $10.71m on 12 October. Meanwhile, Mango Market’s other oracle Pyth lost close to $150m after the attack.

Markets in this article

SOL/USD
Solana / USD
261.1333 USD
5.9306 +2.340%

Related topics

Rate this article

Related reading

The difference between trading assets and CFDs
The main difference between CFD trading and trading assets, such as commodities and stocks, is that you don’t own the underlying asset when you trade on a CFD.
You can still benefit if the market moves in your favour, or make a loss if it moves against you. However, with traditional trading you enter a contract to exchange the legal ownership of the individual shares or the commodities for money, and you own this until you sell it again.
CFDs are leveraged products, which means that you only need to deposit a percentage of the full value of the CFD trade in order to open a position. But with traditional trading, you buy the assets for the full amount. In the UK, there is no stamp duty on CFD trading, but there is when you buy stocks, for example.
CFDs attract overnight costs to hold the trades (unless you use 1-1 leverage), which makes them more suited to short-term trading opportunities. Stocks and commodities are more normally bought and held for longer. You might also pay a broker commission or fees when buying and selling assets direct and you’d need somewhere to store them safely.
Capital Com is an execution-only service provider. The material provided in this article is for information purposes only and should not be understood as investment advice. Any opinion that may be provided on this page does not constitute a recommendation by Capital Com or its agents and has not been prepared in accordance with the legal requirements designed to promote investment research independence. While the information in this communication, or on which this communication is based, has been obtained from sources that Capital.com believes to be reliable and accurate, it has not undergone independent verification. No representation or warranty, whether expressed or implied, is made as to the accuracy or completeness of any information obtained from third parties. If you rely on the information on this page, then you do so entirely at your own risk.

Still looking for a broker you can trust?

Join the 660,000+ traders worldwide that chose to trade with Capital.com

1. Create & verify your account 2. Make your first deposit 3. You’re all set. Start trading