Sub topic 5
Liquidity pools and what a lock does and does not prove
This chapter assumes you can read a block explorer page, know what a DEX swap is, and understand ERC-20 tokens and wallet addresses. You do not need to know Solidity. It covers how a pool holds a token's trading liquidity, how a deployer can remove that liquidity, and what a "locked liquidity" badge tells you. It also covers what the badge leaves out. Nothing here is financial advice.
Why liquidity decides whether you can exit
A token only has a usable price if someone can trade it against another asset. On most DEXs that happens in a liquidity pool, a smart contract holding reserves of two assets, usually the new token and a base asset such as ETH or a stablecoin. Traders swap against the reserves, and the pool sets the price from the ratio between them.
Many pools use the constant-product rule from Uniswap V2: reserveA × reserveB = k. Every swap must keep k the same, apart from fees.
Suppose a pool holds 10 ETH and 1,000,000 TOKEN, so k = 10,000,000.
- You buy with 1 ETH. The pool now holds 11 ETH.
- To keep
kconstant, it must hold 10,000,000 / 11 ≈ 909,091 TOKEN. - You receive about 90,909 TOKEN, roughly 9.1% of the supply in the pool, for 1 ETH.
The pool was priced at 0.00001 ETH per token before your trade. You paid about 0.0000110 ETH per token on average. That gap is price impact, and it shows why a shallow pool is risky. Small trades move the price a lot, and the pool's ETH is all the exit liquidity every holder shares. In this example, if every holder sold, they would split about 11 ETH between them.
LP tokens: the claim on the pool
Whoever deposits into the pool receives liquidity provider (LP) tokens. An LP token is a receipt that entitles its holder to a proportional share of the reserves. Redeeming (burning) LP tokens withdraws both assets.
At launch, the deployer usually supplies all the initial liquidity. The deployer therefore holds 100% of the LP tokens, which means the deployer can withdraw the pool's entire ETH side whenever they like. After the withdrawal, the pool is empty. Holders still have tokens, but nothing to sell them to. This is the classic liquidity-removal rug pull.
The risk is concentrated in one question: who holds the LP tokens, and what constraints apply to them? There are three common answers.
- Kept in a wallet. No constraint exists. This is the highest-risk state.
- Locked in a locker contract. The LP tokens are deposited into a contract that refuses to return them until a set date. Third-party lockers publish lock records, including amount, owner, and unlock time.
- Burned. The LP tokens are sent to an address nobody controls, such as
0x000…dEaD. The liquidity is then permanent, because nobody can redeem those tokens.
Note that Uniswap V2 pairs permanently send a small amount of LP tokens (1,000 base units) to the zero address when a pool is first created. That small share at address(0) is normal and does not mean the pool is "burned".
Checking who holds the LP tokens
Find the pair address on the DEX or in a DEX screener. Open it on the block explorer and look at the pair's LP token holders. Then compare each large holder's balance with the total supply.
This script does that comparison for a V2-style pair. It reports what fraction of the LP supply sits at the burn addresses, in a locker you name, and in the deployer's wallet.
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const abi = [
"function totalSupply() view returns (uint256)",
"function balanceOf(address) view returns (uint256)",
"function getReserves() view returns (uint112, uint112, uint32)",
];
const pair = new ethers.Contract(process.env.PAIR_ADDRESS, abi, provider);
const DEAD = "0x000000000000000000000000000000000000dEaD";
const watched = {
"zero address": ethers.ZeroAddress,
"dead address": DEAD,
locker: process.env.LOCKER_ADDRESS,
deployer: process.env.DEPLOYER_ADDRESS,
};
const total = await pair.totalSupply();
const [r0, r1] = await pair.getReserves();
console.log("reserves:", r0.toString(), r1.toString());
for (const [label, addr] of Object.entries(watched)) {
const bal = await pair.balanceOf(addr);
// Basis points avoid floating-point math on large integers.
const bps = total === 0n ? 0n : (bal * 10_000n) / total;
console.log(`${label}: ${Number(bps) / 100}% of LP supply`);
}The percentages will not add to 100% if other wallets hold LP tokens. Any large share outside the burn and locker rows needs an explanation. Take the locker address from the pair's holder list, not from a link on the project's website. A copied address could point to a contract the team controls.
What a lock proves
If the lock is real and covers most of the LP supply, it supports these claims:
- The locked LP tokens cannot be redeemed before the unlock date, assuming the locker contract works as published.
- The deployer cannot remove that share of the pool during the lock, so the simplest liquidity-removal rug pull is blocked for that period.
- A burn goes further. If the LP tokens went to a dead address, that share is permanently unredeemable.
That is a real but narrow guarantee. It covers one exit path.
What a lock does not prove
| Claim a lock is used to imply | Why the lock does not establish it |
|---|---|
| "The token is safe to sell." | A honeypot contract can block sells even when liquidity is locked. Locked ETH does not help if your sell reverts. |
| "The team cannot dump." | The team may hold a large token balance outside the pool. They can sell it into the locked liquidity and drain the ETH side that way. |
| "Supply is fixed." | If the owner can mint, they can create tokens and sell them into the pool. |
| "Taxes are fair." | An owner who can raise the sell tax can capture most of each sale without touching the pool. |
| "All liquidity is locked." | Only a fraction may be locked. Check the percentage, not the badge. |
| "Liquidity stays locked." | Locks expire. When the date passes, the deployer can withdraw. |
| "This is the real market." | The token may have other pools, and a lock on one says nothing about the others. |
The most common mismatch is the first one. A lock protects the pool's reserves from the deployer's LP tokens. It does not protect you from the token's own code. For that, read the next two chapters on owner powers and honeypots.
Gotchas that make a lock weaker than it looks
- Short locks. A 7-day lock on a project that intends to exist for months is a delay, not protection. Compare the unlock date with the vesting schedule and with the project's claims.
- Partial locks. Locking 10% of the LP tokens and advertising "liquidity locked" is technically true. Compute the locked fraction.
- Extendable or transferable locks. Some lockers let the owner transfer the lock record to another wallet. That does not release liquidity by itself, but check whether the specific locker allows early withdrawal, fee-based unlocks, or an admin override.
- Unknown locker contracts. A "locker" deployed by the team is just a contract the team wrote. Its code may contain a withdrawal backdoor. Prefer well-known lockers with audited code and public lock pages.
- Liquidity added later. A project can lock the first pool and later add a second, unlocked pool, or migrate liquidity to a new pool. Re-check after any announced migration.
- Concentrated liquidity (V3-style). In Uniswap V3, positions are NFTs, not fungible LP tokens. Locking means locking the NFT. A position can also be placed in a narrow price range, so a "locked" position may provide almost no depth at the current price.
- Thin base-asset side. A lock on a pool holding 0.3 ETH and a huge token reserve is almost worthless. Look at the real value on the base-asset side.
- Pairing with a token the deployer controls. If the pool is TOKEN/OTHERTOKEN and the deployer can mint OTHERTOKEN, the locked pool holds little of real value.
A quick reading routine for this chapter
- Find the pair address and confirm it is the pool where most trading happens.
- Read the reserves and estimate the base-asset value. Ask what happens to the price if a holder sells 1% of supply.
- List the largest LP token holders.
- Classify each large holder as wallet, locker, burn address, or unknown contract.
- Compute the locked or burned share of the LP supply.
- Read the unlock date and compare it with the project's stated timeline.
- Record what the lock does not cover, then continue to the contract and holder checks.
Exercise
A pool holds 20 ETH and 2,000,000 TOKEN. The deployer holds 100% of the LP tokens, and a 10% share of the token supply is also in the deployer's wallet. The project announces "liquidity locked for 30 days" after depositing 50% of the LP tokens in a locker. List two ways the deployer could still extract ETH, and one thing to check next.
Show answer
First, the deployer still holds the other 50% of the LP tokens and can redeem them at any time, removing about half of the pool's reserves. Second, the deployer can sell the tokens in their wallet into the pool, taking ETH from the pool even without touching LP tokens. After 30 days the locked half also becomes redeemable. Next, check the contract for owner powers such as minting, blacklisting, or adjustable sell taxes, because a lock does not limit them. Also confirm the locker address from the pair's holder list and verify the real locked percentage.
Exercise
In a constant-product pool with 5 ETH and 500,000 TOKEN, how many TOKEN does a buyer receive for 1 ETH, ignoring fees?
Show answer
k = 5 × 500,000 = 2,500,000. After the buy the pool holds 6 ETH, so it must hold 2,500,000 / 6 ≈ 416,667 TOKEN. The buyer receives 500,000 − 416,667 ≈ 83,333 TOKEN, about 16.7% of the pool's tokens, which shows how strongly a shallow pool reacts to a small trade.