Skip to main content

Token Distribution

Token Distribution, the airdrop of the API and contracts, commits an allocation list under one Merkle root and pays it out by push, claim or vesting.
One shared base, three distinct claim contracts.Every token distribution verifies eligibility against the same fixed Merkle root and shares one timelocked withdrawal, which never takes tokens that claims can still reach. Below that shared base, three separate contract families diverge. A push distribution has the sender distribute tokens directly, with no claim step, and calling claim always reverts. A time-bound distribution lets each recipient claim their full allocation once, self-service, inside a fixed start and end window. A vesting distribution has the recipient initialise their allocation before a deadline, then claim repeatedly as the strategy pinned at that initialisation unlocks more.One shared base, three distinct claim contracts.The same figure as the desktop variant, drawn portrait for phone widths. The shared Merkle-root eligibility check and the timelocked withdrawal, which takes nothing claims can still reach, sit on top. The push, time-bound, and vesting families stack below them, each linked to the shared base by its own arrow rather than to each other.

Every token distribution shares one Merkle-root eligibility check and one timelocked withdrawal path, which never takes tokens that claims can still reach.

  • Token Distribution commits an allocation list of any size under one Merkle root, so publishing costs the same for ten recipients or ten thousand. Delivery still pays gas: the sender pays per push batch (up to 100 recipients), and each self-service recipient pays for their claim unless a relayer submits it.

  • Owner withdrawals never take tokens that open claims can still reach: they wait at least seven days after scheduling, and never execute before a time-bound window closes or a vesting initialisation deadline passes. Vesting withdrawals reserve all unclaimed initialised allocations, while push withdrawals take the full balance.

  • Push distributions transfer directly with no claim step, time-bound distributions let each recipient self-claim once inside a fixed window, and vesting distributions initialise once before a deadline and then pay progressive claims as units unlock.

Why put an allocation in many hands without running a sale

Issuers often distribute tokens to many wallets after launch for rewards, community allocations or settled subscription payouts. Sending individual transfers costs gas per transfer and forces the issuer to reconcile a private payout list against the chain.

Token distribution commits the entire recipient set under one Merkle root at deployment, costing the same for ten recipients or ten thousand. Each payout runs through the token's own compliance path, while the operator's integration holds the source list used to generate proofs.

Why a distribution uses the token's own compliance path

Every distribution payout executes as an ordinary transfer through the token's transfer-compliance modules (see Controls and evidence), preventing eligibility drift between a side-car payout tool and the token contract.

Each distribution contract holds its pre-funded token balance directly with no separate intermediary wallet. That balance remains subject to the token's custodian role for emergency forced transfers.

What Token Distribution is, and how the three families differ

The API and contracts refer to token distributions as airdrops: DALP installs the factories and indexes distributions in the Console and Platform API, while creation, funding, distribution and claims run via direct contract calls. The three families differ in who pays gas and when tokens unlock:

  • Push: The contract owner calls distribute or batchDistribute so tokens arrive directly on a chosen date at the sender's gas cost.
  • Time-bound: Each recipient calls claim once inside a fixed start and end window, paying their own gas (or using a meta-transaction relayer via the trusted forwarder).
  • Vesting: Each recipient initialises once before the deadline to start their vesting clock under a pluggable strategy (such as linear with cliff), then claims repeatedly as allocations unlock.

All three families share a timelocked owner recovery path: schedule a withdrawal, wait at least seven days (and until the claim window or initialisation deadline passes), then withdraw only spare tokens no open claim can reach. This timelock binds the owner only: the token's custodian role can force-transfer the contract balance, and a system manager can upgrade the factory implementation.

Running a distribution day to day

Push distributions are owner-driven: the single owner address set at deployment distributes batches, adjusts distributionCap (0 or null means uncapped, taking effect immediately with no timelock) and schedules withdrawals. Duplicate indexes or cap overruns revert the whole batch.

Time-bound and vesting distributions are self-service (claim or batchClaim). On vesting distributions, track three per-index states separately: uninitialised (cannot claim, and misses out permanently after the initialisation deadline), initialised and vesting, and fully claimed. Only the recipient wallet can initialise its own index.

