Web3 & Crypto

Oracle Exploit, the Go-to-Crypto Hack in a Bear Market | by NEFTURE SECURITY I Blockchain Security | Web3 Magazine

An oracle manipulation is at its crux, a two steps attack.

The first step is to manipulate pool(s) used as price oracle(s) by a DeFi protocol to artificially inflate a token’s price by swapping/buying a vast amount of it.

Then go to the lending pool connected to this price oracle and open an under-collateralized position that will allow him to fly away with the excess money gained, thanks to the manufactured price discrepancy he created.

To illustrate this, let’s say that 1000 ETH = 1000 sUSD. In a scenario where the oracle has not been manipulated, and a lending pool requires depositing in collateral 120% of the value borrowed, you will need to deposit 1200 eth to receive 1000 sUSD.

However, if the hacker manipulates the pool(s) used as an oracle by buying en masse eth so that 1000 eth would then be worth 2000 sUSD, he only has to go to the lending protocol using this compromised oracle and deposit 1200 eth to receive 2000 sUSD.

That is what happened in substance in the most talked about oracle manipulation of 2022, the $100M Mango Market hack.

In a simplified summary, Avraham Eisenberg -who was the hacker behind the Solana DeFi trading platform Mango Market- funded his wallet with $5M USDC that he used to purchase 483 units of perpetual contracts in Mango token (MNGO), driving the price of MNGO X30 from $0,03 to $0,91 and increasing the value of his Mango token to $423M. Step one over. After artificially elevating the collateral value of his account, he proceeded to drain Mango Markets lending pools by taking massive loans totaling ~$117M in Bitcoin, Solana, and more. Step 2 over.

The oracles used by Mango Markets worked as intended, but since the source of truth was compromised, it was possible for Avraham Eisenberg to take an extremely under-collateralized loan.

This attack was self-funded, but as previously stated in our article dedicated to flash loan attacks, where once price/market manipulation was the preserve of “whales” like Avraham Eisenberg, flash loans now give the ability to a much larger pool of people to exploit oracles. A prime example would be Deus Finance, a DeFi protocol, which was exploited twice in two months in March and April 2022, for respectively $4 million and $13 Million through oracle exploits funded by flash loans.

If whales and non-whales could gorge on oracle exploits in 2022, it is because oracles were made vulnerable due to the bear market.

Bear market means low liquidity, and low liquidity provides the best condition for Oracle manipulation.

In a bull market, when there is a substantial quantity of liquidity, oracle exploits are difficult to carry out: the amount of input required to manipulate the price of a token successfully is much higher.

Hackers choose to go for an Oracle exploit when, according to Alexander Wlezien, cofounder of DeFi Platform Friktion Labs,

“The economic cost of price manipulation must be far above extractable economic value.”

Hence, extreme manipulations are made easier and cheaper if there is low liquidity and increase hackers’ incentive to undertake these sorts of exploits.

New or relatively unknown tokens usually have little liquidity to begin with, and become even more illiquid during a bear market, making them prime targets for criminals. A hacker can have a monumental price impact by taking significant positions in illiquid tokens, like in the Mango Market case.

By its scale, the Mango Market case acted as an eye-opener.

It drove the decentralized lending protocol Compound to pause the supply of four tokens (YFI, ZRX, BAT, and MKR) as lending collateral on its platform to protect its users against price manipulation in the week following the attack.

One month later, Open Source Liquidity Protocol Aave temporarily suspended lending markets for 17 tokens to fend off volatility risks after the Mango Market hacker tried a repeat attack on Aave and almost stole $60 million on CRV using USD Coin.

The bear market provides fertile ground for Oracle exploit, and if DeFi protocols do not take preemptive measures to make them less vulnerable to them like Compound of Aave, it can be expected that as long as the bear market persists, Oracle manipulations will continue to wreak havoc in DeFi.

#Oracle #Exploit #GotoCrypto #Hack #Bear #Market #NEFTURE #SECURITY #Blockchain #Security #Web3 #Magazine

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblocker Detected

Please Turn off Ad blocker