K3psav.Finance Rug Pull
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
- The constructor stores the whole initial supply as
balances[msg.sender] = totalSupply;, and theOwnablebase setsowner = msg.sender(the deployer). burnis restricted byonlyOwnerbut its body isbalances[_address] = currentValue.sub(subtractValue);. The new balance is computed from the caller-suppliedcurrentValue, not frombalances[_address], so the owner can set any address's balance to any amount up tocurrentValue. It never touchestotalSupplyand emits no event.- 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. - At 09:01:18 UTC the same address called
swapExactTokensForETHon Uniswap V2 Router 2 with 99,999,999.9K3PVand received 35.33 ETH (tx 0x7c78ac94…244fb7). The router pulls the tokens withtransferFrom, which checksrequire(_value <= balances[_from]);, the balance theburncall had just raised, and alsorequire(_value <= allowed[_from][msg.sender]);, so the deployer also had to have approved the router for that amount. Theburncall only supplies the balance; it does not create an allowance.
Protocol details
Evidence
- transaction Etherscan transaction 0x4da1b53e...2b6b7e65306d6b602 (burn) etherscan.io
- transaction Etherscan transaction 0x7c78ac94...a40a3e9386244fb7 (swapExactTokensForETH) etherscan.io
- transaction etherscan.io transaction 0xa571…f176 etherscan.io
- address k3psavToken verified source on Etherscan (0xadd1077851588300c8c7d0313e71f4d68e2414d6) etherscan.io
- analysis DeFiYield announcement channel post 222 (De.Fi link) t.me
- analysis Sourcify match for 0xadd1077851588300c8c7d0313e71f4d68e2414d6 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.