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
Guides

Setting Up a Reputation-Based Token Airdrop Campaign

A technical guide for developers on designing and deploying a token airdrop where eligibility and allocation size are determined by a user's on-chain reputation or contribution history.
Chainscore © 2026
introduction
GUIDE

Setting Up a Reputation-Based Token Airdrop Campaign

A step-by-step tutorial for developers to design and deploy a token distribution that rewards users based on their on-chain reputation and contributions.

A reputation-based airdrop is a targeted token distribution strategy that moves beyond simple wallet snapshots. Instead of rewarding mere presence, it allocates tokens based on a user's provable on-chain history, such as transaction volume, governance participation, liquidity provision, or social engagement. This approach aims to reward genuine contributors, align incentives with long-term protocol growth, and mitigate Sybil attacks by making it economically unfeasible to farm the airdrop with thousands of wallets. Projects like Ethereum Name Service (ENS) and Optimism have pioneered this model, using complex eligibility criteria to distribute their governance tokens.

The first step is defining your eligibility criteria and scoring mechanism. You must decide which on-chain actions contribute to a user's reputation score. Common metrics include: - Gas spent on transactions - Volume traded on associated DEXs - Duration of liquidity provided in pools - Number of governance proposals created or voted on - Activity in related NFT or social ecosystems. These actions are queried from blockchain data using services like The Graph, Dune Analytics, or custom indexers. Each action is assigned a point value, and a user's total score determines their token allocation tier.

Next, you must design the claim mechanism. The most secure and common pattern is a merkle tree claim contract. Here's a simplified workflow: 1. Off-chain, you generate a merkle root from a list of eligible addresses and their calculated token amounts. 2. Deploy a claim contract that stores this merkle root. 3. Eligible users call a claim function, providing a merkle proof that their address and allocation are part of the verified list. This method is gas-efficient for users and allows you to publish the root without revealing the entire recipient list upfront. Always include a deadline and a treasury reclaim function for unclaimed tokens.

For the claim contract, security is paramount. Use battle-tested, audited code from libraries like OpenZeppelin. Key functions to include are claim, isClaimed (to prevent double-claims), and withdrawUnclaimed (for the admin). Here is a basic interface:

solidity
interface IMerkleDistributor {
    function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external;
    function isClaimed(uint256 index) external view returns (bool);
}

Thoroughly test the contract on a testnet, simulating claims from multiple addresses and edge cases like expired deadlines.

Finally, execute the campaign. After the snapshot and scoring, generate the merkle tree. Tools like the merkletreejs library can automate this. Deploy the contract to mainnet, verify it on a block explorer like Etherscan, and create a clear frontend for users to check eligibility and claim. Post-campaign, analyze the data: what percentage claimed? Did the tokens distribute to your target users? This data is invaluable for refining future community incentive programs. Remember, a well-executed reputation-based airdrop is not just a distribution event; it's a powerful tool for bootstrapping a dedicated, aligned community.

prerequisites
PREREQUISITES AND PLANNING

Setting Up a Reputation-Based Token Airdrop Campaign

A successful reputation-based airdrop requires careful preparation. This guide covers the essential steps before writing a single line of code.

A reputation-based airdrop rewards users based on their on-chain history and contributions, moving beyond simple wallet snapshots. The first prerequisite is defining your eligibility criteria. Common metrics include transaction volume, protocol interactions, governance participation, and social engagement. For example, Uniswap's 2020 airdrop rewarded historical users and liquidity providers, while Optimism's OP airdrops have used a multi-round approach based on specific on-chain activities. You must decide which actions, on which chains, and within what timeframe will qualify users for your token distribution.

Next, you need to plan your data sourcing and verification strategy. This involves identifying the data sources for your criteria. You will likely need to query blockchain data via providers like The Graph, Covalent, or Alchemy, and may need to verify off-chain data from platforms like GitHub or Discord. For on-chain data, you must decide on the snapshot block height—a specific, immutable block number after which no further actions will be counted. Using a service like Etherscan to pin and verify this block is a critical trust and security step.

Technical planning requires setting up your development environment. You'll need Node.js (v18+ recommended), a package manager like npm or yarn, and familiarity with a scripting language such as JavaScript/TypeScript or Python. Essential libraries include ethers.js or web3.js for blockchain interaction and axios for API calls to data providers. You should also have access to an RPC endpoint from a provider like Infura or Alchemy for reliable data fetching. Create a new project directory and initialize it with your chosen package manager to manage dependencies.

