Airdrop Structure

The Airdrop account is the core on-chain structure governing token distribution rules. Once created, the airdrop becomes immutable - all parameters are permanently fixed until the airdrop is closed after the ends_at timestamp.

Account Structure

The Airdrop account structure on-chain:

pub struct Airdrop {
    /// Creator's wallet address (32 bytes)
    pub authority: Pubkey,

    /// Token mint being distributed (32 bytes)
    pub mint: Pubkey,

    /// Managing controller (32 bytes)
    pub controller: Pubkey,

    /// Total token allocation (8 bytes)
    pub supply: u64,

    /// Merkle root of claim tree (32 bytes)
    pub merkle_root: [u8; 32],

    /// Claim window start (8 bytes)
    pub starts_at: i64,
    
    /// Claim window end (8 bytes)
    pub ends_at: i64,

    /// Bitmap pages count (1 byte)
    pub bitmap_count: u8,

    /// Version tracking (1 byte)
    pub version: u8,

    /// PDA bump seed (1 byte)
    pub bump: u8,
}
Field
authority
Type
Pubkey
Description
Wallet that created the airdrop (must match controller authority)
Field
mint
Type
Pubkey
Description
Token mint address being distributed (SPL or Token-2022)
Field
controller
Type
Pubkey
Description
Parent controller managing this airdrop
Field
supply
Type
u64
Description
Total token amount allocated (in token decimals)
Field
merkle_root
Type
[u8; 32]
Description
Root hash of Merkle tree containing eligible claims
Field
starts_at
Type
i64
Description
UNIX timestamp when claiming period begins
Field
ends_at
Type
i64
Description
UNIX timestamp when claiming period ends
Field
bitmap_count
Type
u8
Description
Number of 256-slot bitmap pages tracking claims
Field
version
Type
u8
Description
Protocol version (0 = initial implementation)
Field
bump
Type
u8
Description
PDA bump seed for this airdrop account

Key Characteristics:

  • Immutable Core: Authority, mint and controller cannot be changed after creation
  • Time-bound: Strict claiming window enforced by starts_at/ends_at
  • Efficient Tracking: Bitmap system minimizes storage for claim status
  • Versioned: Allows for future protocol upgrades