Sub topic 7
Honeypots and Rug Pull Patterns
Assume you understand wallets, addresses, transactions, decentralized exchanges (DEXs), and basic block explorer pages. This chapter focuses on how a token can appear tradable while preventing selling, or how its insiders can remove value after launch.
The working model
A token launch usually depends on three connected parts:
- The token contract controls balances and transfer rules.
- The DEX pair holds the token and the other asset, such as ETH or USDC.
- Owners, administrators, or upgrade authorities may retain special powers.
A honeypot abuses transfer rules. Buying succeeds, but selling fails or becomes economically impossible. A rug pull abuses control over liquidity, tokens, or contract administration. The buyer can sell at first, but insiders later remove liquidity, dump a large allocation, or change the rules.
Honeypot mechanisms
A contract can block selling in several ways:
- It can blacklist specific addresses, including buyers.
- It can reject transfers when the recipient is the DEX pair.
- It can apply a buy tax or sell tax that the owner can change.
- It can require an allowlist, trading flag, or minimum balance.
- It can use an upgradeable proxy so the implementation can change later.
This simplified example shows why adjustable taxes and blacklists deserve attention:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// Simplified illustration. This is not a complete ERC-20 implementation.
contract RiskyToken {
address public owner = msg.sender;
address public pair;
uint256 public sellTaxBps;
mapping(address => bool) public blacklisted;
mapping(address => uint256) public balanceOf;
modifier onlyOwner() {
require(msg.sender == owner, "not owner");
_;
}
function setPair(address p) external onlyOwner {
pair = p;
}
function setSellTax(uint256 bps) external onlyOwner {
sellTaxBps = bps;
}
function setBlacklist(address a, bool b) external onlyOwner {
blacklisted[a] = b;
}
function transfer(address to, uint256 amount)
external
returns (bool)
{
require(!blacklisted[msg.sender], "blacklisted");
uint256 fee = to == pair
? (amount * sellTaxBps) / 10_000
: 0;
balanceOf[msg.sender] -= amount;
balanceOf[to] += amount - fee;
balanceOf[owner] += fee;
return true;
}
}If the owner sets the sell tax above 10,000 basis points, the subtraction reverts for every sale. A tax near 100% may technically succeed while transferring almost all value to the owner. The contract is only an illustration, so a real investigation must inspect the deployed bytecode and every relevant function.
Rug pull patterns
Common rug pulls include:
- Liquidity removal: the provider withdraws the paired ETH, USDC, or other asset.
- Insider dumping: team wallets sell a large allocation into public demand.
- Unlimited minting: new tokens are created and sold, diluting holders.
- Proxy upgrade: an administrator replaces apparently safe code with restrictive code.
- Fee redirection: taxes are changed so trading revenue flows to insiders.
Liquidity being locked reduces one risk for the lock period. It does not prove that the token is safe. Insiders may still hold most of the supply, mint more tokens, change taxes, or wait until the lock expires.
| Check | What it can reveal | What it does not prove |
|---|---|---|
| Simulated buy and sell | Whether basic trading currently works | That future rules cannot change |
| Liquidity-lock record | Whether certain liquidity tokens are restricted | That other pools or token supply are safe |
| Owner and admin functions | Who can alter important behavior | That the authority will act honestly |
| Holder distribution | Concentrated wallets and linked insiders | The real identity or intent of each wallet |
Investigation errors
Do not treat a successful buy as proof that selling works. Test a small sell when possible, and inspect whether the simulation uses the same route and pair as the real trade. Do not rely only on a “renounced ownership” label. A proxy administrator, privileged role, or unrestricted mint function may still control the system. Also check whether top wallets are funded by the same source or trade in coordinated patterns.
Exercise
A token has locked liquidity for one year, but its owner can mint unlimited tokens and set the sell tax to any value. Is the lock enough to rule out a rug pull or honeypot?
Show answer
No. The lock addresses only one liquidity-removal risk. Minting and unrestricted tax changes can still dilute holders or make selling uneconomical.