This repository contains the Alpha Points Protocol smart contracts implementation for the Sui blockchain. The protocol enables the minting, management, and redemption of Alpha Points - account-bound units of cross-chain liquidity and loyalty - secured by object-isolated stakes on Sui.
βββ sources/ # Move smart contract source files
β βββ admin.move # Protocol administration & governance
β βββ ledger.move # Point accounting & balance management
β βββ escrow.move # Asset custody & vault management
β βββ stake_position.move # Individual stake objects
β βββ oracle.move # Price feeds & conversion rates
β βββ integration.move # Main protocol entry points
β βββ partner.move # Partner management system
β βββ partner_flex.move # Flexible partner configurations
β βββ partner_yield.move # Partner yield calculations
β βββ perk_manager.move # Perk creation & redemption
β βββ generation_manager.move # Generation-based rewards
β βββ staking_manager.move # Staking operations
β βββ loan.move # Lending against stakes
β βββ ...
βββ tests/ # Move unit tests
βββ Move.toml # Package manifest
βββ Move.lock # Dependency lock file
admin.move
- Configuration, capabilities, and emergency controlsledger.move
- Global Alpha Point supply and user balance accountingescrow.move
- Secure custody of underlying assets backing pointsoracle.move
- External price feeds and conversion rate management
integration.move
- Main protocol interface for users and applicationsstake_position.move
- Individual stake representations as Sui objectsstaking_manager.move
- Staking lifecycle management
partner.move
- Partner onboarding and managementpartner_flex.move
- Flexible partner reward configurationspartner_yield.move
- Partner-specific yield calculationsperk_manager.move
- Perk creation, pricing, and redemptiongeneration_manager.move
- Generation-based reward distributions
loan.move
- Collateralized lending against staked positionspending_withdrawals_manager.move
- Withdrawal queue management
- Points are non-transferable by design, tied to user addresses
- Prevents gaming through wash trading or artificial transfers
- Maintains authentic engagement tracking
- Each stake is its own
StakePosition
object with thekey
ability - Compromise blast-radius is limited to individual objects
- Enhanced security through isolation
- Partners can integrate using stable APIs without core modifications
- Configurable reward parameters and perk systems
- Generation-based and yield-based reward models
- Package uses upgrade capabilities for compatible improvements
- Governance controls through capability objects
- Emergency pause functionality for security
points = principal Γ participation Γ time_weight Γ (1 / liquidity_dom)
This formula is implemented as pure Move math inside the ledger
module for deterministic, on-chain results.
- Sui CLI installed
- Move development environment configured
# Clone the repository
git clone https://github.com/Alpha4-Labs/contracts.git
cd contracts
# Build the Move package
sui move build
# Run tests
sui move test
The tests/
directory contains comprehensive unit tests for all modules:
# Run specific test module
sui move test --test admin_tests
# Run all tests with coverage
sui move test --coverage
- Ξ±-0 Core Ledger - Basic points accounting β
- Ξ±-1 Stake + Escrow - Full staking and redemption flows β
- Ξ±-2 Partner System - Partner integration and perk management β
- Ξ±-3 Loan Module - Early-exit capability via loans β
- Ξ±-4 Advanced Features - Generation management and yield optimization β
- Emergency Controls - Protocol-wide pause functionality
- Capability-Based Access - Explicit authorization through capability objects
- Comprehensive Events - Full event emission for all state changes
- Extensive Testing - Complete test coverage across all modules
- Error Handling - Descriptive error codes and proper error management
This contracts repository is part of the larger Alpha Points ecosystem:
- Frontend Application - User dashboard and staking interface
- Partner Dashboard - Partner management and analytics
- Rewards Marketplace - Perk browsing and redemption
- SDK - JavaScript/TypeScript integration library
- Documentation - Protocol specifications and guides
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Ensure all tests pass:
sui move test
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Issues - Report bugs or request features via GitHub Issues
- Documentation - Check our comprehensive docs repository
- Community - Join our Discord for discussions and support
Alpha4 Labs - Building the future of cross-chain liquidity and engagement rewards.