Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Poison Token

A poison token is a maliciously crafted ERC-20 token designed to violate standard assumptions in DeFi smart contracts, enabling exploits.
Chainscore © 2026
definition
BLOCKCHAIN SECURITY

What is a Poison Token?

A poison token is a malicious cryptocurrency or token designed to exploit vulnerabilities in a user's wallet or a decentralized application (dApp), often resulting in asset theft or loss.

A poison token is a malicious digital asset created by an attacker and airdropped or transferred to a target's wallet address. Its primary purpose is to exploit vulnerabilities in wallet software or smart contract interactions, such as those that automatically attempt to interact with received tokens. This can trigger a malicious transaction, often disguised as a harmless approval request, that grants the attacker control over the victim's other assets. The term "poison" reflects its nature as a trap, lying dormant until a user or automated system interacts with it.

The most common attack vector involves malicious token approvals. A poison token's smart contract may contain code that, when a user signs a transaction to interact with it (e.g., to send it away or check its balance), instead grants unlimited spending permissions for a valuable asset like ETH or USDC to the attacker's address. This exploits the common wallet behavior of requesting user signatures for token approvals. Other variants may exploit specific smart contract vulnerabilities in dApps that automatically process incoming tokens, leading to reentrancy attacks or logic errors.

Defensive measures against poison tokens include revoking unnecessary token approvals using tools like Etherscan's Token Approvals checker, being extremely cautious with unsolicited airdrops, and using wallet software that displays clear transaction decoding. Developers mitigate this risk by implementing robust validation in dApp smart contracts, such as using a whitelist of known token addresses and avoiding automatic interactions with untrusted tokens. The phenomenon is closely related to other deceptive token types like honeypot tokens, which trap funds by preventing sales, and dusting attacks, which are used for chain analysis rather than direct theft.

how-it-works
SECURITY VULNERABILITY

How a Poison Token Attack Works

A poison token attack is a sophisticated exploit targeting decentralized finance (DeFi) protocols by manipulating the behavior of maliciously crafted ERC-20 tokens to trigger unintended contract logic.

A poison token attack is a smart contract exploit where an attacker creates a custom ERC-20 token designed to subvert the internal accounting of a vulnerable DeFi protocol. The attack typically occurs when the protocol's code iterates over a user's token balance using a for loop, such as during reward distribution or balance calculations. The malicious token's transfer or transferFrom function contains a callback that re-enters the vulnerable contract, disrupting the loop's index and causing it to skip subsequent legitimate tokens or execute logic multiple times. This can lead to incorrect state updates, frozen funds, or the draining of assets.

The core vulnerability stems from the ERC-20 standard's optional transfer callbacks and the failure of protocols to adhere to the checks-effects-interactions pattern. When a contract sends tokens before updating its internal state, the malicious token's callback can manipulate the ongoing operation. For example, an attacker might donate a small amount of the poison token to a victim's address or a liquidity pool. When the protocol later processes that address, the callback triggers, allowing the attacker to exploit the flawed loop logic to steal rewards or collateral from other users.

A canonical example is the 2022 attack on the Siren Protocol, where a poison token exploited a market liquidation function. The attacker's token caused the contract's loop to reset, allowing them to repeatedly liquidate the same position and drain funds. Mitigation requires rigorous smart contract auditing and defensive programming techniques, such as using a pull-over-push architecture for distributions, implementing a reentrancy guard, and avoiding state changes after external calls. Understanding this attack vector is critical for developers building secure, composable DeFi systems.

key-features
MECHANICAL ATTRIBUTES

Key Characteristics of Poison Tokens

Poison tokens are defined by specific technical mechanisms designed to disrupt or exploit DeFi protocols. Understanding these core attributes is essential for risk assessment.

01

Non-Standard Transfer Logic

A poison token's defining feature is a non-standard ERC-20 transfer function that intentionally deviates from the expected behavior. Instead of simply moving tokens from A to B, the function may:

  • Revert on specific conditions (e.g., if the recipient is a DEX pool).
  • Charge excessive fees that are siphoned to the attacker.
  • Lock tokens in the recipient's address, making them unusable. This breaks the fundamental assumption of composability, causing transactions in integrated protocols to fail.
02

Target: DeFi Composability

