Protocol V2
Andamio Protocol V2 - Enhanced state management, simplified roles, and migration support
Andamio Protocol V2
Protocol V2 introduces architectural improvements that simplify the role structure, enhance state management, and provide a clear migration path from V1.
New to V2? Check out What's New in V2 for a detailed look at batch module management, SLT hash encoding, and cost savings.
Key Changes from V1
| Aspect | V1 | V2 |
|---|---|---|
| Transaction Types | 29 across 8 roles | 13 across 5 roles |
| Role Structure | admin, contributor, course-creator, project-creator, student, general | admin, contributor, student, general, user |
| State Management | Separate state validators | Unified Global State V2 with local state registration |
| Migration | N/A | Built-in V1 to V2 migration support |
V2 Architecture Overview
Simplified Role Structure
V2 consolidates roles by removing course-creator and project-creator - these functions are now handled by admin transactions. This reduces complexity while maintaining full functionality.
Active Roles in V2:
- Admin - Instance administrators managing courses and projects
- Contributor - Project participants earning rewards
- Student - Course participants completing assignments
- General - Protocol-wide operations (access tokens, registration)
- User - Migration operations (V1 to V2 transition)
New Systems in V2
- Local State Registration - New
globalvalidator system for registering local states to the global V2 system - Global State V2 - Enhanced state management with improved tracking and coordination
- Course State V2 - Upgraded course validators with better state handling
- Contributor State V2 - Enhanced contributor tracking and reward distribution
Protocol Components
Validators
V2 validators organized by system:
| System | Validators | Purpose |
|---|---|---|
| Global State | 2 | Core protocol state (V1 compat + V2 enhanced) |
| Global | 1 | Local state registration |
| Index Validators | 3 | Access token minting and index references |
| Instance | 3 | Instance-level management |
| Course | 4 + 3 observers | Course and assignment management |
| Project | 3 + 4 observers | Contributor and treasury management |
Transactions
V2 transactions organized by system and role:
| System | Role | Transactions | Key Operations |
|---|---|---|---|
| General | Open | 1 | mint-access-token (~7.9 ADA) |
| Course | Admin | 2 | create (~45 ADA), teachers-update (~5.3 ADA) |
| Course | Teacher | 2 | modules-manage, assignments-assess |
| Course | Student | 3 | enroll, assignment-update, credential-claim |
Single Credential Loop Cost: Student ~1.11 ADA + Teacher ~0.21 ADA = ~1.32 ADA total
Tokens
V2 tokens organized by system:
| System | Key Tokens |
|---|---|
| Global State | access-token-user, access-token-global-state, access-token-index |
| Global | local-state-registration |
| Local State | local-state-nft |
| Instance | instance-admin-token, course-nft, project-nft |
| Course | course-state-v2-token, module-token |
| Project | contributor-state-v2-token, treasury-token |
Migration from V1
Users with V1 global state can migrate to V2 using the move-global-state-v1-to-v2 transaction. This preserves existing access tokens while enabling V2 features.
Source of Truth
V2 protocol documentation is built from multiple registry files:
| Registry | Purpose |
|---|---|
| address-registry.json | Validators, policies, observers with addresses |
| endpoint-registry.json | API endpoints with request/response schemas |
| cost-registry.json | Transaction fees, protocol fees, loop costs |
API Endpoints:
/api/transaction-v2?file=<path>&format=v1- Transaction YAML data/api/costs/v2- Cost registry (supports?tx=,?loop=,?summary=true)
Status
Course System: ✅ Complete (8 transactions documented) Project System: 🔜 Coming soon
Documentation is aligned with the Atlas API Preprod swagger.