Keep3r.info Honeypot
What happened
keep3r.info (KP3RI) is an ERC-20 whose _transfer calls a check named _ints. While the owner address and a second control address _address1 are equal, the check does nothing. Once the owner calls ints(addr) with a different address, every transfer is checked: unless the owner address is the sender or the recipient, the sender must be _address1, the Uniswap router, or an address the owner whitelisted through multiaddress, otherwise the transfer reverts.
Which holders or pool transfers that blocks therefore depends on which address _address1 is set to. Etherscan shows the deploying address 0x228aB8bB…1aE83B added 41,800 KP3RI and 50 ETH of liquidity at 07:44:49 UTC on 2020-12-08 (tx 0xc9f0c6b0…bd7bdd) and removed liquidity at 14:11:20 UTC, receiving 38,354.97 KP3RI and 54.43 ETH (tx 0x19dceefc…a25033). De.Fi's REKT database lists the token as an exit scam / honeypot with 2,457 USD lost and states the owner could disable the transfer function so users could not sell.
No transaction calling ints was opened, so the code shows a sender restriction was possible, not that it was switched on.
How it happened
- The constructor sets
_address0 = owner;and_address1 = owner;from itsownerargument, so the check in_intsstarts disabled because its condition includes_address0!=_address1. ints(address addressn)can only be called by_address0and sets_address1 = addressn;. Pointing_address1at any address other than_address0arms the check; pointing it back at_address0disarms it.- Once armed,
_transfercalls_ints(sender, recipient, amount), which runsrequire(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");wheneverrecipient != _address0 && sender != _address0 && amount > _zero. So a transfer between two addresses other than the owner address goes through only if the sender is_address1, the Uniswap V2 Router 2 address, or a whitelisted address. A holder selling through the router is the sender of the pair-bound transfer, so that sale reverts unless the holder is_address1or whitelisted. Whether a transfer coming out of the pair (a buy) passes depends on whether the pair address is_address1or whitelisted; the source does not show which address_address1was set to. - The owner address is exempt as a sender or a recipient:
sender != _address0is false when it sends, andrecipient != _address0is false when it receives.multiaddress(AllowN, receivers, amounts)lets_address0send tokens to a list and, for the firstAllowNentries, set_Addressint[receivers[i]] = true;and_approve(receivers[i], _router, _valuehash);, giving those addresses sell access and giving the router an unlimited allowance over their balances. - On 2020-12-08 the deployer address added liquidity at 07:44:49 UTC (tx 0xc9f0c6b0…bd7bdd) and called
removeLiquidityETHWithPermitat 14:11:20 UTC, receiving 38,354.97KP3RIand 54.43 ETH (tx 0x19dceefc…a25033).
Protocol details
Evidence
- report Post by CaptainJackAPE on X (De.Fi proof link) twitter.com
- transaction Etherscan transaction 0xc9f0c6b0...bd7bdd (addLiquidityETH) etherscan.io
- transaction Etherscan transaction 0x19dceefc...a25033 (removeLiquidityETHWithPermit) etherscan.io
- address keep3r.info token (ERC20) verified source on Etherscan (0x0ba3742ef37A008FF9CeFc189f65A03D41725a16) etherscan.io
- analysis Web Archive web.archive.org
- analysis Sourcify match for 0x0ba3742ef37A008FF9CeFc189f65A03D41725a16 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.