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

Inflation Attack

An inflation attack is a DeFi exploit where an attacker artificially inflates the supply of a liquidity pool's LP token to steal a disproportionate share of the underlying assets.
Chainscore © 2026
definition
BLOCKCHAIN SECURITY

What is an Inflation Attack?

An inflation attack is a cryptographic exploit where an attacker manipulates a blockchain's token supply to devalue holdings or steal funds.

An inflation attack is a cryptographic exploit targeting blockchain systems, particularly those with custom token standards, where an attacker artificially inflates the token supply to devalue other holders' assets or drain liquidity pools. Unlike a traditional 51% attack on consensus, this attack vector exploits vulnerabilities in a token's smart contract logic, specifically its balanceOf and totalSupply functions. The attacker mints a massive number of tokens to themselves, often at little to no cost, before interacting with decentralized applications (dApps) that rely on inaccurate supply data.

The attack typically unfolds in two phases. First, the attacker mints a vast quantity of the vulnerable token, often by directly calling a flawed mint function or exploiting a logic error. Second, they use these newly minted tokens to interact with a decentralized exchange (DEX) or lending protocol. For example, they might deposit the inflated tokens into a liquidity pool and then withdraw a disproportionate amount of a paired asset (like ETH), effectively stealing value. The protocol's calculations, which use the manipulated totalSupply, fail to correctly assess the token's true market value.

This attack is most famously associated with early implementations of the ERC-20 and ERC-777 standards that did not properly secure minting permissions or used a totalSupply variable that could be corrupted. A historical example is the BNB Smart Chain (BSC) exploit in 2021, where an attacker inflated the supply of several tokens to drain liquidity from PancakeSwap pools. Defenses against such attacks include implementing robust access controls for minting, using the Checks-Effects-Interactions pattern, and having dApps perform independent price oracle checks rather than relying solely on the token contract's reported supply.

key-features
MECHANISM

Key Features of an Inflation Attack

An inflation attack is a manipulation of a token's supply or valuation mechanism to devalue holdings. It exploits vulnerabilities in minting, staking, or governance logic.

01

Supply Manipulation

The core mechanism involves artificially and rapidly increasing the total supply of a token. This is often achieved by exploiting a mint function without a corresponding increase in the protocol's underlying value or collateral. The attacker's goal is to dilute the value of existing holders' tokens, effectively stealing their share of the network.

02

Staking Reward Exploit

A common vector targets liquidity mining or staking reward mechanisms. An attacker deposits a massive amount of capital (often borrowed) to claim the majority of newly minted reward tokens. They then sell these rewards on the market, crashing the price and devaluing the rewards for legitimate participants.

03

Governance Token Takeover

In Decentralized Autonomous Organizations (DAOs), an attacker may acquire a majority of governance tokens cheaply, often via a market attack. Once in control, they can pass malicious proposals to mint unlimited new tokens to themselves or drain the treasury, rendering the original tokens worthless.

04

Oracle Price Manipulation

This variant targets protocols that use oracles to determine minting rights or collateral ratios. By manipulating the price feed (e.g., via a flash loan attack on a DEX pool), the attacker can trick the protocol into believing collateral is worth far more than it is, allowing them to mint a disproportionate amount of new tokens.

05

Lack of Supply Caps

A fundamental vulnerability is a smart contract without a hard cap on total token supply or with minting permissions that are too permissive. This allows any address with minting rights (which could be compromised via governance or an admin key) to create tokens arbitrarily.

06

Defensive Measures

Protocols defend against inflation attacks through several key mechanisms:

  • Supply Caps: Implementing a fixed maximum supply.
  • Timelocks & Multisigs: Delaying or requiring consensus for minting functions.
  • Fair Launch Mechanics: Using immutable contracts with no privileged minting after launch.
  • Circuit Breakers: Pausing minting if anomalous activity is detected.
how-it-works
SECURITY VULNERABILITY

