⚠️ ArcaLana currently has no token and has no intention of launching one ⚠️ ⚠️ ArcaLana currently has no token and has no intention of launching one ⚠️ ⚠️ ArcaLana currently has no token and has no intention of launching one ⚠️ ⚠️ ArcaLana currently has no token and has no intention of launching one ⚠️ ⚠️ ArcaLana currently has no token and has no intention of launching one ⚠️

Smart Contract Deep Dive

Technical documentation for ArcaLana's Solana smart contracts, covering all instructions, account structures, security measures, and deployment details.

Smart Contract Overview

ArcaLana's smart contract is built using the Anchor framework on Solana, implementing a complete on-chain gaming platform with transparent scoring, seasonal competitions, and automated reward distribution.

📋 Contract Details

  • Program ID: 6yoNCf8kg4uoeoz13MvuomPQiFzZ1wev95fQLiaRzAU6
  • Network: Solana Devnet
  • Framework: Anchor v0.30.1
  • Language: Rust
  • Status: Active & Tested

Architecture Principles

  • Decentralized: No single admin controls rewards or seasons
  • Transparent: All operations verifiable on-chain
  • Efficient: Optimized for low transaction costs
  • Secure: Comprehensive access controls and validation
  • Extensible: Modular design for future game additions

Core Instructions

The smart contract implements 10 core instructions that handle all platform functionality from initialization to reward distribution.

🔧 Administrative Instructions

initialize

Sets up the global platform state with initial configuration and admin authority.

Parameters: admin_fee_percentage, treasury_wallet

create_season

Creates a new gaming season with specified duration and reward vault.

Parameters: season_id, start_time, end_time, min_entry_fee

fund_season

Adds SOL to a season's reward vault, increasing total prize pool.

Parameters: season_id, amount

end_season

Finalizes a season, calculates winners, and enables reward claims.

Parameters: season_id, lucky_winner_1, lucky_winner_2

🎮 Player Instructions

submit_score

Records a player's game score with entry fee payment and leaderboard update.

Parameters: season_id, game_type, score, entry_fee

claim_reward

Allows winners to claim their calculated rewards after season completion.

Parameters: season_id

📊 Query Instructions

get_leaderboard

Retrieves current leaderboard rankings for a specific season.

Returns: Ranked list of top performers with normalized scores

get_player_stats

Fetches individual player statistics across all seasons and games.

Returns: Total games, best scores, season participation

calculate_rewards

Previews reward distribution before season ends for transparency.

Returns: Projected rewards for all winner categories

get_season_info

Returns comprehensive information about any season's status and metrics.

Returns: Vault balance, participant count, timing, status

Account Types

The smart contract manages four primary account types, each with specific roles in the platform ecosystem.

Security Architecture

ArcaLana implements multiple layers of security to protect player funds, ensure fair gameplay, and prevent unauthorized access.

Access Control Matrix

Instruction Required Authority Additional Checks
initialize System Admin One-time only, sets up initial state
create_season Platform Admin Valid time range, unique season ID
fund_season Any User Season exists and not ended
submit_score Player (Self) Season active, valid entry fee
end_season Platform Admin Season ended, winners calculated
claim_reward Winner (Self) Season ended, not already claimed

Vault Security

🔐 Program Derived Addresses (PDAs)

All vaults use PDAs ensuring only the smart contract can authorize transfers.

🛡️ Multi-Signature Requirements

Critical operations require multiple validation steps and signature verification.

⏰ Time-Based Validation

Season timing enforced on-chain preventing premature or late submissions.

💰 Economic Security

Entry fees prevent spam, vault balances tracked with precision arithmetic.

Anti-Cheating Measures

  • Score Normalization: Cross-game scoring prevents exploitation of easier games
  • Entry Fee Gates: Economic barrier to spam submissions
  • Time Validation: Scores only accepted during active seasons
  • Duplicate Prevention: One score per player per game per session
  • Admin Oversight: Manual winner verification for lucky draws

Deployment Information

Current deployment status and technical specifications for the ArcaLana smart contract.

Program ID: 6yoNCf8kg4uoeoz13MvuomPQiFzZ1wev95fQLiaRzAU6

🚀 Current Deployment

  • Network: Solana Devnet
  • Deploy Date: January 2024
  • Version: v2.0.0
  • Status: Active & Operational

⚡ Performance Metrics

  • Transaction Cost: ~0.005 SOL average
  • Confirmation Time: 1-2 seconds
  • Account Size: Optimized for minimal rent
  • Concurrent Players: Unlimited theoretical capacity
  • Uptime: 99.9% (blockchain dependent)

🔧 Technical Stack

  • Rust Version: 1.75.0
  • Anchor Version: 0.30.1
  • Solana CLI: 1.18.0
  • Node.js: 18.x LTS
  • Dependencies: Minimal external crates

Mainnet Migration Plan

1

Security Audit

Third-party security audit completion and vulnerability assessment

2

Community Testing

Extended beta testing period with community feedback integration

3

Mainnet Deployment

Production deployment with full documentation and support resources

Testing & Verification

Comprehensive testing ensures contract reliability, security, and performance across all use cases and edge conditions.

Test Coverage

🧪 Unit Tests

  • Individual instruction validation
  • Account state transitions
  • Mathematical calculations
  • Error handling scenarios
  • Edge case boundary testing
✅ 100% Coverage

🔗 Integration Tests

  • End-to-end season workflows
  • Multi-player interactions
  • Cross-instruction dependencies
  • Real-world usage patterns
  • Performance under load
✅ All Passing

🛡️ Security Tests

  • Unauthorized access attempts
  • Reentrancy attack prevention
  • Integer overflow/underflow
  • PDA derivation security
  • Economic exploit prevention
✅ Secure

✅ Verification Checklist

  • All 10 instructions tested with valid inputs
  • Error cases handled gracefully with descriptive messages
  • PDA derivations mathematically verified
  • Reward calculations tested with multiple scenarios
  • Season lifecycle tested from creation to completion
  • Multi-player concurrent access validated
  • Economic model verified with real transaction flows
  • Security vulnerabilities assessed and mitigated