BPOI Banner
Onyx Protocol Loses $3.8 Million in Preventable Hack Onyx Protocol Loses $3.8 Million in Preventable Hack

How a Known Bug Led to a $3.8 Million Hack on Onyx Protocol

Onyx Protocol, a Compound Finance fork, suffered a $3.8 million loss on Thursday to mark another entry in a series of attacks as bad actors explore system vulnerability.

Cyber-attacks continue to plague the crypto industry, highlighting the need for enhanced security.  

$3.8 Million Hack Hits Onyx Protocol

Blockchain security firm PeckShield highlighted suspicious transactions on OnyxDAO, drawing attention to a possible attack on the protocol. In a follow-up post, the on-chain detective revealed losses reaching $3.8 million, indicating that the hacker was already swapping the funds.

Onyx Protocol Hack. Source: PeckShield

Web3 security firm Cyvers corroborated the incident, citing suspicious transactions involving OnyxDAO on the Ethereum blockchain. According to Cyvers, most of the loss was in VUSD stablecoin.

“Our system has detected a suspicious transaction involving OnyxDAO on the ETH chain! The total loss is around $3.2 million [at the time]. Most of the losses are in VUSD. Attacker currently holds 521 ETH ($1.36 million). The rest of the digital assets are not swapped yet,” Cyvers wrote.

Read more: Crypto Project Security: A Guide to Early Threat Detection

Additional investigations by PeckShield revealed that the attacker capitalized on a known precision issue presented as a bug in the forked Compound V2 code base. They then siphoned 4.1 million VUSD, 7.35 million XCN, 5,000 DAI, 0.23 WBTC, and 50,000 USDT. Reportedly, the bug leveraged a nearly empty market to manipulate the exchange rate.

Notably, hackers used the same approach in October 2023, hacking the same protocol for $2.1 million. In the October incident, the vulnerability was a rounding error. At the time, researchers ascribed the vulnerability to Onyx Protocol being a fork of Compound Finance.

How the Code Vulnerability Occurs

With many DeFi protocols being open-source, developers tend to avoid the long approach. They opt to build off of an existing code as opposed to implementing functionality from scratch.

The approach is considered popular as it can improve efficiency and security when done correctly. The downside is that if the template code is not secure, the fork may inherit the vulnerabilities.

“In the case of the Onyx protocol, the Compound Finance code that it used had a known vulnerability that had already been exploited in Hundred Finance and Midas Capital, which also forked the Compound Finance code. However, the Onyx Protocol used the same code and lacked the community support and vigilance needed to prevent the vulnerability from being exploited,” security firm Halborn reported.

This means the Onyx Protocol hack could have been prevented, given the prevalence of rounding errors. Notably, guidance already exists when launching new markets on Compound Finance and its forks.

“At Hexagate, we recommend any Compound V2 fork, when launching new markets to mint some cTokens and burn them to make sure the total supply never goes to zero. When the total supply goes to zero, the protocol becomes vulnerable and this strategy mitigates this situation,” security firm Hexgate guided in April 2023.

Read more: What Is Compound Finance?

These incidences, including a $4.6 million attack on decentralized infrastructure Truflation on Wednesday, reflect the prevalent challenge in the crypto industry, where bad actors use different mechanisms to steal digital assets.

Disclaimer

In adherence to the Trust Project guidelines, BeInCrypto is committed to unbiased, transparent reporting. This news article aims to provide accurate, timely information. However, readers are advised to verify facts independently and consult with a professional before making any decisions based on this content. Please note that our Terms and ConditionsPrivacy Policy, and Disclaimers have been updated.

Source link

Lockridge Okoth

https://beincrypto.com/onyx-protocol-preventable-hack/

2024-09-26 15:20:34

bitcoin
Bitcoin (BTC) $ 91,239.45 3.47%
ethereum
Ethereum (ETH) $ 3,150.86 2.37%
tether
Tether (USDT) $ 1.00 0.01%
solana
Solana (SOL) $ 220.97 5.96%
bnb
BNB (BNB) $ 624.84 0.47%
dogecoin
Dogecoin (DOGE) $ 0.378608 2.41%
xrp
XRP (XRP) $ 0.913376 10.09%
usd-coin
USDC (USDC) $ 0.99989 0.01%
staked-ether
Lido Staked Ether (STETH) $ 3,149.25 2.30%
cardano
Cardano (ADA) $ 0.737891 23.23%
tron
TRON (TRX) $ 0.189822 6.38%
shiba-inu
Shiba Inu (SHIB) $ 0.000025 7.48%
avalanche-2
Avalanche (AVAX) $ 34.43 9.10%
the-open-network
Toncoin (TON) $ 5.43 3.19%
wrapped-steth
Wrapped stETH (WSTETH) $ 3,714.53 1.84%
wrapped-bitcoin
Wrapped Bitcoin (WBTC) $ 91,118.41 3.59%
sui
Sui (SUI) $ 3.87 21.67%
pepe
Pepe (PEPE) $ 0.000023 8.15%
weth
WETH (WETH) $ 3,155.65 2.45%
chainlink
Chainlink (LINK) $ 14.26 8.74%
bitcoin-cash
Bitcoin Cash (BCH) $ 434.26 3.40%
polkadot
Polkadot (DOT) $ 5.25 8.37%
near
NEAR Protocol (NEAR) $ 6.10 12.24%
leo-token
LEO Token (LEO) $ 7.76 4.29%
aptos
Aptos (APT) $ 12.48 8.93%
litecoin
Litecoin (LTC) $ 83.75 2.47%
wrapped-eeth
Wrapped eETH (WEETH) $ 3,312.08 2.20%
uniswap
Uniswap (UNI) $ 8.81 8.23%
usds
USDS (USDS) $ 0.994887 0.73%
crypto-com-chain
Cronos (CRO) $ 0.168688 6.63%
stellar
Stellar (XLM) $ 0.145269 7.05%
internet-computer
Internet Computer (ICP) $ 9.04 12.88%
bittensor
Bittensor (TAO) $ 535.96 6.33%
dogwifcoin
dogwifhat (WIF) $ 3.91 11.30%
kaspa
Kaspa (KAS) $ 0.14075 6.24%
ethereum-classic
Ethereum Classic (ETC) $ 23.58 6.26%
fetch-ai
Artificial Superintelligence Alliance (FET) $ 1.32 8.00%
dai
Dai (DAI) $ 0.999775 0.03%
whitebit
WhiteBIT Coin (WBT) $ 22.30 0.77%
ethena-usde
Ethena USDe (USDE) $ 1.00 0.07%
bonk
Bonk (BONK) $ 0.000044 26.91%
polygon-ecosystem-token
POL (ex-MATIC) (POL) $ 0.379814 6.09%
hedera-hashgraph
Hedera (HBAR) $ 0.078807 17.82%
blockstack
Stacks (STX) $ 1.94 6.83%
render-token
Render (RENDER) $ 7.35 11.86%
monero
Monero (XMR) $ 144.09 3.05%
okb
OKB (OKB) $ 44.19 1.81%
first-digital-usd
First Digital USD (FDUSD) $ 1.00 0.18%
floki
FLOKI (FLOKI) $ 0.000265 24.42%
aave
Aave (AAVE) $ 169.45 8.86%