How an Inflation Attack Works: Step-by-Step

An inflation attack is a sophisticated exploit targeting the price calculation mechanisms of decentralized finance (DeFi) protocols, particularly automated market makers (AMMs) and lending platforms, to artificially inflate the value of a token and drain liquidity.

An inflation attack is a manipulation of a decentralized exchange's (DEX) liquidity pool where an attacker exploits the pool's pricing formula to artificially inflate the perceived value of a worthless or newly created token. The core vulnerability lies in the constant product formula x * y = k used by AMMs like Uniswap V2. By donating a massive amount of the worthless token to the pool with minimal paired liquidity (e.g., ETH), the attacker dramatically skews the price ratio, making a tiny amount of the paired asset appear to be worth a vast quantity of the inflated token.

The attack proceeds in distinct phases. First, the attacker creates a new ERC-20 token and establishes a liquidity pool, often pairing it with a valuable asset like WETH, but providing a minuscule amount of the paired asset—sometimes just 1 wei. Next, in the critical donation phase, the attacker transfers a huge quantity of their own token directly to the pool's contract address. This donation increases the pool's reserve of the worthless token without requiring a swap, drastically altering the x * y = k constant and making the pool's quoted price for the valuable asset astronomically high when measured in the attacker's token.

Finally, the attacker exploits this manipulated price. They use a vulnerable third-party protocol—such as a lending platform that uses the DEX's spot price for oracle data or a liquidity mining contract that calculates rewards based on pool reserves. The protocol, seeing the inflated value, allows the attacker to borrow substantial assets against their now 'valuable' token collateral or claim oversized liquidity provider (LP) rewards. The attack concludes when the attacker withdraws their initial tiny liquidity, causing the pool's price to collapse and leaving the exploited protocol with worthless tokens.

This attack vector is distinct from a simple flash loan attack or rug pull, as it doesn't rely on borrowing assets or hiding malicious code. Its success hinges on the economic design of the target protocol and its uncritical reliance on a single, manipulable price source. Notable historical examples include attacks on the Warp Finance and Value DeFi protocols in 2020, where attackers used this method to steal millions by exploiting price oracles derived from vulnerable liquidity pools.

Mitigation strategies are now standard in modern DeFi design. Key defenses include using time-weighted average price (TWAP) oracles that smooth out short-term price spikes, implementing liquidity pool guards that require minimum reserve balances, and designing incentive contracts to use virtual liquidity or check for anomalous reserve changes. Protocols must also carefully audit any integration that uses spot prices from pools containing new or low-liquidity tokens to prevent this precise form of financial sabotage.

visual-explainer
INFLATION ATTACK

Visualizing the Attack Flow

A step-by-step breakdown of how an inflation attack is executed against a liquidity pool, illustrating the manipulation of token ratios to extract value.

An inflation attack is a sophisticated exploit targeting the mathematical mechanics of Automated Market Makers (AMMs). It begins when an attacker identifies a liquidity pool with a low total value locked (TVL) and a significant imbalance in its token reserves, often where one token is newly launched or has a small circulating supply. The attacker's goal is to artificially inflate the supply of the vulnerable token within the pool, drastically altering its price relative to the paired asset, such as a stablecoin or ETH.

The core manipulation involves a two-step process. First, the attacker donates or directly transfers a large amount of the vulnerable token into the pool's contract. This action does not provide liquidity but massively increases the pool's reserve of that token without a corresponding increase in the other reserve. Because AMM pricing is based on the constant product formula x * y = k, this donation skews the price, making the donated token nearly worthless within the pool. The attacker then immediately adds a small amount of the paired asset (e.g., ETH) as liquidity, minting new liquidity provider (LP) tokens.

The final and critical step is the redemption. The attacker now holds a disproportionate share of the newly minted LP tokens, representing ownership of the now-inflated pool. They then burn these LP tokens to redeem their share of both reserves. Since the pool's composition is heavily skewed, the attacker receives back almost all of the valuable paired asset they contributed, plus a substantial portion of the original valuable tokens that were in the pool before the attack, resulting in a net profit at the expense of existing LPs, whose share of the valuable assets is severely diluted.

