Twerk Finance Rug Pull

Reported loss $13K
Ethereum
Rugpull

What happened

TWERK is a 6-decimal ERC-20 on Ethereum at 0xf0b47eE3…E2E3eD. Its deployer, 0xaacC9134…0E23D9, is also the contract owner, and the code gives that address an uncapped _mint, a freezeAccount switch over any holder, and 1% of every transfer. Etherscan shows the deployer adding liquidity on 2020-11-20 (tx 0x94137e3f…3ab50f) and then swapping tokens for ETH through Uniswap V2 Router 2 on 2020-12-03; one of those swaps (tx 0xe384bc46…d59038) returned about 15.8 ETH.

De.Fi's REKT database lists six sales by the deployer: txs 0xe384bc46…d59038, 0xe63ec6c7…59d6ea, 0x55cdd544…8e0eaf, 0x769ca39b…096ed1, 0x8e1583aa…01bed5 and 0x25e09747…a851d3. On 2020-12-18 the deployer called _mint (tx 0x4e1fd1df…dfdf54) to credit tokens to its own address, and a router swap by the deployer followed about three minutes later (tx 0x25e09747…a851d3, about 2.1 ETH received).

How it happened

  1. The constructor mints the initial supply to the deployer, and Owned sets the deployer as owner: _mint( msg.sender, 60000 * 1000000); and owner = msg.sender;.
  2. The owner can create more tokens without any cap or limit: function _mint(address account, uint256 amount) onlyOwner public returns (bool){ followed by _totalSupply = _totalSupply.add(amount);. Nothing in the code stops the owner from minting to itself and selling into the pool.
  3. Every transfer and transferFrom also pays the owner: uint256 devTokens = findOnePercent(value); and _balances[owner] = _balances[owner].add(devTokens);, while about 3% is burned from _totalSupply and the sender is debited the full value.
  4. The owner can freeze any address with freezeAccount, and both transfer and transferFrom check it with require(_freezed[to] != true); and a matching check on the sender, so a frozen address cannot send or receive tokens. setInflationContractAddress is also owner-only, and every transfer calls InflationToken._mint(...) on that address, so a transfer reverts if that external call reverts.
  5. What happened, per Etherscan: the deployer added liquidity on 2020-11-20, sold tokens through Uniswap V2 Router 2 on 2020-12-03 (for example about 15.8 ETH in tx 0xe384bc46…d59038), called _mint to its own address on 2020-12-18 (tx 0x4e1fd1df…dfdf54) and swapped again minutes later (tx 0x25e09747…a851d3).

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract TWERK
Protocol links Website @wolf_protocol

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.