Merkle Airdrop

Committing a distribution to one root hash and letting each claimant prove their leaf.

Basically

A Merkle airdrop lets thousands of people claim tokens without the project sending each person a separate payment. The project stores one short code on a public database to represent the full list of claims.

Key Takeaways

  • A Merkle airdrop stores one Merkle root hash on-chain. Thousands or millions of recipients can claim tokens with a Merkle proof of their eligibility.
  • Standard airdrops need one transaction per recipient. Merkle airdrops move gas costs from the distributor to individual claimants and reduce deployment cost from O(N) to O(1).
  • Uniswap (250,000 addresses), ENS (137,689 addresses), and Arbitrum (625,000 addresses) have used Merkle airdrops for large-scale token distribution.

What Is a Merkle Airdrop?

A Merkle airdrop lets eligible recipients claim tokens from a smart contract by proving that they appear on a predefined list, rather than sending tokens to every address individually. The project builds a Merkle tree off-chain from all eligible addresses and amounts, then stores only the 32-byte root hash in the distribution contract. You claim your tokens by submitting a compact proof that your address and amount are part of the tree.

Richard Moore, creator of the ethers.js library, first proposed the pattern in a March 2018 blog post titled "Merkle Air-Drops: Make Love, Not War." He demonstrated the distribution of 2.5 million tokens to 1 million addresses, with a deployment cost of roughly $0.90 and a per-claim cost of roughly $0.17. Uniswap's September 2020 UNI airdrop then popularised the approach at scale and became the canonical reference implementation for the pattern.

How It Works

A Merkle airdrop has three phases: tree construction, contract deployment, and user claiming. The project builds the tree and deploys the contract before you claim.

Tree Construction (Off-Chain)

The project compiles a list of eligible addresses and their token amounts. It hashes each (index, address, amount) tuple to create a leaf node, then pairs and hashes the leaves iteratively into a binary tree until a single root hash remains.

The project publishes the full eligibility list and tree structure off-chain, typically as a JSON file hosted on IPFS or a web server. You use this data to generate your proof.

Contract Deployment (On-Chain)

The distribution smart contract stores three pieces of state: the ERC-20 token address, the Merkle root, and a bitmap for tracking which claims have been made. Deployment cost stays constant regardless of the number of recipients because only the 32-byte root is stored.

Claim Process (User Perspective)

You follow a straightforward flow to claim your tokens. Your claim proves that your address and amount belong to the tree.

You pay the gas fee for your own claim transaction. A tree with 100,000 addresses produces a proof of roughly 17 hashes (log2 of the number of leaves), so verification is computationally cheap.

Bitmap Claim Tracking

The Uniswap implementation introduced an optimisation for tracking addresses that have already claimed. It packs 256 boolean flags into a single uint256 storage slot with bitwise operations, instead of using a mapping(address => bool), and maps each claim index to a specific bit position. Storage write costs fall by approximately 45% compared with individual boolean mappings.

Merkle Airdrops vs. Standard Airdrops

A standard, push-style airdrop sends tokens to each recipient in separate transactions. Each ERC-20 transfer costs approximately 65,000 gas, so 250,000 recipients require 250,000 transactions and roughly 16.65 billion gas in total. The project pays all of these costs.

Uniswap UNI Airdrop (September 2020)

Uniswap distributed 150 million UNI tokens, or 15% of the 1 billion total supply, to approximately 250,000 eligible addresses. Every address that had interacted with the protocol received 400 UNI, including roughly 12,000 addresses that had only submitted failed transactions. Liquidity providers received an additional allocation of approximately 49 million UNI.

The claim window ran until 30 November 2023, over three years after launch, and approximately 90.8% of eligible wallets claimed within the first month. Around 30,000 addresses, roughly 12%, never claimed, leaving approximately 12 million UNI unclaimed. The Uniswap/merkle-distributor contract became the canonical open-source reference for the pattern.

ENS Airdrop (November 2021)

The Ethereum Name Service distributed 25 million ENS tokens, or 25% of the 100 million total supply, to 137,689 eligible addresses. Claimants received over 14.4 million tokens within four days, and 59.6% of eligible addresses had claimed by the end of the first week. The claim window closed on 4 May 2022, and 5.4 million unclaimed tokens were transferred to the DAO treasury.

Arbitrum ARB Airdrop (March 2023)

Arbitrum distributed 1.275 billion ARB tokens, or 12.75% of total supply, to approximately 625,000 eligible addresses. Its Sybil resistance analysis filtered these addresses from 2.3 million wallets and removed roughly 72% of applicants. The median allocation was 1,250 ARB, with a maximum of 10,250 ARB per address.

Use Cases

Token distribution is the most common application of Merkle proofs. The same pattern also supports several related use cases.

Gas Costs for Claimants

Merkle airdrops eliminate gas costs for the distributor, but you must pay gas to submit your claim transaction. High network congestion can make the gas cost exceed the value of smaller allocations, so claiming becomes uneconomical. Mass claiming immediately after announcement can also spike gas prices, creating a rush where early claimers pay less than latecomers.

Unclaimed Tokens

You must actively claim, so a significant percentage of allocations often go unclaimed. Uniswap saw roughly 12% of addresses never claim, while ENS had roughly 40% unclaimed after the first week. Projects typically set a deadline after which unclaimed tokens revert to the treasury or are burned, and you lose your allocation permanently if you miss the window.

Phishing and Scam Claim Pages

Airdrop announcements attract scammers who create fake claim pages designed to steal funds. These phishing sites impersonate the official interface and prompt you to approve malicious token transactions or sign harmful messages. You must verify the official contract address and claim URL before connecting your wallet.

Second Preimage Attacks

Naive Merkle tree implementations have a known vulnerability: an attacker can concatenate two legitimate 32-byte leaf hashes into a 64-byte value that hashes to a valid intermediate node, creating a fake leaf. OpenZeppelin mitigates this by double-hashing leaves, so projects should always use audited libraries like OpenZeppelin's MerkleProof rather than implementing verification from scratch. A smart contract audit is critical for any distribution contract holding significant value.

Sybil Farming

Airdrop farmers create hundreds of wallets to interact with protocols, hoping each one will qualify for a Merkle airdrop. Their activity dilutes rewards for genuine users. Projects counter this with on-chain analytics and Sybil detection, and Arbitrum filtered out 72% of applicant wallets as suspected Sybil addresses before generating its Merkle tree.

Why It Matters

Merkle airdrops solved the fundamental scalability problem of on-chain token distribution. Earlier distributions to thousands of addresses required proportional on-chain costs, which made large-scale airdrops prohibitively expensive. A single root hash compresses the entire eligibility list and lets users claim for themselves, enabling the massive community distributions that became a defining feature of DeFi governance.

Merkle proofs also apply beyond token airdrops. Any system that needs to verify membership in a large set without storing the full set on-chain can use them, including allowlist verification, reward distribution, and eligibility checks across smart contract platforms. You can read the research on sustainable tokenomics and DeFi revenue models for a deeper look at how token distribution models shape protocol economics.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. You should always do your own research before using any protocol or technology.

0

← All 1876 glossary terms