These tokens are engineered to exploit the composability of DeFi, where protocols seamlessly interact. They target common patterns:

  • Liquidity Pool Deposits: A user approves and calls addLiquidity on a DEX; the non-standard transferFrom fails, causing the entire transaction to revert and potentially locking funds.
  • Flash Loan Repayments: A flash loan contract attempting to repay using the poison token will fail, allowing the attacker to steal the borrowed assets.
  • Proxy/Upgradeable Contracts: May exploit storage collision during delegate calls.
03

Common Exploit Vectors

Attackers deploy poison tokens to trigger specific failure modes in victim contracts:

  • Griefing: Simply preventing a protocol's function from completing, often to disrupt operations or extract a ransom.
  • Fund Theft: Causing a failure in a conditional flow (like a flash loan repayment) that allows the attacker to seize collateral.
  • Governance Attack: Blocking the execution of a governance proposal by ensuring a token transfer within the proposal's logic fails. The 2021 MakerDAO governance attack, where a 'shadow token' disrupted proposal execution, is a canonical example.
04

Detection & Mitigation

Protocols must implement defensive checks to avoid poison token vulnerabilities:

  • Using balanceOf Checks: Instead of relying solely on the return value of transfer or transferFrom, check the recipient's balance change before and after the call.
  • Employing a Deny List: Maintaining an on-chain or off-chain list of known malicious token addresses.
  • Standard Compliance Verification: Using libraries like OpenZeppelin's SafeERC20 wrapper, which uses safeTransfer to handle non-compliant tokens.
  • Isolating External Calls: Treating all token interactions as potentially hostile and isolating them in the transaction flow.
05

Relation to ERC-20 Standards

The exploit exists due to a gap between the de facto standard and the formal EIP-20 specification. The EIP states a transfer must return true on success but does not mandate specific behavior for failures beyond reverting. Malicious tokens comply technically (they revert) but do so strategically to cause maximum damage. This highlights the risk of relying on unverified external contracts in a trustless environment.

06

Distinction from Scam Tokens

It is crucial to distinguish poison tokens from simple scam tokens:

  • Poison Token: A technical weapon. Its code is designed to actively break other systems. It may have no value itself.
  • Scam/Rug Pull Token: A financial scam. It uses standard code but involves malicious human action (e.g., minting unlimited supply, removing liquidity). A poison token attack is a smart contract exploit; a rug pull is a market manipulation and exit scam. The former breaks code, the latter breaks trust.
common-attack-mechanisms
EXPLOIT PATTERNS

Common Poison Token Mechanisms

Poison tokens are designed to disrupt DeFi protocols by exploiting specific smart contract logic. These are the most prevalent technical mechanisms used in these attacks.

01

Fee-on-Transfer Tax

A token that charges a percentage fee on every transfer, which is not reflected in the token's balanceOf return value. This breaks the standard assumption that balanceOf(to) == previousBalance + amount. When a protocol calculates rewards or liquidity based on the inaccurate balance, it creates an accounting mismatch that can be exploited.

  • Example: A user deposits 100 tokens, but due to a 10% fee, the contract only receives 90. The protocol still credits the user for 100, allowing them to withdraw more than the contract holds.
02

Rebasing / Balance Inflation

A token where the holder's balance automatically increases or decreases at set intervals, independent of transfers. This violates the expectation of a static balanceOf return. If a protocol snapshots a user's balance for rewards or voting power before a rebase, the value becomes incorrect, allowing for manipulation.

  • Key Feature: The totalSupply and individual balances change programmatically, often to peg to another asset's value.
03

Transfer Restriction Hooks

A token that overrides the standard transfer or transferFrom functions with custom logic that can block transactions based on conditions like sender, receiver, time, or amount. This can trap funds inside a protocol's smart contract.

  • Attack Vector: A user deposits the token into a lending protocol. Later, the token's contract blocks transfers from the protocol's address, making it impossible to withdraw or liquidate the collateral, freezing the protocol's funds.
04

Whale Tax / Progressive Fees

A fee structure that applies dynamically based on transaction size or holder balance. Large transfers (often deemed "whale" transactions) incur prohibitively high fees, sometimes up to 99%. This targets protocols that perform large, automated transfers for functions like liquidity provisioning or large liquidations.

  • Impact: A lending protocol attempting to liquidate a large position could have almost the entire collateral seized eaten by fees, rendering the liquidation pointless and insolvent.
