Token Sale (DAIO)
The Token Sale capability provides compliant primary distribution infrastructure for Digital Asset Initial Offerings (DAIOs), with multi-currency payment support, optional vesting, a five-phase lifecycle, and identity-gated buyer eligibility.
Purpose: Describe the Token Sale capability -- compliant primary distribution infrastructure for Digital Asset Initial Offerings with multi-currency payment, vesting, and identity-gated participation.
- Doc type: Reference
What you'll find here
- Four-contract architecture and responsibilities
- Five-phase sale lifecycle
- Payment, vesting, and compliance model
- Roles, trust boundaries, and configuration surface
Boundary
The Token Sale handles the primary distribution of digital assets from issuer to investors. It enforces buyer eligibility through the DALP identity registry, manages payment collection in multiple currencies, and optionally applies vesting schedules to purchased tokens. It does not handle secondary market trading, ongoing compliance monitoring, or asset servicing after the offering closes -- those are responsibilities of the SMART Protocol and other platform capabilities.
Contract architecture
| Contract | Responsibility |
|---|---|
| IDALPTokenSale | Interface defining the complete Token Sale API (functions, events, errors) |
| DALPTokenSaleImplementation | Main logic: compliance checks, vesting, multi-currency pricing, lifecycle management |
| DALPTokenSaleProxy | Transparent upgradeable proxy preserving state and address across upgrades |
| DALPTokenSaleFactoryImplementation | Factory for CREATE2 deployment of new sale instances with deterministic addresses |
The proxy pattern enables bug fixes and feature additions without redeploying the sale or changing its address. The factory provides deterministic addresses through CREATE2, enabling address prediction before deployment.
Roles
| Role | Source | Permissions |
|---|---|---|
| SALE_ADMIN_ROLE | Token access manager | Configure sale parameters, manage lifecycle transitions, set vesting and pricing |
| FUNDS_MANAGER_ROLE | Token access manager | Withdraw collected sale proceeds |
| SYSTEM_MANAGER_ROLE | System access control | Create new token sales via the factory |
Role assignments flow through the token's ISMARTTokenAccessManager, ensuring that sale administration is governed by the same access control framework as the underlying asset.
Sale lifecycle
The token sale progresses through five phases. Transitions are enforced on-chain and cannot be bypassed.
| Phase | Status | Behavior |
|---|---|---|
| Setup | SETUP | Configure timing, pricing, payment currencies, purchase limits, vesting. No purchases accepted. |
| Presale | PRESALE (optional) | Accept purchases from whitelisted presale investors only. Auto-transitions to public sale at presale end time. |
| Public Sale | PUBLIC_SALE | Accept purchases from all eligible buyers. Enforce per-investor limits and hard cap. |
| Paused | PAUSED | Temporarily halt all purchases. Configuration preserved. Can resume to presale or public sale. |
| Ended | ENDED | Permanently concluded. Allow vested token withdrawals and fund withdrawals by administrators. |
Phase transitions are one-directional (Setup to Presale to Public Sale to Ended), with Paused as a reversible detour from any active phase.
Payment support
The token sale accepts both native currency (ETH) and multiple ERC20 tokens as payment. Each accepted currency has a configurable price ratio that determines the exchange rate between payment currency and sale tokens.
Price ratios are set by the sale administrator and can accommodate different decimal precisions across payment currencies. The contract calculates token amounts automatically at purchase time based on the configured ratio.
Vesting
When vesting is configured, purchased tokens are not immediately transferable. Instead:
- A cliff period must elapse before any tokens can be withdrawn
- After the cliff, tokens release linearly over the configured vesting duration
- Investors withdraw their vested portion at any time after the cliff
Vesting is optional. When not configured, tokens distribute immediately upon purchase.
Compliance
Buyer eligibility is enforced automatically through the DALP identity registry. Before any purchase executes, the contract verifies that the buyer's identity is registered and meets the compliance rules configured on the underlying token. Purchases from unverified or non-compliant addresses are rejected.
This compliance check is the same mechanism used throughout the DALP platform for transfer restrictions and investor verification, ensuring consistent enforcement across the asset lifecycle.
Trust boundaries
- Identity verification -- every purchase is gated by the DALP identity registry; no tokens are distributed to unverified buyers
- Reentrancy protection -- all purchase and withdrawal operations use ReentrancyGuard
- Pausable operations -- the sale administrator can immediately halt purchases during incident response
- Immutable core terms -- timing, hard cap, and compliance integration cannot be modified after the sale moves beyond the setup phase
Dependencies
| Dependency | Role |
|---|---|
| DALP identity registry | Buyer eligibility verification |
| Token contracts (SMART Protocol) | The digital asset being sold |
| System access control | Factory-level authorization for creating new sales |
| Token access manager | Role assignments for sale and funds administration |
Configuration surface
| Parameter | Scope | Mutability |
|---|---|---|
| Sale timing (start, end, presale window) | Sale instance | Set during setup, immutable after activation |
| Price ratios per payment currency | Sale instance | Configurable by SALE_ADMIN_ROLE |
| Per-investor purchase limits (min/max) | Sale instance | Set during setup |
| Hard cap (total tokens available) | Sale instance | Immutable after activation |
| Vesting parameters (start, duration, cliff) | Sale instance | Set during setup, immutable after activation |
| Accepted payment currencies | Sale instance | Managed by SALE_ADMIN_ROLE |
Smart contracts are deployed and available. The UI wizard for creating and managing token sales is in development.
Related
- DAIO offering flow for the step-by-step participation and settlement sequence
- Capabilities layer overview for how capabilities extend the platform
- SMART Protocol integration (ERC-3643) for the compliance and identity framework
- Component catalog for the full platform inventory
XvP Settlement
The XvP Settlement capability provides atomic cross-party token exchanges with all-or-nothing execution guarantees, multi-party support, optional hashlock coordination for cross-chain legs, and per-sender approval management.
Issuer-Signed Scalar Feed
The Issuer-Signed Scalar Feed is a factory-deployed capability that allows asset issuers to publish cryptographically signed price data with configurable history retention, drift protection, and fixed-point precision.