Solana Programs
SUDIGITAL deploys 5 Anchor programs on Solana, currently on devnet with mainnet deployment targeting June 10-14, 2026. All programs are version 0.6.6, built with Anchor 0.32.1.
Program IDs (Devnet)
| Program | Program ID | Status |
|---|---|---|
| sudigital-core | CARHonCaZPoHNQhmxVhtGjgx3BKaJB7RsbHPyAyd21di | Deployed |
| sudigital-token | 4kTLHjrng6e6rmu8R1dGx1e9pHZjdV7mztax7tN3VsdP | Deployed |
| sudigital-nft | 4azFkFofcXHZh1tLfKXYXemWepBu2tTgyX1WFeXXErUN | Deployed |
| sudigital-mission | 6zso2TEKGZr21AkNjX9doAXr7GEHVdkYSD3p8v75huB | Deployed |
| sudigital-economy | CympDTHAJrBeMk8SC84iEVyFS5neUcACkKssbaJk6yvG | Deployed |
Mainnet: All TBD. Deploy cost (devnet): ~9.41 SOL across 5 programs.
Deploy Order
1. sudigital-token — SPL token, staking, vesting, airdrops
2. sudigital-economy — XP system, levels, streaks
3. sudigital-core — Platform config, claim proofs
4. sudigital-nft — NFT minting, fractional shares
5. sudigital-mission — Escrow, winners, rewardsPost-deploy: transfer upgrade authority to Squads multisig (6-of-7).
Wallet Addresses
| Wallet | Devnet | Mainnet |
|---|---|---|
| Creator (Authority) | 2VNKqH3aL3xQkZGZ7wj3F6GWZ5E6VSovs3svLesaxwCo | Squads multisig (TBD) |
| Pool / Platform | 9zz4mScwD22kC7qt4QPytRM9fgM48as5d2Fwug1M8Xdj | 6xWB9KGjXfMFS7DPGojgXFSynkxCfDJKUp2YdUEPG2H63hZZU4vsbwFx |
| Ecosystem Fund | Same as Pool (devnet) | Same as Pool (mainnet) |
| Squads Multisig | 3Wt7pitDH9ufwpsYwnbbYhYWXZqsGWNqmZRUgHQXa5Z4 | Same |
| Squads Vault | 3EkpyVQAzFSynkxCfDJKUp2YdUEPG2H63hZZU4vsbwFx | Same |
Program Details
sudigital-core (5 instructions)
Platform configuration, backend authority management, and claim proof processing. Core is the root program -- all other programs depend on it for access control via WALLET_CREATOR.
Instructions:
| Instruction | Access | Description |
|---|---|---|
initialize_platform_config(backend_authority) | WALLET_CREATOR only | Set trusted signer |
update_platform_config(backend_authority?, is_active?) | WALLET_CREATOR only | Update config fields |
initialize_user_claim_state() | Any user (for self) | Create nonce tracker |
process_claim(claim_proof) | Any user (for self) | User-initiated claim with Ed25519 verification |
process_claim_on_behalf(claim_proof) | Backend authority only | Backend-initiated claim (e.g., Stripe auto-airdrop) |
Key difference: process_claim requires the user to be the signer. process_claim_on_behalf lets the backend authority sign on behalf of a beneficiary who is NOT a signer -- the backend pays the transaction fee.
Accounts:
| Account | Seeds | Size | Fields |
|---|---|---|---|
| PlatformConfig | ["platform_config"] | 90 bytes | creator, backend_authority, is_active, created_at, updated_at, bump |
| UserClaimState | ["user_claim_state", user] | 53 bytes | user, last_nonce, total_claims, bump |
Enums:
| Enum | Values |
|---|---|
| Role | Memer(1), Worker(2), Player(3), Trader(4), Builder(5), Owner(6) |
| ClaimType | Token(1), Nft(2), Reward(3), Airdrop(4) |
Events: None. Core emits no events.
CPIs: None. Core is the root program.
sudigital-token (16 instructions)
SPL token operations, staking, vesting, and airdrop distribution. The largest program with the most functionality.
Token Instructions (3):
| Instruction | Access | Description |
|---|---|---|
initialize_token(decimals) | WALLET_CREATOR | Create SPL mint + TokenConfig + TokenStats |
mint_supply(amount) | WALLET_CREATOR | Mint tokens to treasury (capped at TOTAL_SUPPLY) |
burn_tokens(amount) | Any holder | Burn own tokens |
Staking Instructions (4):
| Instruction | Access | Description |
|---|---|---|
initialize_staking_config() | WALLET_CREATOR | Create config with Phase 1 defaults |
update_staking_config(params) | Config authority | Modify staking parameters |
stake_tokens(amount, lock_duration) | Any user | Stake with lock period |
unstake_tokens(amount) | Staker | Withdraw after lock (60s grace period) |
claim_staking_rewards() | Staker | Claim accumulated rewards |
Vesting Instructions (3):
| Instruction | Access | Description |
|---|---|---|
create_vesting(amount, start, cliff, duration) | WALLET_CREATOR | Create schedule |
release_vested() | Beneficiary | Claim vested tokens |
revoke_vesting() | WALLET_CREATOR | Set revoked flag (unvested tokens stay in treasury) |
Airdrop Instructions (5):
| Instruction | Access | Description |
|---|---|---|
create_airdrop_escrow(airdrop_id, amount) | Mint authority | Create and fund SPL token escrow |
refill_airdrop_escrow(amount) | Escrow creator | Add more tokens |
toggle_airdrop() | Escrow creator | Activate/deactivate |
close_airdrop_escrow() | Escrow creator | Close and return remaining |
claim_airdrop(claim_proof) | Any user (with proof) | Claim with Ed25519 signature verification |
Accounts:
| Account | Seeds | Key Fields |
|---|---|---|
| TokenConfig | ["token_config"] | mint, treasury, mint_authority, total_minted, total_burned, is_active |
| TokenStats | ["token_stats"] | total_staked, total_rewards_distributed, total_burned, unique_holders |
| StakingConfig | ["staking_config"] | is_enabled, annual_emission_cap, max_stake_per_wallet, total_staked |
| StakeAccount | ["stake", user] | staked_amount, locked_until, reward_rate, rewards_accumulated |
| VestingAccount | ["vesting", beneficiary] | total_amount, released_amount, cliff_duration, revoked |
| AirdropEscrow | ["airdrop_escrow", airdrop_id_le] | total_amount, claimed_amount, is_active |
| EscrowToken | ["escrow_token", airdrop_id_le] | SPL token account (PDA authority) |
| EscrowAuthority | ["escrow_authority", airdrop_id_le] | PDA signer for escrow transfers |
| AirdropClaimState | ["airdrop_claim_state", user, airdrop_id_le] | last_nonce, total_claims |
Events (11 types -- only program with events):
| Event | Key Fields |
|---|---|
| StakeEvent | user, amount, lock_duration, locked_until, apy_bps, timestamp |
| UnstakeEvent | user, amount, remaining_staked, timestamp |
| RewardsClaimedEvent | user, amount, total_claimed, timestamp |
| VestingCreatedEvent | beneficiary, total_amount, start_time, cliff_end, vesting_end |
| VestedReleasedEvent | beneficiary, amount, total_released, remaining |
| VestingRevokedEvent | beneficiary, released_before_revoke, revoked_amount |
| StakingConfigUpdatedEvent | authority, staking_enabled, caps, timestamp |
| MintEvent | authority, recipient, amount, total_supply, timestamp |
| BurnEvent | user, amount, total_supply, timestamp |
| AirdropCreatedEvent | airdrop_id, creator, amount, mint, timestamp |
| AirdropClaimedEvent | airdrop_id, claimer, amount, timestamp |
sudigital-nft (2 instructions)
NFT minting with fractional share ownership. Uses SUDIGITAL SPL token for payment.
Instructions:
| Instruction | Access | Description |
|---|---|---|
mint_nft(claim_proof, nft_id, role, max_shares) | Any user (with proof) | Mint NFT, CPIs into Core process_claim |
validate_nft_holder(nft_id, min_shares) | Any (view-like) | Check holder eligibility |
First Mint (founder == default):
- 25% of price burned via SPL
token::burn - 75% transferred to platform wallet
- Creates NftMetadata (founder = minter, shares = 1)
- Creates HolderShare (is_founder = true)
Subsequent Mint:
- Uses
calculate_revenue_split_with_burn(price): 1% founder, 1% creator, ~73.5% platform, ~24.5% burned - Increments existing NftMetadata.current_shares
- Creates or increments HolderShare
Accounts:
| Account | Seeds | Size | Key Fields |
|---|---|---|---|
| NftMetadata | ["nft_metadata", nft_id_le] | 49 bytes | nft_id, role, founder, current_shares, max_shares, founder_active |
| HolderShare | ["holder_share", nft_id_le, holder] | 46 bytes | nft_id, holder, shares, is_founder |
Revenue Split Constants:
| Constant | Value |
|---|---|
FOUNDER_FEE_BPS | 100 (1%) |
CREATOR_FEE_BPS | 100 (1%) |
PLATFORM_FEE_BPS | 9,800 (98%) |
BURN_SHARE_OF_PLATFORM_BPS | 2,500 (25% of platform) |
Events: None. NFT program emits no events.
CPI: Calls sudigital_core::cpi::process_claim to validate claim proof before minting.
sudigital-mission (10 instructions)
Mission escrow management and reward distribution. Uses SOL (native lamports) for escrow, not SPL tokens.
Instructions:
| Instruction | Access | Description |
|---|---|---|
deposit_escrow(mission_id, total_amount) | Creator or Backend authority | Fund escrow with SOL |
record_winner(mission_id, winner, rank, reward_amount, proof) | Backend authority | Record winner (runtime signer verification) |
claim_reward(mission_id) | Winner | Claim with 80/15/5 split via lamport manipulation |
refund_escrow(mission_id) | Depositor or WALLET_CREATOR | Refund remaining SOL |
set_holder_share(mission_id, holder, shares) | Backend authority | Set individual holder share |
batch_set_holder_shares(mission_id, holders) | Backend authority | Batch set (max 10) |
finalize_holder_pool(mission_id) | Backend authority | Lock holder distribution |
claim_holder_reward(mission_id) | Holder | Claim proportional reward |
initialize_circuit_breaker() | Any (init, once only) | Create circuit breaker account |
reset_circuit_breaker() | Circuit breaker authority | Manual reset |
Reward Distribution (in claim_reward):
| Pool | BPS | % | Transfer Method |
|---|---|---|---|
| Winner | 8,000 | 80% | Raw lamport manipulation |
| Holder Pool | 1,500 | 15% | Into HolderPool PDA |
| Ecosystem Fund | 500 | 5% | To WALLET_ECOSYSTEM |
Key difference from EVM: Solana mission escrow uses native SOL, not SPL tokens. The payment_token field is always system_program::ID.
Winner recording: Does NOT use on-chain Ed25519 verification. Instead, relies on Solana runtime's native signer verification -- the backend_authority must be a Signer, which proves identity.
Accounts:
| Account | Seeds | Size | Key Fields |
|---|---|---|---|
| MissionEscrow | ["mission_escrow", mission_id] | 130 bytes | total_amount, claimed_amount, is_active |
| MissionWinner | ["mission_winner", mission_id, winner] | 92 bytes | rank, reward_amount, claimed |
| HolderPool | ["holder_pool", mission_id] | 74 bytes | total_amount, total_shares, finalized |
| HolderShare | ["holder_share", mission_id, holder] | 90 bytes | shares, claimed |
| CircuitBreaker | ["circuit_breaker"] | 60 bytes | failure_count, is_open, cooldown_seconds |
Constants:
| Constant | Value |
|---|---|
MAX_RANK | 100 |
PROOF_VALIDITY_SECONDS | 300 (defined but not enforced in code) |
MAX_BATCH_SIZE | 10 |
Events: None. Mission program emits no events.
sudigital-economy (3 instructions)
XP system, leveling, and daily engagement streaks.
Instructions:
| Instruction | Access | Description |
|---|---|---|
initialize_xp() | Any user (for self) | Create XP account (sets initial login) |
award_xp(base_xp) | WALLET_CREATOR only | Award XP with level multiplier |
check_in() | Any user (for self) | Daily check-in (10 XP base + streak bonus) |
Check-in Details:
- Min interval: 82,800 seconds (23 hours)
- Base XP: 10 (
BASE_CHECK_IN_XP) - Streak bonus:
CONSECUTIVE_BONUS_XP (5) * (consecutive_days - 1)per check-in - Streak continues if time since last login <= 90,000 seconds (25 hours)
- Streak resets to 1 if gap > 25 hours
Note: Solana awards 10 base XP per check-in, EVM awards 20. Both award 150 XP at 7-day streak and 1,000 XP at 30-day streak.
Accounts:
| Account | Seeds | Size | Key Fields |
|---|---|---|---|
| XpAccount | ["xp_account", user] | 76 bytes | total_xp (u32), current_level (u8), consecutive_login_days (u16), last_login (i64) |
XP Level Thresholds (11 levels):
| Level | Name | Threshold | Multiplier |
|---|---|---|---|
| 0 | Newcomer | 0 | 1.0x (10,000 BPS) |
| 1 | Holder | 101 | 1.05x |
| 2 | Stacker | 501 | 1.1x |
| 3 | Whale | 1,501 | 1.15x |
| 4 | Diamond Hands | 3,501 | 1.2x |
| 5 | Alpha | 7,001 | 1.3x |
| 6 | Titan | 12,001 | 1.4x |
| 7 | Mogul | 20,001 | 1.5x |
| 8 | Legend | 35,001 | 1.7x |
| 9 | Sovereign | 60,001 | 1.9x |
| 10 | Super Wealthy | 100,001 | 2.0x (20,000 BPS) |
Events: None. Economy program emits no events. Placeholder modules: instructions/reward/ and instructions/refund/ are empty placeholders.
Token Constants
| Constant | Value |
|---|---|
TOKEN_DECIMALS | 6 |
TOTAL_SUPPLY | 1,000,000,000,000,000 (raw) |
ECOSYSTEM_ALLOCATION | 400,000,000,000,000 (40%) |
TREASURY_ALLOCATION | 250,000,000,000,000 (25%) |
TEAM_ALLOCATION | 150,000,000,000,000 (15%) |
SALE_ALLOCATION | 100,000,000,000,000 (10%) |
LIQUIDITY_ALLOCATION | 150,000,000,000,000 (15%) |
Staking Constants
| Constant | Value |
|---|---|
MAX_STAKE_PER_WALLET | 100,000,000,000 (100K tokens) |
ANNUAL_EMISSION_CAP | 10,000,000,000,000 (10M tokens) |
MIN_STAKE_AMOUNT | 1,000,000 (1 token) |
LOCK_GRACE_PERIOD | 60 seconds |
MIN_HOLDERS_FOR_STAKING | 1,111 |
MIN_TVL_FOR_STAKING_USD | $111,111 |
Time Constants
| Constant | Value |
|---|---|
SECONDS_PER_DAY | 86,400 |
SECONDS_PER_YEAR | 31,536,000 |
VESTING_CLIFF_DURATION | 31,536,000 (1 year) |
VESTING_TOTAL_DURATION | 126,144,000 (4 years) |
Error Codes
| Module | Source Range | IDL Range | Key Errors |
|---|---|---|---|
| Core | 100-199 | 6100-6199 | Unauthorized(6110), ProofExpired(6120), PlatformNotActive(6130) |
| Economy | 200-299 | 6200-6299 | InvalidXpAmount(6211), AlreadyCheckedInToday(6230) |
| NFT | 300-499 | 6300-6499 | MaxSharesReached(6312), InsufficientPayment(6331) |
| Mission | 500-799 | 6500-6799 | EscrowNotActive(6500), CircuitBreakerOpen(6560) |
| Token | 800-999 | 6800-6999 | SupplyExceeded(6810), ProgramPaused(6840) |
| Staking | 1000-1199 | 7000-7199 | StakingDisabled(7004), ExceedsMaxStake(7005) |
| Vesting | 1200-1399 | 7200-7399 | CliffNotPassed(7201), VestingRevoked(7202) |
| Airdrop | 1400-1499 | 7400-7499 | AirdropNotActive(7400), InvalidProof(7401) |
Related
- Contract Architecture -- design patterns, PDAs
- EVM Contracts -- Base L2 equivalent
- Security -- Squads multisig, circuit breaker
- Integration Guide -- using the SDK