A vesting claim's three-state lifecycle.Before initialisation, an index is outside the vesting clock and a claim reverts. Initialising proves the Merkle allocation, pins the vesting strategy active at that moment, and starts the clock, without moving any tokens. Once initialised, claiming is repeatable: each call moves only the newly unlocked amount. When the cumulative claimed amount reaches the total allocation, the index is fully claimed and nothing more unlocks for it.A vesting claim's three-state lifecycle.The same figure as the desktop variant, drawn portrait for phone widths: awaiting initialisation, then initialised and vesting, then fully claimed, stacked as a vertical state sequence.

A vesting index moves through one initialisation, any number of claims, then a fully claimed state, while push and time-bound skip initialisation.

Withdrawing unclaimable tokens is a two-step timelocked flow across every family. Calling scheduleWithdrawal sets the eligible time to the later of seven days from scheduling or the close of claims (the claim window end for time-bound, or the initialisation deadline for vesting). Calling executeWithdrawal early reverts with DALP-4353. Cancelling and rescheduling restarts the seven-day wait, and only one withdrawal can be pending at a time.

A withdrawal takes a schedule, a wait until claims close, then execution.The owner schedules a withdrawal, and the contract records an eligible time that anyone can read on chain. The wait lasts at least seven days and until claims close, and the owner cannot shorten it. Execution then moves the tokens no claim can still reach to the address the owner names. The owner can cancel at any time before execution, and a new schedule starts the wait over.A withdrawal takes a schedule, a wait until claims close, then execution.The same figure as the desktop variant, drawn portrait for phone widths: scheduled, the waiting period, and execution, stacked as a vertical sequence with the cancel note beneath.

Recovery waits at least seven days and until claims close, then takes only what no claim can still reach.

A cancelled schedule starts over instead of resuming.

Family
Eligible time
What the withdrawal sends
Push
Seven days after scheduling, because recipients cannot claim
The whole balance of the distributed token, including the tokens of every index the owner has not distributed
Time-bound
Seven days after scheduling, or one second after the end time when that is later, because a claim at the end time still succeeds
The whole balance, because no claim can follow the window
Vesting
Seven days after scheduling, or one second after the initialisation deadline when later
The balance minus the unclaimed portion of every initialised allocation (uninitialised allocations plus any excess tokens)

When a withdrawal becomes eligible, and what it sends, in each family.

A vesting withdrawal reserves every initialised allocation's unclaimed remainder so those recipients can keep claiming as their schedules vest. After a re-basing corporate action, a vesting contract reserves its full balance until every initialised allocation is fully claimed. If no spare tokens remain, executeWithdrawal clears the schedule and emits TokensWithdrawn with amount zero.

withdrawalSchedule() and WithdrawalScheduled expose the eligible timestamp, surfaced as withdrawalEligibleAt in the API and “Recovery available” in the Console. Watch push batches for compliance reverts (one invalid recipient reverts the batch), time-bound claim windows (immutable after deploy) and vesting initialisation deadlines.

One base contract, three claim implementations

One abstract base contract provides Merkle-root eligibility (immutable once deployed) and timelocked withdrawal across all three families, while a system manager can upgrade the factory implementation. Below that base, push tracks claims via a per-index bitmap (claimed or not), whereas time-bound and vesting track cumulative claimed amounts per index.

Behaviour
Push
Time-bound
Vesting
Choose it when
A reward must land on a fixed date and the issuer covers every transfer's gas
Recipients can cover their own gas and should self-serve inside a window you set
The reward should unlock gradually instead of landing all at once
Who moves tokens
The owner, calling distribute or batchDistribute
Each recipient, calling claim or batchClaim
Each recipient, calling claim or batchClaim
Claim step
None. Claim and batchClaim always revert
One claim per index, full allocation
Initialise once per index, then claim repeatedly
Timing gate
None beyond the owner's own schedule
Only inside the start and end time
Initialise before the deadline, then claim once the cliff passes
Claim tracking
Bitmap: claimed or not, no partial amount
Amount-based, used for one full claim
Amount-based, used for progressive claims
Unlock pace
Set by the owner's own distribution schedule
Full amount unlocks at the single claim
Set by the strategy pinned at initialisation

The three distribution contract families, compared where they diverge.