Finally, you must address legal, security, and operational logistics. Determine the token's network (e.g., Ethereum Mainnet, Arbitrum), ensure you have the necessary gas funds for distribution, and understand the tax implications for recipients in key jurisdictions. Plan your claim mechanism: will it be a merkle tree-based claim contract for gas efficiency (used by Uniswap) or a simple batch transfer? You also need a communication plan for announcing the airdrop rules, snapshot date, and claim process to your community to ensure transparency and prevent confusion.

key-concepts
REPUTATION-BASED AIRDROPS

Core Technical Concepts

Technical foundations for designing and deploying airdrops that reward on-chain reputation, moving beyond simple wallet snapshots.

data-snapshot-strategy
FOUNDATION

Step 1: Designing the Data Snapshot Strategy

A successful reputation-based airdrop begins with a robust data strategy. This step defines the on-chain and off-chain criteria used to identify and qualify your target recipients.

The core of a reputation airdrop is the snapshot strategy, a set of rules that programmatically identifies wallets deserving of tokens based on past behavior. Unlike simple volume-based drops, reputation strategies assess quality of interaction. Common on-chain criteria include: - Duration: How long a user has held a specific NFT or token. - Frequency: The number of protocol interactions over a defined period. - Recency: Engagement with new features or contracts. - Diversity: Participation across multiple protocol functions (e.g., staking, voting, providing liquidity).

You must also define the snapshot parameters: the specific blockchain, the cutoff block height or timestamp, and the data sources. For Ethereum mainnet, tools like Dune Analytics or Flipside Crypto are essential for querying historical on-chain data. For newer L2s or app-chains, you may need to index data directly from an archive node. The snapshot block must be finalized and immutable; using a recent block risks chain reorganizations invalidating your recipient list.

Off-chain data can enrich your strategy but requires careful handling. This includes Discord role history, GitHub contributions, or forum participation. Tools like Collab.Land for token-gating or SourceCred for contribution tracking can provide this data. However, you must design a secure, verifiable method to link off-chain identities (like a Discord ID) to on-chain wallet addresses, often through a signing mechanism, to prevent Sybil attacks.

Here is a conceptual example of a strategy encoded as a Dune Analytics query component, focusing on early, consistent stakers:

sql
-- Example: Identify wallets that staked >1 ETH for >90 days before a snapshot
SELECT 
    depositor_address,
    MIN(block_time) as first_deposit_time,
    COUNT(DISTINCT DATE(block_time)) as unique_deposit_days
FROM ethereum.transactions
WHERE 
    to = '0xProtocolStakingContract'
    AND block_time < TIMESTAMP '2024-01-01' -- Snapshot date
    AND success = true
GROUP BY 1
HAVING 
    MIN(block_time) < TIMESTAMP '2024-01-01' - INTERVAL '90' DAY
    AND COUNT(DISTINCT DATE(block_time)) > 30

This logic filters for users who were early adopters and maintained consistent interaction.

Finally, document your strategy's weighting logic. Not all criteria are equal. You might assign points: 10 points for holding a Genesis NFT, 5 points per governance vote, and 2 points per transaction. This scoring creates a tiered system, allowing you to allocate more tokens to higher-reputation users. The output of this step is a clear, auditable specification that will guide the data collection in Step 2.

sybil-resistance-mechanisms
TOKEN DISTRIBUTION

Step 2: Implementing Sybil Attack Prevention

This guide details the technical implementation of a reputation-based airdrop to filter out Sybil attackers, using on-chain data and a merkle tree for efficient verification.

A reputation-based airdrop uses on-chain history to assign a score to each wallet, filtering out low-reputation Sybil wallets. The core logic involves querying a wallet's history for positive reputation signals: - Transaction count and age: Wallets with a long history of activity are less likely to be disposable. - Token holdings: Holding specific governance or ecosystem tokens (e.g., UNI, AAVE) indicates genuine engagement. - Protocol interactions: Having interacted with core protocol functions (e.g., providing liquidity, voting) demonstrates utility. You can fetch this data using indexers like The Graph, Covalent, or via direct RPC calls to archive nodes.

