House of paper Honeypot
What happened
House of Paper (H3OF) contains an undocumented function stakingTransfer(address fromAddress, uint256 SubstractedValue) that lets the governance address, set to tx.origin (the deployer) in the ERC20 constructor, mint any amount of tokens to any address. It calls the base _mint, which never calls _beforeTokenTransfer, so the ERC20Capped supply cap check is not reached. Etherscan shows the deploying address 0x1c155d8D…f91364 added 44 ETH and 12,000 H3OF of liquidity at 13:51:42 UTC on 2020-11-12 (tx 0xe07ecf72…7b04ce), called stakingTransfer on itself at 14:11:30 UTC and received 99,999,999.9 newly minted H3OF (tx 0x57fc84ab…624fcb), and 73 seconds later swapped 99,999,999.9 H3OF for 49.055 ETH on Uniswap V2 Router 2 (tx 0x4ef7dcf6…70a5b7).
De.Fi's REKT database lists the token as an exit scam / honeypot with 2,338 USD lost and states the owner could disable transfers; the verified source opened here contains no function that disables transfers (see unresolved).
How it happened
- The
ERC20base constructor setsgovernance = tx.origin;, so the deploying address is the only address allowed to callstakingTransfer; the source has no function that changesgovernance. function stakingTransfer(address fromAddress, uint256 SubstractedValue) public { require(msg.sender == governance, "Invalid Address"); _mint(fromAddress, SubstractedValue); }mints any quantity to any address. The name and parameters read like a transfer, but the body only calls_mint.ERC20Cappedenforces its cap inside_beforeTokenTransfer(require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded")), but the baseERC20._mintdoes not call_beforeTokenTransfer, so a mint throughstakingTransferdoes not run that check.- On 2020-11-12 the deployer added liquidity at 13:51:42 UTC (tx 0xe07ecf72…7b04ce), then at 14:11:30 UTC called
stakingTransferwith its own address and 99,999,999.9 as the amount; Etherscan shows a transfer of 99,999,999.9H3OFfrom the zero address to that address (tx 0x57fc84ab…624fcb). - At 14:12:43 UTC the same address called
swapExactTokensForETHon Uniswap V2 Router 2, sending 99,999,999.9H3OFand receiving 49.055 ETH (tx 0x4ef7dcf6…70a5b7).
Protocol details
Evidence
- report Report houseofpaper.finance
- transaction Etherscan transaction 0xe07ecf72...b04ce (addLiquidityETH) etherscan.io
- transaction Etherscan transaction 0x57fc84ab...24fcb (stakingTransfer) etherscan.io
- transaction Etherscan transaction 0x4ef7dcf6...a5b7 (swapExactTokensForETH) etherscan.io
- address HouseOfPaperFinance verified source on Etherscan (0x4aa24b82c1a65216b053bbe963ede2db296f9dd3) etherscan.io
- analysis Sourcify match for 0x4aa24b82c1a65216b053bbe963ede2db296f9dd3 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.