Stable Yield Credit Honeypot
What happened
Stable Yield Credit (yCREDIT) was an Ethereum token whose transfer function quietly refuses most sales. When a holder sends tokens to the address the owner stored as _routerAddress, the contract returns without moving any balance unless the holder is on the owner's whitelist or passes a set of conditions: the holder must have bought from that address, must not be flagged, must sell less than an owner-set threshold, and at most three such sales can happen between buys. A holder who does sell once is flagged so they cannot sell again, and anyone who receives yCREDIT by plain transfer or buys at or above the threshold is flagged too.
The owner has no way to give up this role. The deployer added 150 ETH and 21,334 yCREDIT of liquidity on 31 December 2020 and removed it on 5 January 2021, taking back 549.03 ETH and 5,858.85 yCREDIT, about 399 ETH more than it put in.
How it happened
- The constructor mints the full initial supply to the
_ownerpassed in at deployment;_owneris set only there and the contract has no function to change or renounce it. - On buys (
sender == _routerAddress) the recipient is recorded as a buyer, and flagged in_bandAddressesifamount >= _canSellNum; any other wallet-to-wallet transfer not involving the owner flags the recipient. - On sells (
recipient == _routerAddress) a non-whitelisted holder hitsreturn;if they are not a buyer, are flagged, sell at or above_canSellNum, if_sellNum > 2, or if_allowsellis true. The earlyreturnskips the balance update, so the pair receives nothing and the swap cannot complete. - A sale that passes every check increments
_sellNumand flags the seller, so each holder can sell at most once. - The owner sets
_routerAddress,_canSellNumand the whitelist throughhelp()andsetRouter(), and can turn all non-whitelisted sells off withallowse(true). - The deployer added 150 ETH of liquidity on 31 December 2020 and removed 549.03 ETH plus 5,858.85 yCREDIT through
removeLiquidityETHWithPermiton 5 January 2021.
Protocol details
Evidence
- report CaptainJackAPE post cited by De.Fi as proof twitter.com
- transaction Etherscan: addLiquidityETH transaction 0xed3fb3f2... etherscan.io
- transaction Etherscan: removeLiquidityETHWithPermit transaction 0x17527fed... etherscan.io
- address Stable Yield Credit (DomProtocol) verified source code etherscan.io
- analysis Sourcify exact match for 0x8b57319da5b35fe95920cef465d0796e924fe8d4 on Ethereum repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.