05

Reflection / Passive Yield

A token that distributes a portion of every transaction fee as rewards to existing holders, directly to their wallets. This continuously changes the token's totalSupply and the balances of all holders, including smart contracts. Protocols holding these tokens see their balance fluctuate unpredictably, breaking internal accounting for collateral value or pool reserves.

06

Blacklist Function

A centralized function allowing the token deployer to add addresses to a blacklist, preventing them from sending or receiving the token. This is a severe form of transfer restriction. If a DeFi protocol's core contract is blacklisted, all user funds denominated in that token within the protocol become permanently frozen and unrecoverable.

real-world-examples
POISON TOKEN

Real-World Examples & Exploits

Poison tokens are a specific type of malicious smart contract designed to exploit vulnerabilities in DeFi protocols. These examples illustrate how they have been used to manipulate liquidity, trigger liquidations, and steal funds.

03

Transfer Fee Manipulation

Some tokens implement transfer fees (e.g., a 1% tax on sends). While sometimes legitimate, attackers can weaponize this. If a protocol's logic assumes balanceOf reflects the actual received amount, it can be tricked. For example, a user might appear to provide 100 tokens as collateral, but due to the fee, only 99 arrive. If the protocol lends based on the 100 figure, it creates an instant, risk-free bad debt position for the attacker.

04

The "BalanceOf" Override Attack

A classic poison token exploit involves overriding the standard balanceOf function. The token returns a manipulated balance, such as always reporting a user's balance as type(uint256).max. An unsuspecting protocol that uses this to check collateralization ratios would see the attacker as infinitely solvent, allowing them to borrow all available assets without ever being liquidated.

05

Prevention & Mitigation Strategies

Protocols defend against poison tokens through rigorous token whitelisting and security audits. Key technical mitigations include:

  • Using internal balance tracking instead of relying on external balanceOf calls.
  • Implementing time-weighted average price (TWAP) oracles resistant to single-block manipulation.
  • Adding pause functions and circuit breakers to halt operations during anomalous price movements.
  • Thoroughly vetting token standards and rejecting non-standard implementations.
06

Related Concept: Flash Loan Attacks

Poison tokens are often deployed in conjunction with flash loans. An attacker borrows a massive amount of capital to:

  1. Poison a liquidity pool (via donation).
  2. Manipulate an oracle price using the poisoned pool.
  3. Exploit the incorrect pricing on a lending protocol to borrow or liquidate assets.
  4. Repay the flash loan and pocket the profit, all within a single transaction block. This combines oracle manipulation with capital efficiency for devastating effect.
security-considerations
POISON TOKEN

Security Considerations & Mitigations

A poison token is a malicious ERC-20 token designed to exploit vulnerabilities in decentralized exchange (DEX) smart contracts, primarily by manipulating liquidity pool pricing or causing transaction failures. This section details its mechanisms and defensive strategies.

01

Core Attack Vector: Fee-on-Transfer

The most common poison token exploit uses a fee-on-transfer mechanism. When a user attempts to swap for the token, a hidden tax is deducted after the DEX's price calculation. This causes the contract to send more tokens than it receives, resulting in a failed transaction and a loss of gas fees for the victim.

  • Example: A token with a 10% transfer fee. The DEX calculates a swap for 100 tokens, but only 90 arrive in the user's wallet, causing a revert.
02

Defensive Tactic: Balance Checks

The primary mitigation is implementing a balance check before and after the token transfer. A secure contract will:

  1. Record the contract's balance of the output token before the swap.
  2. Execute the transfer to the user.
  3. Verify the actual amount received equals (new_balance - old_balance).

If the received amount is less than expected, the transaction should revert to protect the user's funds.

03

Related Threat: Whitelist Bypass

Some poison tokens exploit token whitelist logic in contracts. If a DEX only checks if a token is not on a blacklist, an attacker can deploy a new, malicious token with the same interface. Robust security requires positive permissioning (a strict whitelist of known-good tokens) rather than just a list of known-bad ones.

04

Developer Best Practices