security-considerations
GLOSSARY TERM

Security Considerations & Vulnerabilities

An inflation attack is a manipulation of a token's supply or valuation to exploit a protocol's economic logic, often targeting DeFi lending markets or liquidity pools.

01

Core Mechanism

The attacker mints a large quantity of a low-value token (often a newly created one) and uses it as collateral to borrow valuable assets from a lending protocol. The attack exploits the protocol's oracle pricing, which may not immediately reflect the token's true, inflated supply or lack of liquidity, allowing the attacker to drain the protocol's reserves.

02

Oracle Manipulation Vector

This attack critically depends on manipulating the price feed that the protocol relies on. Common targets include:

  • DEX-based oracles that calculate price based on a pool's reserves, which the attacker can skew.
  • Time-weighted average price (TWAP) oracles with short windows that can be manipulated before the average updates. The protocol incorrectly values the inflated collateral, enabling excessive borrowing.
03

Famous Example: MIM Attack on Wonderland

In January 2022, the Wonderland treasury was exploited via an inflation attack on MIM (Magic Internet Money). The attacker:

  1. Created a new token and established a liquidity pool with MIM.
  2. Drastically inflated the new token's supply, manipulating the pool's ratio and thus the oracle price of MIM.
  3. Used the artificially cheap MIM as collateral to borrow other assets from Abracadabra.money, causing significant losses.
04

Mitigation Strategies

Protocols defend against inflation attacks through several mechanisms:

  • Using robust oracles like Chainlink that draw from multiple, high-liquidity sources.
  • Implementing collateral whitelists and rigorous due diligence for new assets.
  • Applying circuit breakers or debt ceilings for specific collateral types.
  • Utilizing time-locked oracles or longer TWAP windows to resist short-term manipulation.
05

Related Vulnerability: Donation Attacks

A similar attack vector targets share-based liquidity pools (e.g., in staking or yield vaults). An attacker donates a large amount of a single asset to the pool, artificially inflating the value of LP shares. This allows them to withdraw a disproportionate amount of the other assets in the pool before the share price corrects. Defended against by using a virtual balance or a minimum lockup period.

examples
INFLATION ATTACK

Real-World Examples & Case Studies

These case studies illustrate how inflation attacks have been executed, mitigated, and theorized in different DeFi contexts.

03

Theoretical Attack on Uniswap V2 Pools

A canonical thought experiment for the attack vector. An attacker targets a new pool with a low total value locked (TVL). The process is:

  1. Donate a large amount of Token A to the pool, skewing the constant product formula x * y = k.
  2. The pool now reports a wildly inflated price for Token B.
  3. The attacker uses this manipulated price as an oracle to borrow assets against Token B on a lending protocol. This highlights the oracle manipulation risk from low-liquidity pools.
05

Stablecoin Pool Vulnerability

Inflation attacks pose a unique threat to stablecoin liquidity pools (e.g., USDC/DAI). Because the assets are pegged, a large, malicious donation can:

  • Drastically lower the spot price of one stablecoin far below its $1 peg.
  • Create a permanent loss scenario for liquidity providers (LPs) that cannot be arbitraged away easily.
  • Undermine the core stability assumption of the pool. This case study emphasizes that even pools of high-quality assets are not immune to this economic exploit.
06

Pre-Launch Token Sale Guardrails

Many launchpads and Initial DEX Offerings (IDOs) now implement specific rules to prevent inflation attacks, turning case studies into best practices. Common mitigations include:

  • Hard caps on initial liquidity to prevent disproportionate contributions.
  • Vesting schedules for team/early investor tokens to limit immediate sell pressure.
  • Liquidity locks using smart contracts to ensure the paired asset cannot be removed.
  • Dynamic pricing mechanisms instead of fixed-ratio launches.