After collecting the data, you must define a scoring algorithm. A simple model could assign points: 1 point for an account older than 6 months, 2 points for holding >0.1 ETH, 3 points for having executed a governance vote. Set a minimum threshold (e.g., 5 points) to qualify. More sophisticated models use machine learning classifiers trained on known Sybil clusters from past airdrops. The output is an allowlist of qualifying Ethereum addresses and their allocated token amounts based on their score tier.

To distribute tokens efficiently and verifiably, use a merkle tree. This cryptographic structure allows you to publish a single root hash on-chain that commits to the entire allowlist. Each eligible user receives a merkle proof (a path of hashes) derived from their address and allocation. Your smart contract only needs to store the merkle root and can verify claims in O(log n) time using the MerkleProof library from OpenZeppelin. This method saves significant gas compared to storing a mapping of all addresses.

Here is a simplified version of the claim contract. It uses a merkle root set by the owner and allows users to claim once by providing a valid proof.

solidity
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ReputationAirdrop {
    bytes32 public merkleRoot;
    mapping(address => bool) public hasClaimed;
    constructor(bytes32 _merkleRoot) {
        merkleRoot = _merkleRoot;
    }
    function claim(uint256 amount, bytes32[] calldata merkleProof) external {
        require(!hasClaimed[msg.sender], "Already claimed");
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount));
        require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof");
        hasClaimed[msg.sender] = true;
        // Transfer logic here (e.g., ERC20 transfer)
    }
}

The final step is generating the merkle tree data off-chain. Using a script (JavaScript with merkletreejs or Python), you process the allowlist CSV file to create the tree and generate individual proofs. You then deploy the contract with the calculated root, publish the proof generation tool for users to query their proof, and fund the contract with the total airdrop amount. This method ensures only wallets that meet your reputation criteria can claim, while keeping the on-chain verification lightweight and transparent. Always test the entire flow on a testnet first.

merkle-tree-claim-contract
IMPLEMENTATION

Step 3: Building the Merkle Tree Claim Contract

This step details the on-chain contract that validates Merkle proofs and distributes tokens based on a user's verified reputation score.

The core of the airdrop is the Merkle tree claim contract. This is a smart contract deployed on the target blockchain (e.g., Ethereum, Arbitrum, Polygon) that holds the airdropped tokens and contains the Merkle root. Its primary function is to verify a user's inclusion in the airdrop by checking a Merkle proof against the stored root. For a reputation-based drop, the contract logic must also validate that the claimant's provided reputation score matches the value encoded in the leaf. This prevents users from claiming a higher allocation than they are entitled to.

A standard implementation involves two key state variables: merkleRoot (set by the deployer) and a mapping like hasClaimed to prevent double-spending. The main function, often called claim, accepts parameters including the user's address, their allocated token amount, their reputation score, and the Merkle proof. The contract hashes these parameters to reconstruct the leaf node, then uses the MerkleProof library (e.g., from OpenZeppelin) to verify the proof against the stored root. Only upon successful verification does the contract transfer the tokens.

Here is a simplified function signature for a reputation-aware claim:

solidity
function claim(
    address account,
    uint256 amount,
    uint256 reputationScore,
    bytes32[] calldata merkleProof
) external {
    bytes32 leaf = keccak256(abi.encodePacked(account, amount, reputationScore));
    require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof");
    require(!hasClaimed[account], "Already claimed");
    hasClaimed[account] = true;
    IERC20(token).transfer(account, amount);
}

The abi.encodePacked ensures the leaf is constructed exactly as it was during the off-tree generation in Step 2.

Critical security considerations include using a pull-based over a push-based model (users claim their tokens, which is gas-efficient and safer), ensuring the contract has a sufficient token allowance or balance, and implementing a withdrawal function for the owner to recover unclaimed funds after the claim period. For production use, consider adding a deadline via block.timestamp and protecting against replay attacks on new chains if the airdrop is cross-chain.

After deployment, you must fund the contract with the total airdrop token allocation. The contract address and Merkle root then become the public parameters for your campaign. Users will interact with this contract through a frontend dApp that generates their unique proof from the data in the Merkle tree, completing the claim cycle from off-chain calculation to on-chain verification and distribution.

DATA SOURCES

Comparison of Reputation Metrics and Data Sources

Key metrics and their data sources for evaluating user reputation in token airdrop campaigns.