Calling initializeVesting pins the active vesting strategy onto that index before moving tokens, so later owner strategy changes affect only future initialisations. Linear strategies fix immutable cliff and duration values at deployment and measure both from each recipient's own initialisation timestamp.

Deploying any distribution requires TOKEN_FACTORY_MODULE_ROLE at the system level or GOVERNANCE_ROLE on the token (see role grant). When the token's access manager holds an approval rule on deploying a distribution, a Governance holder's deployment needs a second approver: it is proposed, approved and run through the access manager proposal routes. Deployment registers an on-chain identity for the distribution under the specified country so it can hold compliance-gated tokens.

The integration contract

Each family exposes its own on-chain verbs: push uses distribute and batchDistribute (calling claim reverts with DALP-3018), time-bound uses claim and batchClaim, and vesting requires initializeVesting or batchInitializeVesting before claiming.

Build Merkle trees with one unique index per leaf using double-hashed encoding: keccak256(abi.encode(keccak256(abi.encode(index, account, totalAmount)))). Sharing an index across leaves corrupts claim tracking and vesting reserves. Self-service calls verify against the caller's address, batch calls cap at 100 entries, and batchClaim aggregates multiple indexes into one transfer (whereas batchDistribute sends one transfer per recipient).

A system manager installs airdrop factories via POST /api/v2/system/addon-factories (using the network directory's registered implementations by default), while EVM distribution creation, funding and claims run via direct contract calls (Platform API write routes return HTTP 422 OPERATION_FAMILY_UNSUPPORTED). Read indexed distributions through three endpoints:

  • GET /api/v2/addons/airdrops: Lists distributions by search text, typeId (push-airdrop, time-bound-airdrop, vesting-airdrop) and filter[token]. Returns not found when no factory is installed.
  • GET /api/v2/addons/airdrops/{airdropAddress}: Returns one distribution plus recipientCount (returns not found for unknown addresses).
  • GET /api/v2/addons/airdrops/{airdropAddress}/recipients: Lists paid recipients newest first with amounts and timestamps.

In the Console, an asset's Placement tab shows an Airdrops summary (with View details for recipient lists) whenever campaigns exist, and Asset lifecycle lists installed airdrop factories (Push airdrop, Vesting airdrop, Time-bound airdrop) in read-only views.

Handle contract errors distinctly: uninitialised vesting index (DALP-3025), outside claim window (DALP-3001, DALP-3002), invalid Merkle proof (DALP-3032), and already claimed (DALP-3030).

Controls and evidence

Merkle tree membership and amounts are decided off chain, while the contract enforces proof validity against the immutable root and executes every transfer through the token's transfer-compliance modules.

On-chain events record creation, every push or claim transfer, every vesting initialisation and every withdrawal-schedule step (read individual claim events to break down batch claims). Retain the off-chain recipient list and approval evidence separately to document how the root was constructed. Push sends record operator-initiated transfers, while self-service claims record recipient-initiated transfers.

Frequently asked questions

What happens when a push distribution misses a recipient?

The owner can still distribute to that index later because push distributions have no claim window, unless an owner withdrawal empties the contract (which takes the full balance seven days after scheduling) or a cap must be raised first. Recipients cannot self-claim.

What happens if I never initialise my vesting allocation?

Nothing unlocks, and initialising fails once the initialisation deadline passes, making the allocation withdrawable as spare balance by the owner. Initialise before the deadline even if you plan to claim later.

Does my vesting schedule run from deployment or from my own initialisation?

From your own initialisation timestamp. Waiting delays your cliff and finish date rather than banking vested time.

Can I claim while the cliff is still running?

No. Claims with zero unlocked amount revert. After the cliff passes, the first claim pays everything vested since initialisation, and later claims pay incremental unlocks.

Can someone else claim my allocation for me?

Yes, through a meta-transaction relayer once you authorise the claim, so you still receive the tokens without paying gas. Use a push distribution when recipients cannot transact at all.

Can the owner withdraw tokens while claims are still open?

No. Withdrawals wait at least seven days and until claims close (window end for time-bound, initialisation deadline for vesting), and vesting withdrawals leave all unclaimed initialised allocations untouched. Push distributions have no claim window, so a withdrawal after seven days takes the entire remaining balance. Custodian forced transfers and factory upgrades remain outside the owner withdrawal rule.

Was this page helpful?