Sub topic 5
What a rug pull is and how it differs from a pump-and-dump
This chapter assumes you know how an automated market maker (AMM) pool prices a swap with the constant-product rule, and that you can read short Python. You also need to know what a token and a transaction are. Pools are covered in an earlier chapter. Here we use them to define a rug pull and separate it from a pump-and-dump.
The core definition
A rug pull is a scheme in which the people who created or control a token take money out of the market in a way that other holders cannot follow. They do this through a privilege they kept for themselves. After they use it, the token may still exist and still have a name, a chart, and a community. It no longer has a working market.
The key idea is the exit lever. This is a capability that only insiders hold and that either drains value or stops others from selling. Common levers include:
- the right to withdraw the pool's liquidity
- the right to mint new tokens
- the right to block selling
The specific forms are covered in the next chapter. For now, treat the lever as the defining feature. If nobody holds such a lever, a collapse may be a bad investment or a pump-and-dump, but it is not a rug pull in the strict sense.
A pump-and-dump has a different engine. It works by manipulating demand. Insiders accumulate a token cheaply, promote it so that outsiders buy, then sell their holdings into that buying pressure. Insiders need no special contract privilege. They need buyers.
A worked comparison
The simulation below reuses the constant-product rule from the liquidity chapter, without fees. It runs the same pool through two scenarios.
In the first, a deployer seeds the pool with 10 ETH and 1,000,000 tokens and keeps the right to withdraw liquidity. Five buyers each swap 4 ETH. The deployer then withdraws everything.
In the second, a promoter buys 1 ETH of tokens first, the same five buyers follow, and the promoter sells. The pool stays open throughout.
class Pool:
"""Constant-product pool (x * y = k) with no fee."""
def __init__(self, eth, tokens):
self.eth = eth
self.tokens = tokens
def buy(self, eth_in):
tokens_out = self.tokens * eth_in / (self.eth + eth_in)
self.eth += eth_in
self.tokens -= tokens_out
return tokens_out
def sell(self, tokens_in):
eth_out = self.eth * tokens_in / (self.tokens + tokens_in)
self.tokens += tokens_in
self.eth -= eth_out
return eth_out
def rug_pull():
pool = Pool(eth=10.0, tokens=1_000_000.0)
buyer_tokens = sum(pool.buy(4.0) for _ in range(5))
eth_paid_by_buyers = 20.0
# The deployer holds the liquidity position and removes it all.
deployer_take = pool.eth
pool.eth, pool.tokens = 0.0, 0.0
buyers_recover = pool.sell(buyer_tokens)
return deployer_take - 10.0, eth_paid_by_buyers, buyers_recover
def pump_and_dump():
pool = Pool(eth=10.0, tokens=1_000_000.0)
promoter_tokens = pool.buy(1.0) # early, cheap entry
buyer_tokens = sum(pool.buy(4.0) for _ in range(5))
promoter_proceeds = pool.sell(promoter_tokens) # dump into demand
buyers_recover = pool.sell(buyer_tokens) # buyers try to leave
return promoter_proceeds - 1.0, 20.0, buyers_recover
profit, paid, recovered = rug_pull()
print(f"Rug pull: insider profit {profit:.2f} ETH, "
f"buyers paid {paid:.2f}, recover {recovered:.2f}")
profit, paid, recovered = pump_and_dump()
print(f"Pump and dump: insider profit {profit:.2f} ETH, "
f"buyers paid {paid:.2f}, recover {recovered:.2f}")The output shows the difference in structure:
- Rug pull: the deployer profits 20.00 ETH, which is exactly what the buyers paid in. The buyers recover 0.00 ETH, because the pool no longer exists.
- Pump and dump: the promoter turns 1 ETH into about 6.82 ETH, a profit of about 5.82 ETH. The buyers can still exit and recover about 14.18 ETH of their 20 ETH. They lose, but the market still functions.
In the pump-and-dump, the insider's profit comes from selling at a higher price than they paid, and the price only rises because outsiders buy. The damage is limited by how much the price falls. In the rug pull, the insider takes the pooled funds directly, and the damage can reach 100% at once.
Side-by-side differences
| Question | Pump-and-dump | Rug pull |
|---|---|---|
| What do insiders exploit? | Outside demand and hype | A privilege they kept in the contract or pool |
| What must outsiders do? | Buy at inflated prices | Buy or add liquidity |
| Is a special contract capability required? | No | Yes, an exit lever |
| Can the token be an ordinary, honest asset? | Yes. The scheme can target any thinly traded token, including established ones | Not usually. The token is built around the lever |
| How fast is the loss? | Gradual, over minutes to days as the price falls | Often a single transaction |
| Can victims still sell afterward? | Usually yes, at a loss | Often no, or only at near-zero value |
| What is the main early warning? | Coordinated promotion and sudden volume | Unlocked liquidity, owner privileges, and concentrated control |
The table shows why the two schemes need different checks. A promotion pattern warns you about a pump-and-dump. A look at who controls the liquidity and the contract warns you about a rug pull. Later chapters cover each check.
The exit lever and the trust problem
A rug pull exploits an information gap. Anyone can inspect a pool and a contract on-chain, but most buyers do not. Insiders rely on that gap. They present the token as a project with a community and a roadmap, while the lever stays unmentioned or buried in code.
Two points follow from this.
First, the lever is usually visible before the rug. Ownership of liquidity, mint permissions, and block lists are all readable on a public chain. A rug pull is often a failure of due diligence by buyers rather than a hidden attack that nobody could see. This does not shift the blame from the perpetrators. It tells you where defenses work.
Second, using the lever is not always illegitimate by itself. Legitimate projects hold admin keys, pause features, and mint rights for real reasons, such as emergency response or planned emissions. What matters is how much power one party holds, whether it is constrained by a time lock or a multi-signature wallet, and whether the use matches what was promised. The same function can be a safety feature in one project and a trap in another.
Hard rug versus slow rug
Rug pulls vary in speed and visibility.
- A hard rug is a single abrupt action, such as removing all liquidity or disabling transfers. It is easy to identify after the fact because the transaction is on-chain and the price goes to near zero within one block.
- A soft or slow rug is gradual. Insiders sell their allocation steadily, drain fees, or mint small amounts over weeks, while the project keeps posting updates. Each step may be deniable ("we are funding development"), but the cumulative effect is the same transfer of value from outsiders to insiders. Slow rugs are harder to prove and harder to notice, because the price decline can resemble a normal bear market.
A slow rug also blends into pump-and-dump behavior. Insiders sell into outside demand, which is the pump-and-dump mechanism. The difference is that they may also hold a lever that guarantees they can sell when others cannot.
When the schemes combine
Real incidents often mix both mechanics. A common sequence runs as follows:
- The creator launches a token with a small pool and keeps control of the liquidity.
- Paid promoters and coordinated accounts generate hype. This is the pump.
- Outsiders buy, which both raises the price and deepens the pool with real money.
- When the pool holds enough ETH to be worth taking, the creator removes liquidity. This is the rug.
Step 4 differs from a plain dump because the sale of insider tokens is not the main extraction. The extraction is the withdrawal of the money buyers put in. If you classify an incident, ask two questions. Where did the insiders' proceeds come from: tokens sold on the open market, or funds withdrawn from the pool? And was there a privilege that only insiders held? The first points to a pump-and-dump. The second, together with direct withdrawal, points to a rug pull.
Common misconceptions
- "Any token that drops 90% was a rug pull." Prices fall for many reasons, including weak demand and ordinary selling. A rug pull requires insiders to use a privileged mechanism to extract value or block exits.
- "If the contract is verified, the token is safe." Verified source code only means the code is readable. A verified contract can still contain a blacklist, a mint function, or an owner-controlled fee.
- "A pump-and-dump needs a scam token." Manipulators can target any token with thin liquidity. Low trading volume and a small pool make any token easier to move.
- "Rug pulls only happen to new tokens." New tokens are the most common targets. Older projects can also be rugged when an admin key is compromised or an insider acts on a long-held privilege.
Why the distinction matters
The label determines which questions you ask before buying and which evidence you collect after a loss. For a suspected rug pull, you want the transaction that used the lever, the wallet that sent it, and where the funds went next. For a suspected pump-and-dump, you want the promotion timeline, the wallets that bought early, and when they sold. Chapters on block explorers and reporting build on this.
Exercise
A token's pool holds 50 ETH. The deployer owns all liquidity tokens, with no lock. One day the deployer withdraws the pool and the price drops to zero in one transaction. A different token, with a locked pool and no owner privileges, is promoted heavily for a week, then falls 80% after a group of early wallets sells. Classify each case and name the evidence that supports your answer.
Show answer
The first case is a rug pull. The deployer held an exit lever (unlocked ownership of the liquidity) and used it to remove the buyers' funds in a single transaction. The evidence is the liquidity removal transaction and the unlocked liquidity position. The second case is a pump-and-dump. There was no privileged lever, because the pool was locked and the contract gave the owner no special powers. Insiders profited by selling into outside demand created by promotion. The evidence is the promotion timeline and the early wallets' sales.
Exercise
In the simulation, change the pump-and-dump so the promoter buys 3 ETH of tokens first instead of 1 ETH. Does the promoter's profit rise or fall, and why does the buyers' recovery change?
Show answer
Run the code with pool.buy(3.0) for the promoter and pool.sell on the promoter's tokens, and subtract 3.0 for profit. The promoter owns more tokens, so selling them pushes the price down further and leaves the buyers with a smaller recovery. The profit grows in absolute terms but at a worse rate per ETH invested, because the promoter's early purchase moves the price up less than a larger share of the pool being sold. The slippage on the dump also grows with the size of the sale relative to the pool.