Reputation MetricOn-Chain DataOff-Chain DataHybrid (On/Off-Chain)

Wallet Age & Activity

Transaction Volume & Frequency

Protocol-Specific Interactions (e.g., swaps, stakes)

Governance Participation (votes, proposals)

Social Media Engagement & Followers

GitHub Contributions & Developer Reputation

Sybil Attack Resistance Score

High

Low

Medium-High

Data Freshness & Update Latency

< 1 block

Hours to days

< 1 block to hours

Implementation Complexity

Medium

Low

High

REPUTATION-BASED AIRDROPS

Common Issues and Troubleshooting

Addressing frequent technical hurdles and developer questions when implementing on-chain reputation systems for token distribution.

Merkle proof failures are the most common issue in airdrop claims. This typically stems from a data mismatch between the off-chain generation and on-chain verification.

Common root causes:

  • Leaf data mismatch: The leaf hash must be constructed from the exact, concatenated data used off-chain (e.g., keccak256(abi.encodePacked(recipient, amount))). Changing the encoding order or data types will break verification.
  • Incorrect proof path: The proof array must be provided in the correct order, corresponding to the leaf's position in the tree.
  • Root mismatch: The Merkle root stored in the contract must be identical to the one computed from your off-chain tree. Any change to the allowlist requires a new root.

Debugging steps:

  1. Recompute the leaf hash locally using the contract's exact encodePacked logic.
  2. Verify the proof against the on-chain root using a library like OpenZeppelin's MerkleProof in a test script.
  3. Ensure the contract's claim function uses verifyCalldata if your proof is in calldata, not verify.
REPUTATION-BASED AIRDROPS

Frequently Asked Questions

Common technical questions and solutions for developers implementing on-chain reputation systems for token distribution.

A reputation-based airdrop distributes tokens based on a user's on-chain history and contributions, rather than a simple snapshot or random allocation. It uses a scoring mechanism to quantify past activity, such as transaction volume, protocol interactions, governance participation, or social graph data. This creates a meritocratic distribution aimed at rewarding genuine users and deterring sybil attackers.

Key differences from standard airdrops:

  • Targeting: Rewards specific, verifiable behavior instead of wallet creation.
  • Sybil Resistance: Makes it economically costly to game by requiring meaningful, sustained interaction.
  • Data Sources: Relies on indexing and analyzing historical blockchain data (e.g., via The Graph, Dune Analytics) or attestations (e.g., Ethereum Attestation Service).
  • Complexity: Requires designing a robust scoring formula and a secure claim mechanism.
conclusion
IMPLEMENTATION SUMMARY

Conclusion and Next Steps

You have now configured a reputation-based airdrop campaign using on-chain data and merkle proofs. This guide covered the core components from data aggregation to claim verification.

The system you've built leverages a reputation score derived from on-chain activity—such as transaction volume, protocol interactions, and governance participation—to determine eligibility and allocation size. By using a Merkle tree for claim verification, you enable gas-efficient, permissionless claims while maintaining a centralized, updatable allowlist. This approach is more equitable than volume-based snapshots and more sybil-resistant than simple first-come-first-serve distributions.

For production deployment, consider these next steps. First, audit your smart contracts, especially the MerkleDistributor and any custom scoring logic. Use services like CertiK or OpenZeppelin. Second, implement a robust frontend with wallet connection, balance checks, and a clear claim interface. Third, plan your campaign lifecycle: define the claim period, prepare for unclaimed tokens (often sent to a treasury), and communicate clearly with your community via Twitter and Discord.

To extend this system, explore advanced reputation models. Integrate off-chain data from sources like Galxe or Gitcoin Passport for a holistic view. Consider implementing vesting schedules using contracts like OpenZeppelin's VestingWallet to lock tokens and encourage long-term alignment. For larger distributions, a multi-chain strategy using a cross-chain messaging protocol like LayerZero or Wormhole can reach users across ecosystems.

Finally, measure your campaign's success. Track key metrics: claim rate, number of unique claimants, gas costs for users, and post-airdrop token distribution on platforms like Dune Analytics. Analyze whether high-reputation recipients became active protocol users. This data is invaluable for refining future incentive programs and building a stronger, more engaged community around your project.

How to Set Up a Reputation-Based Token Airdrop | ChainScore Guides