To build resilient systems:

  • Use established libraries: Rely on battle-tested DEX routers and liquidity pool implementations that have integrated balance checks.
  • Implement slippage controls: While not a complete fix, minimum output amount parameters can provide a secondary defense.
  • Audit token contracts: For projects launching their own tokens, ensure the contract does not contain unexpected fee logic that could be exploited by others.
05

User Protection & Warnings

End-users can mitigate risk by:

  • Avoiding unknown tokens: Be highly skeptical of tokens with no verified contract source, low liquidity, or recent creation.
  • Using reputable interfaces: Major front-ends often integrate basic poison token detection.
  • Understanding transaction previews: If a swap preview shows an implausibly good rate for an obscure token, it is likely a trap.
06

Historical Context & Impact

Poison token attacks gained prominence around 2021-2022, targeting automated market makers (AMMs) like Uniswap V2. While the direct financial loss is typically limited to wasted gas fees, the attack creates network congestion and erodes user trust. The standardization of balance check mitigations in later protocol versions (e.g., Uniswap V3 routers) has reduced their prevalence.

COMPARISON MATRIX

Poison Token vs. Other Malicious Tokens

A technical comparison of exploit mechanisms, objectives, and detection difficulty for common malicious token types on EVM chains.

Feature / MechanismPoison TokenHoneypot TokenRug Pull TokenMalicious Airdrop Token

Primary Exploit Vector

Traps assets via approval griefing

Prevents selling after purchase

Removes liquidity or mints unlimited supply

Traps assets via malicious approval

User Action to Trigger

Interacting with or transferring the token

Attempting to sell the token

Project team executes malicious contract function

Claiming the airdropped tokens

Immediate User Impact

Assets locked in wallet, cannot be moved

Purchase succeeds, sale fails, funds lost

Token value drops to near zero

Wallet approvals grant attacker spending rights

Developer Objective

Griefing, denial-of-service, extortion

Steal purchase capital directly

Exit scam with pooled investor funds

Drain approved tokens from victim wallets

On-Chain Detection Difficulty

High (requires analysis of transfer logic)

Medium (sell simulation reveals trap)

Low (visible in liquidity locks/owner functions)

Medium (requires approval audit post-claim)

Common Prevention Method

Revoke unused approvals, use permit2

Pre-trade contract simulation

Verify renounced contract ownership

Reject unsolicited airdrops, revoke approvals

Persistence After Discovery

Permanent for affected wallets

Ends when contract is identified

Permanent for the token project

Permanent until approvals are revoked

Example Standard

ERC-20 with custom _transfer hook

ERC-20 with sell blacklist

ERC-20 with mint() or withdraw() owner function

ERC-20 with hidden transferFrom in approve

FAQ

Common Misconceptions About Poison Tokens

Poison tokens are a sophisticated on-chain attack vector that exploits the logic of decentralized exchanges and lending protocols. This section addresses frequent misunderstandings about their mechanics, detection, and impact.

A poison token is a malicious ERC-20 token designed to exploit the internal accounting of DeFi protocols by manipulating token balances or approvals. It works by overriding standard ERC-20 functions like transfer or transferFrom with malicious logic that triggers when the token is moved. For example, a common attack vector is the allowance poisoning exploit, where a token's transferFrom function increases the spender's allowance instead of decreasing it, tricking a protocol's internal accounting into believing the user has an infinite allowance, which can then be drained. These tokens are often airdropped to victims or placed in liquidity pools to ensnare unsuspecting users or automated systems.

POISON TOKEN

Frequently Asked Questions (FAQ)

Common questions about the security exploit known as a poison token, which manipulates token approvals to drain user wallets.

A poison token attack is a smart contract exploit where a malicious ERC-20 token manipulates a user's token approval to a vulnerable decentralized application (DApp), enabling the attacker to drain approved funds from the victim's wallet. The attack works by exploiting a common pattern where DApps check a user's token balance by calling the balanceOf function on a token address provided by the user. The poison token's balanceOf function returns a manipulated address—often the attacker's own contract—instead of the user's address. If the DApp then uses this returned address for subsequent operations, like transferring tokens the user has approved, it inadvertently sends the user's funds to the attacker.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Poison Token: Definition & Security Risks in DeFi | ChainScore Glossary