Drips Network bug drains 24,900 DAI from DaiDripsHub contract

SlowMist said an integer conversion flaw in the give function let an attacker reverse fund flow and drain about 24,882.99 DAI from the contract’s reserve.

DAI

Summary

Drips Network lost about 24,882.99 DAI after an integer conversion vulnerability in the DaiDripsHub contract’s give function allowed an attacker to reverse the intended fund flow. SlowMist said the flaw stemmed from converting uint128 to int128 without proper checks, enabling the attacker to manipulate the cast into a negative value that then turned positive in a way that withdrew funds from the DAI reserve. Details of the attacker address, victim contract and attack contract have been disclosed, highlighting how unsafe integer handling in smart contracts can create exploitable accounting failures.

Terms & Concepts
  • uint128: A 128-bit unsigned integer type used in programming and smart contracts.
  • int128: A 128-bit signed integer type that can represent both positive and negative values.
  • smart contracts: Self-executing code on a blockchain.