SoylentNews
SoylentNews is people
https://soylentnews.org/

Title    Really Stupid “Smart Contract” Bug Let Hackers Steal $31 Million in Digital Coin
Date    Thursday December 02 2021, @02:54PM
Author    janrinok
Topic   
from the a-few-bugs-still-need-ironing-out dept.
https://soylentnews.org/article.pl?sid=21/12/02/0956210

upstart writes:

Really stupid "smart contract" bug let hackers steal $31 million in digital coin:

Blockchain startup MonoX Finance said on Wednesday that a hacker stole $31 million by exploiting a bug in software the service uses to draft smart contracts.

The company uses a decentralized finance protocol known as MonoX that lets users trade digital currency tokens without some of the requirements of traditional exchanges. "Project owners can list their tokens without the burden of capital requirements and focus on using funds for building the project instead of providing liquidity," MonoX company representatives say here. "It works by grouping deposited tokens into a virtual pair with vCASH, to offer a single token pool design."

An accounting error built into the company's software let an attacker inflate the price of the MONO token and to then use it to cash out all the other deposited tokens, MonoX Finance revealed in a post. The haul amounted to $31 million worth of tokens on the Ethereum or Polygon blockchains, both of which are supported by the MonoX protocol.

Specifically, the hack used the same token as both the tokenIn and tokenOut, which are methods for exchanging the value of one token for another. MonoX updates prices after each swap by calculating new prices for both tokens. When the swap is completed, the price of tokenIn—that is, the token sent by the user—decreases and the price of tokenOut—or the token received by the user—increases.

By using the same token for both tokenIn and tokenOut, the hacker greatly inflated the price of the MONO token because the updating of the tokenOut overwrote the price update of the tokenIn. The hacker then exchanged the token for $31 million worth of tokens on the Ethereum and Polygon blockchains.


Original Submission

Links

  1. "upstart" - https://soylentnews.org/~upstart/
  2. "Really stupid "smart contract" bug let hackers steal $31 million in digital coin" - https://arstechnica.com/information-technology/2021/12/hackers-drain-31-million-from-cryptocurrency-service-monox-finance/
  3. "say here" - https://medium.com/monoswap/monox-spotlight-coinlist-seed-5a45ca1e5205
  4. "revealed in a post" - https://medium.com/monoswap/exploit-post-mortem-33921a779b43
  5. "Original Submission" - https://soylentnews.org/submit.pl?op=viewsub&subid=52655

© Copyright 2024 - SoylentNews, All Rights Reserved

printed from SoylentNews, Really Stupid “Smart Contract” Bug Let Hackers Steal $31 Million in Digital Coin on 2024-04-24 06:56:30