The misordered lines caused a solvency check to be performed before the user’s amount, factor, and rewardDebt had been set to zero
33 Total views
1 Total shares
Own this piece of history
Collect this article as an NFT
The $8m Platypus flash loan attack was made possible because of code that was in the wrong order, according to a post mortem report from Platypus auditor Omniscia. The auditing company claims the problematic code didn’t exist in the version they saw.
— Omniscia (@Omniscia_sec) February 17, 2023
According to the report, the Platypus MasterPlatypusV4 contract “contained a fatal misconception in its emergencyWithdraw mechanism” which made it perform “its solvency check before updating the LP tokens associated with the stake position.”
The report emphasized that the code for the emergencyWithdraw function had all of the necessary elements to prevent an attack, but these elements were simply written in the wrong order, as Omniscia explained:
“The issue could have been prevented by re-ordering the MasterPlatypusV4::emergencyWithdraw statements and performing the solvency check after the user’s amount entry has been set to 0 which would have prohibited the attack from taking place.”
Omnisia admitted that they audited a version of the MasterPlatypusV4 contract from Nov. 21 to Dec. 5, 2021. However, this version “contained no integration points with an external platypusTreasure system” and therefore did not contain the misordered lines of code. From Omniscia’s point of view, this implies that the developers must have deployed a new version of the contract at some point after the audit was made.
Related: Raydium announces details of hack, proposes compensation for victims
The auditor claims that the contract implementation at Avalanche (AVAX) C-Chain address 0xc007f27b757a782c833c568f5851ae1dfe0e6ec7 is the one that was exploited. Lines 582-584 of this contract appear to call a function called “isSolvent” on the PlatypusTreasure contract, and lines 599-601 appear to set the user’s amount, factor, and rewardDebt to zero. However, these amounts are set to zero after the “isSolvent” function has already been called.
The Platypus team confirmed on Feb. 16 that the attacker exploited a “flaw in [the] USP solvency check mechanism,” but the team did not initially provide further detail. This new report from the auditor sheds further light on how the attacker may have been able to accomplish the exploit.
The Platypus team announced on Feb. 16 that the attack had occurred. It has attempted to contact the hacker and get the funds returned in exchange for a bug bounty. The attacker used flashed loans to perform the exploit, which is similar to the strategy used in the Defrost Finance exploit of Dec. 25.
Crypto stealth addresses, explained The purpose of crypto stealth addresses is to enable privacy for each transaction, concealing the recipient’s identity and transaction history.Crypto stealth addresses are a privacy-enhancing feature in blockchain technology that lets users receive money anonymously. Unlike conventional public addresses, stealth addresses provide distinct, one-time addresses for every transaction. The recipient’s actual
South Korea's Finance Ministry is considering taxation on cryptocurrencies and Initial Coin Offerings (ICOs), daily English-language newspaper The Korea Times reports Monday, Dec. 3.Hong Nam-ki, South Korea’s new Minister of Economy and Finance as well as new Deputy Prime Minister, revealed that а crypto taxation plan will be finalized according to global taxation trends in…
Erratic billionaire and Tesla CEO Elon Musk has offered to eat a kids meal from McDonald’s live on television if the fast food giant adds Dogecoin (DOGE) as an official payment method.“I will eat a Happy Meal on TV if McDonald’s accepts Dogecoin” said the SpaceX CEO in a tweet on Tuesday morning. In the…
Binance CEO Changpeng ‘CZ’ Zhao is distancing himself from Tron founder Justin Sun over what has been described by some as a ‘hostile takeover’ of the Steem blockchain.Sun claimed that these reports were “misleading” and that “We wanted to protect the sanctity of private property & the interests of all from malicious hackers.”Allegations that the…
Australia’s largest precious metal refinery, the Perth Mint, and InfiGold, a fintech startup focused on precious metals digitization, have jointly launched a gold-backed digital token.The new ERC-20 token is dubbed Perth Mint Gold Token (PMGT) and pegged 1:1 with GoldPass certificates issued by the Perth Mint, according to a press release shared with Cointelegraph on…
Buyer support and macro headwinds are in Bitcoin's favor as a giant sell wall is all that stops BTC/USD from reclaiming $50,000. 2186 Total views 141 Total shares Bitcoin (BTC) challenged $46,800 on Aug. 11 as a weakening U.S. dollar added to bullish momentum.BTC/USD 1-hour candle chart (Bitstamp). Source: TradingView"Aiming for $50,000"?Data from Cointelegraph Markets…
Texas regulators have included cryptocurrencies in their list of top threats to investors, according to the latest Texas Investor Guide.In its tenth anniversary edition of the State Securities Board’s “Texas Investor Guide: Strategies for Investing Wisely and Avoiding Financial Fraud,” the regulator added cryptocurrency to the list of investments that raise red flags and require…
Civic Technologies’s new app will act as both a vaccination proofing tool and a wallet for crypto. 1148 Total views 44 Total shares Civic Technologies, a San Francisco-based innovator in digital identity solutions, announced on June 16 that its Civic Wallet is now available in the App Store and Google Play. Civic Wallet has also formed…
Former Bitmain staff have been accused of “illegally” moving 10,000 Antiminers from a company-owned mining facility in Mongolia. 774 Total views 9 Total shares In the ongoing power struggle at cryptocurrency mining giant Bitmain, not only have accusations of “illegal power seizures” made headlines, but now the physical theft of mining hardware as well.A new…