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

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.


3,509.95 Price
-0.100% 1D Chg, %
Long position overnight fee -0.0616%
Short position overnight fee 0.0137%
Overnight fee time 21:00 (UTC)
Spread 6.00


0.60 Price
+3.260% 1D Chg, %
Long position overnight fee -0.0753%
Short position overnight fee 0.0069%
Overnight fee time 21:00 (UTC)
Spread 0.01168


171.51 Price
+0.510% 1D Chg, %
Long position overnight fee -0.0753%
Short position overnight fee 0.0069%
Overnight fee time 21:00 (UTC)
Spread 2.2652


0.14 Price
+7.190% 1D Chg, %
Long position overnight fee -0.0753%
Short position overnight fee 0.0069%
Overnight fee time 21:00 (UTC)
Spread 0.0012872

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

Solana / USD
171.5136 USD
0.8564 +0.510%

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 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 630,000+ traders worldwide that chose to trade with

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