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.