COMPARISON MATRIX

Inflation Attack vs. Other DeFi Exploits

A technical comparison of the Inflation Attack's mechanism and impact against other common DeFi exploit vectors.

FeatureInflation AttackFlash Loan AttackOracle ManipulationReentrancy Attack

Primary Vector

Token Supply Inflation

Capital Borrowing

Price Feed Corruption

State Invariant Violation

Required Capital

High (to mint tokens)

None (borrowed)

High to Moderate

Low to Moderate

Attack Speed

Slow (requires block finality)

Instant (single transaction)

Varies (depends on oracle)

Instant (within a call)

Target Protocol

Rebasing/Elastic Supply Tokens

Liquidity Pools, Lending

Any price-dependent logic

Poorly secured smart contracts

Core Vulnerability

Share Calculation on Deposit

Atomic Transaction Logic

Centralized Data Source

State Update Order

Preventive Measure

Checkpointed Balances

Transaction Atomicity Checks

Decentralized Oracles

Checks-Effects-Interactions

Example Impact

Dilution of user holdings

Instant arbitrage & liquidation

False liquidation or minting

Fund drainage from contract

prevention-mitigation
INFLATION ATTACK

Prevention and Mitigation Strategies

Inflation attacks exploit the economic design of liquidity pools to manipulate token prices. These strategies focus on protecting liquidity providers and the integrity of the Automated Market Maker (AMM) model.

01

Minimum Liquidity Lock

Requiring a minimum amount of liquidity to be locked upon pool creation is a foundational defense. This prevents an attacker from creating a pool with a trivial amount of the legitimate token and a massive amount of the malicious token. A common implementation is to require the first liquidity deposit to be a significant, non-withdrawable amount, raising the capital cost of the attack. This is often the first line of defense in protocols like Uniswap V2 and its forks.

02

Fee-on-Transfer Token Handling

Many inflation attacks use fee-on-transfer tokens, where a tax is levied on each transaction. To mitigate this, AMMs can implement checks that compare the actual token balance received against the expected amount. If a discrepancy is detected (indicating a fee), the transaction can be reverted. This prevents the pool's internal accounting from being desynchronized from the actual token balances, which is a key vulnerability exploited in these attacks.

03

Delayed Pool Initialization

This strategy prevents the first liquidity provider from setting the initial price. Instead, the pool remains inactive until a sufficient amount of liquidity from multiple, independent depositors is added. This ensures the initial price reflects a more honest market consensus rather than being set by a single, potentially malicious actor. It removes the attacker's ability to be the sole price setter for the new pool.

04

Protocol-Level Whitelisting/Blacklisting

Decentralized exchanges or lending protocols can implement token list policies to exclude known malicious or non-standard token types. This is a proactive, though more centralized, measure.

  • Blacklisting: Blocking tokens with known dangerous mechanics (e.g., certain fee-on-transfer or rebase tokens).
  • Whitelisting: Only allowing tokens that have passed a security review or community governance vote. This shifts the burden of due diligence to the protocol or its DAO.
05

Liquidity Provider Education

A critical non-technical mitigation is educating users on the risks of providing liquidity to new or unaudited pools. Key warnings include:

  • Never be the first LP in a pool for an unknown token.
  • Verify that the pool creator has locked a substantial amount of liquidity.
  • Be cautious of pools containing tokens with unusual contract code. Informed LPs are the last line of defense against social engineering aspects of the attack.
06

Advanced AMM Designs (V3+)

Newer AMM designs incorporate architectural changes that reduce the attack surface. For example, Uniswap V3's concentrated liquidity model means initial LPs typically deposit significant capital into tight price ranges, making it economically unfeasible to manipulate the price across the entire curve. The focus on larger, targeted capital deposits inherently raises the cost of an inflation attack compared to V2-style pools where liquidity is spread uniformly.

DEBUNKED

Common Misconceptions About Inflation Attacks

