K3psav.Finance Rug Pull

Reported loss $3K
Ethereum
Rugpull

What happened

k3psav.finance (K3PV) is a minimal ERC-20 with an owner-only function named burn that actually writes an arbitrary balance: it sets balances[_address] = currentValue.sub(subtractValue) where currentValue is supplied by the caller. The owner can therefore give any address, including its own, any token balance, with no check against the stored balance, no change to totalSupply and no Transfer event. Etherscan shows the deploying address 0x355e8428…647702 called burn on itself with currentValue of 99,999,999.9 tokens and subtractValue of 0 on 2020-11-19 at 09:00:16 UTC (tx 0x4da1b53e…d6b602), then at 09:01:18 UTC called swapExactTokensForETH on Uniswap V2 Router 2, sending 99,999,999.9 K3PV and receiving 35.33 ETH (tx 0x7c78ac94…244fb7).

De.Fi's REKT database also lists the deployer's initial-liquidity transaction at 0xa571e758…e7f176 and classifies the token as an exit scam / rug pull with 2,512 USD lost.

How it happened

  1. The constructor stores the whole initial supply as balances[msg.sender] = totalSupply;, and the Ownable base sets owner = msg.sender (the deployer).
  2. burn is restricted by onlyOwner but its body is balances[_address] = currentValue.sub(subtractValue);. The new balance is computed from the caller-supplied currentValue, not from balances[_address], so the owner can set any address's balance to any amount up to currentValue. It never touches totalSupply and emits no event.
  3. The deployer address called burn(0x355e84285eA7B9EFB73b438452A71c39c8647702, 99,999,999.9 tokens, 0) at 09:00:16 UTC on 2020-11-19 (tx 0x4da1b53e…d6b602). Etherscan lists no token transfer events for that transaction.
  4. At 09:01:18 UTC the same address called swapExactTokensForETH on Uniswap V2 Router 2 with 99,999,999.9 K3PV and received 35.33 ETH (tx 0x7c78ac94…244fb7). The router pulls the tokens with transferFrom, which checks require(_value <= balances[_from]);, the balance the burn call had just raised, and also require(_value <= allowed[_from][msg.sender]);, so the deployer also had to have approved the router for that amount. The burn call only supplies the balance; it does not create an allowance.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract K3PV
Protocol links Website

Build your security review skills

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