Airdrop Module

High-level Overview

Airdrop Conditionality

The Airdrop Module is designed to distribute USUAL tokens to eligible users, categorized into two groups based on a snapshot of their holdings, specifically in terms of "pills" (off-chain data). Users are divided as follows:

Top 80%: Users holding the most pills.

Bottom 20%: Users holding fewer pills.

This categorization allows for different airdrop claiming options tailored to each group’s status, ensuring flexibility. There are four primary options available for airdrop claims:

  • Standard Claim (Bottom 20%): These users do not follow a vesting schedule and can claim the total airdrop amount immediately mid of December.

  • Early Claim against Payment (Top 80%): These users, while originally part of a vesting schedule, can pay a pre-determind amount to skip the vesting. Once the payment is completed, they can claim the total amount directly without waiting for monthly releases.

  • Vested Claim (Top 80%): These users must follow the vesting schedule, which allows monthly claims between mid of January and mid of June 2025.

Contract Summary

The AirdropDistribution contract manages the core functionality of the airdrop, including claiming, penalty calculations, and merkle root verifications.

AirdropDistribution.sol

Inherited Contracts

Initializable (OZ): Utilized to provide a safe and controlled way to initialize the contract's state variables. It ensures that the contract's initializer function can only be called once, preventing accidental or malicious reinitialization.

ReentrancyGuardUpgradeable (OZ): Employed to protect against reentrancy attacks. It provides a modifier that can be applied to functions to prevent them from being called recursively or from being called from other functions that are also protected by the same guard.

PausableUpgradeable (OZ): The PausableUpgradeable contract allows the contract administrators to pause certain functionalities in case of emergencies or necessary maintenance. It provides functions to pause and unpause specific operations within the contract to ensure user protection and contract stability.

IAirdropDistribution: The interface of the contract.

Functions Description

Public/External Functions

claim: Allows users to claim their airdrop allocation.

setMerkleRoot: Sets the merkle root for initial claims (AIRDROP_OPERATOR_ROLE only).

setPenaltyPercentages: Sets penalty percentages for accounts (AIRDROP_PENALTY_OPERATOR_ROLE only).

pause: Pauses the contract (PAUSING_CONTRACTS_ROLE only).

unpause: Unpauses the contract (DEFAULT_ADMIN_ROLE only).

voidAnyOutstandingAirdrop: Voids the airdrop for users who choose to exit early (CONTRACT_USD0PP contract only).

Functionality Breakdown

Claiming

Users not in the top 80% can claim their full allocation mid of December.

Top 80% users who paid a predetermined amount can skip vesting and claim the full amount (with existing penalties for next month deducted).

Top 80% users who didn't pay the predetermined amount can claim monthly during the vesting duration.

Penalty System

Implements an admin-only penalty system based on off-chain criteria.

Constants

  • BASIS_POINT_BASE: 10_000 (100%)

  • PAUSING_CONTRACTS_ROLE: Role that can pause the contract.

  • AIRDROP_OPERATOR_ROLE: Role that can set the merkle root.

  • AIRDROP_PENALTY_OPERATOR_ROLE: Role that can set the penalty percentages.

  • AIRDROP_VESTING_DURATION_IN_MONTHS: 6 months

  • END_OF_EARLY_UNLOCK_PERIOD: Timestamp for the end of the early unlock period.

  • FIRST_AIRDROP_CLAIMING_DATE to SIXTH_AIRDROP_CLAIMING_DATE: Specific timestamps for claiming periods, each months for a defined vesting timeframe.

AirdropTaxCollector

The AirdropTaxCollector contract manages the pre-determined amount to be paid collection process for users who want to skip the vesting schedule.

Inherited Contracts

  • Initializable (OZ)

  • PausableUpgradeable (OZ)

  • ReentrancyGuardUpgradeable (OZ)

  • IAirdropTaxCollector: The interface of the contract.

Functions Description

Public/External Functions

  • payTaxAmount: Allows users to pay the tax to skip vesting.

  • calculateClaimTaxAmount: Calculates the tax amount for a given account.

  • setMaxChargeableTax: Sets the maximum chargeable tax (AIRDROP_OPERATOR_ROLE only).

  • setUsd0ppPrelaunchBalances: Sets the prelaunch Usd0PP balance for potential tax payment calculations of the user (AIRDROP_OPERATOR_ROLE only).

  • pause: Pauses the contract (PAUSING_CONTRACTS_ROLE only).

  • unpause: Unpauses the contract (DEFAULT_ADMIN_ROLE only).

Functionality Breakdown

  1. Tax Calculation: Computes the tax amount based on the user's allocation and time remaining in the vesting period.

  2. Tax Payment: Processes tax payments and marks users as eligible for full claiming.

Constants

  • BASIS_POINT_BASE: 10000 (100%)

  • PAUSING_CONTRACTS_ROLE: Role that can pause the contract.

  • AIRDROP_OPERATOR_ROLE: Role that can set max chargeable tax and set Usd0PP prelaunch balances.

  • AIRDROP_CLAIMING_PERIOD_LENGTH: Length of the airdrop vesting period, 182 days.

USD0++ External functions

  • SetBondEarlyUnlockDisabled(address user): Disables early unlock for a specific user. Only callable by the CONTRACT_AIRDROP_TAX_COLLECTOR role.

Last updated