Inflation attacks are a sophisticated DeFi exploit, but they are often misunderstood. This section clarifies the mechanics and dispels common myths about this security vulnerability.

An inflation attack is a DeFi exploit where an attacker manipulates a liquidity pool's token ratio by donating a massive amount of a single token, artificially inflating its supply within the pool to steal funds from other liquidity providers (LPs). The core mechanism exploits the constant product formula (x * y = k) used by Automated Market Makers (AMMs) like Uniswap V2. By drastically skewing the pool's reserves, the attacker can cause a victim's LP share to be redeemable for a negligible amount of the valuable asset, allowing the attacker to then withdraw the majority of the pool's value.

INFLATION ATTACK

Frequently Asked Questions (FAQ)

An inflation attack is a sophisticated exploit targeting the minting mechanism of liquidity pool (LP) tokens. This FAQ explains how it works, its impact, and the preventative measures used by modern protocols.

An inflation attack is a malicious exploit where an attacker manipulates a liquidity pool's token supply to steal the funds of a legitimate liquidity provider (LP). The attacker artificially inflates the pool's total supply of LP tokens, diluting the value of existing tokens to near zero before withdrawing a disproportionate share of the underlying assets.

How the Attack Unfolds

  1. An attacker identifies a new or low-liquidity pool.
  2. They deposit a large amount of a single token (e.g., ETH) to mint a massive number of new LP tokens.
  3. They send a trivial amount of the other token (e.g., USDC) directly to the pool's contract, bypassing the minting function. This increases the pool's reserves without minting corresponding LP tokens, making each existing LP token worth less.
  4. The attacker then burns their massive stack of LP tokens, claiming a large portion of the now-inflated reserves, leaving the original LP's tokens nearly worthless.
further-reading
INFLATION ATTACK

Further Reading & Technical Resources

Explore the technical mechanisms, historical examples, and defensive strategies for this critical DeFi vulnerability.

03

Real-World Incident: Rari Capital's Fuse Pool

A practical case study occurred in May 2022 against a Rari Capital Fuse pool. An attacker executed a classic inflation attack:

  • Used a flash loan to deposit a massive amount of a single asset.
  • A victim made a normal deposit, receiving a tiny share of the now-inflated pool.
  • The attacker withdrew, burning the victim's share value. This incident demonstrated the risk to non-ERC-4626 compliant pools and led to a loss of approximately $11 million, underscoring the need for standardized vault logic.
04

Prevention & Mitigation Strategies

Developers can implement several defenses:

  • Seed Liquidity: Deploy the vault with an initial deposit (a "seed") to establish a base share price, making inflation economically prohibitive.
  • Use preview Functions: As per ERC-4626, always call simulation functions before committing funds.
  • Oracle-Based Deposits: For non-standard pools, use a trusted external price oracle (e.g., Chainlink) to calculate deposit amounts instead of relying solely on the pool's internal ratio.
  • Dead Share Prevention: Implement a minimum share minting requirement to block dust attacks.
05

Related Concept: Donation Attack

A closely related exploit that is the inverse of an inflation attack. In a donation attack, an attacker donates (or transfers without minting shares) a large amount of tokens to a vault. This artificially inflates the value per share. The attacker then deposits a small amount to mint shares at the inflated price. When the share price corrects (e.g., after a victim's withdrawal), the attacker profits. Both attacks exploit the manipulability of share price in simple vault implementations.

06

Audit Checklist for Vault Security

Security auditors focus on specific red flags for inflation/donation vulnerabilities:

  • Does the vault lack an initial seed deposit?
  • Are deposit/mint functions susceptible to front-running?
  • Does share calculation rely solely on internal balances without safeguards?
  • Is the contract not compliant with ERC-4626 preview function requirements?
  • Can the totalAssets() or totalSupply() be manipulated in a single transaction (e.g., via flash loans)? Addressing these points is critical for secure vault deployment.
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