Thief milks CREAM Finance for $18m+ in cryptocurrency after spotting security bug

Reentrancy attack siphoned off millions


CREAM Finance, a decentralized loan platform, lost at least $18m in cryptocurrency on Monday to an unidentified thief.

The biz's name stands for Crypto Rules Everything Around Me, which evidently overstates the lending operation's control over its funds.

"CREAM v1 market on Ethereum has suffered an exploit, resulting in a loss of 418,311,571 in AMP and 1,308.09 in ETH, by way of reentrancy on the Amp token contract," the company said via Twitter, adding that it had blocked the exploit by pausing supply and borrow contracts for the AMP token.

Currently, those values translate to about $23m in AMP and $4.4m in ETH but prices have been fluctuating. PeckShield, a security firm that has been looking into the incident, estimated the theft at $18.8m.

Taiwan-based CREAM Finance, not to be confused with Latvia-based Cream Finance, offers loans. One way it does so is through "Flash Loans."

Flash Loans, the company explains in its documentation, provide those developing smart contracts with brief access to "undercollateralized loans" – the borrowed amount and a fee must be returned within one blockchain transaction block (about 15 seconds).

DeFi is based on the notion of what optimists refer to as smart contracts – financial operations governed by code rather than human brokers. Among the various risks of trusting one's funds to clever code is what's known as a reentrancy attack, which is when a contact function calls an external function that interferes with data affecting the operations of the calling function.

A very expensive bug

"The hack is made possible due to a reentrancy bug introduced by Amp, which is an ERC777-like token and exploited to re-borrow assets during its transfer before updating the first borrow," PeckShield explained via Twitter.

According to PeckShield, the crook made a 500 ETH Flash Loan and deposited the funds as collateral, then borrowed 19m AMP and exploited a reentrancy bug to re-borrow 355 ETH inside the Amp token transfer function, and finally self-liquidate the borrowed amount.

By repeating this process 17 times, the crypto-robber was able to gain 5,980 ETH, worth about $19m.

ERC777 defines an Ethereum token contract interface that works with the ERC20 token interface. The Amp token was designed to work on the Flexa payment network for the purpose of securing digital asset payments. A June 2020 audit of the Amp token indicates that a recommendation to modify Amp to make it safer from reentrancy attacks was adopted.

In a Twitter post on Monday, the Amp Project suggested its technology was not to blame. "Recently, a flash loan exploit was used to liquidate Amp on Cream Finance," the group said. "After an initial review, we believe the Amp contract is functioning as intended. We are working closely with [CREAM Finance] to investigate further and will provide additional details as soon as possible."

A separate audit of CREAM [PDF] by Trail of Bits from January 2021 identified two significant issues related to centralization of control and poor documentation of its technology.

Back in February, a DeFi product called Alpha Homora, to help people earning better interest on their crypto holdings, lost $37m in a heist that took advantage of CREAM's Iron Bank lending platform.

CREAM Finance's value is down about 6 per cent in the last 24 hours, with its cryptocurrency-based market cap at $102m. ®

Similar topics


Other stories you might like

  • India reveals home-grown server that won't worry the leading edge

    And a National Blockchain Strategy that calls for gov to host BaaS

    India's government has revealed a home-grown server design that is unlikely to threaten the pacesetters of high tech, but (it hopes) will attract domestic buyers and manufacturers and help to kickstart the nation's hardware industry.

    The "Rudra" design is a two-socket server that can run Intel's Cascade Lake Xeons. The machines are offered in 1U or 2U form factors, each at half-width. A pair of GPUs can be equipped, as can DDR4 RAM.

    Cascade Lake emerged in 2019 and has since been superseded by the Ice Lake architecture launched in April 2021. Indian authorities know Rudra is off the pace, and said a new design capable of supporting four GPUs is already in the works with a reveal planned for June 2022.

    Continue reading
  • Prisons transcribe private phone calls with inmates using speech-to-text AI

    Plus: A drug designed by machine learning algorithms to treat liver disease reaches human clinical trials and more

    In brief Prisons around the US are installing AI speech-to-text models to automatically transcribe conversations with inmates during their phone calls.

    A series of contracts and emails from eight different states revealed how Verus, an AI application developed by LEO Technologies and based on a speech-to-text system offered by Amazon, was used to eavesdrop on prisoners’ phone calls.

    In a sales pitch, LEO’s CEO James Sexton told officials working for a jail in Cook County, Illinois, that one of its customers in Calhoun County, Alabama, uses the software to protect prisons from getting sued, according to an investigation by the Thomson Reuters Foundation.

    Continue reading
  • Battlefield 2042: Please don't be the death knell of the franchise, please don't be the death knell of the franchise

    Another terrible launch, but DICE is already working on improvements

    The RPG Greetings, traveller, and welcome back to The Register Plays Games, our monthly gaming column. Since the last edition on New World, we hit level cap and the "endgame". Around this time, item duping exploits became rife and every attempt Amazon Games made to fix it just broke something else. The post-level 60 "watermark" system for gear drops is also infuriating and tedious, but not something we were able to address in the column. So bear these things in mind if you were ever tempted. On that note, it's time to look at another newly released shit show – Battlefield 2042.

    I wanted to love Battlefield 2042, I really did. After the bum note of the first-person shooter (FPS) franchise's return to Second World War theatres with Battlefield V (2018), I stupidly assumed the next entry from EA-owned Swedish developer DICE would be a return to form. I was wrong.

    The multiplayer military FPS market is dominated by two forces: Activision's Call of Duty (COD) series and EA's Battlefield. Fans of each franchise are loyal to the point of zealotry with little crossover between player bases. Here's where I stand: COD jumped the shark with Modern Warfare 2 in 2009. It's flip-flopped from WW2 to present-day combat and back again, tried sci-fi, and even the Battle Royale trend with the free-to-play Call of Duty: Warzone (2020), which has been thoroughly ruined by hackers and developer inaction.

    Continue reading

Biting the hand that feeds IT © 1998–2021