Overview
ArgusVM is a register-based virtual machine designed for HyperPaxeer’s dual-VM architecture. It is the execution environment for the Argus capital-orchestration layer — a C++ runtime that handles risk engines, funded smart-wallet management, and capital allocation. Smart contracts are written in ArgLang, a statically typed language with Rust-inspired syntax that compiles to.avm bytecode.
Register-Based
Faster execution than stack-based VMs (no push/pop overhead)
256-bit Native
First-class support for cryptographic operations
EVM Compatible
Compatible with EVM but not dependent on it
Core Design Principles
- Register-based — 32 general-purpose 256-bit registers eliminate push/pop overhead
- 256-bit native — first-class support for cryptographic operations and large integers
- Deterministic — guaranteed identical output for identical input across all nodes
- Gas-metered — every operation has a fixed gas cost
- Sandboxed — no host-system access except whitelisted syscalls
Architecture
Register Set
ArgusVM uses 32 general-purpose 256-bit registers plus special-purpose registers:Status Flags
64-bit status register with condition flags:Memory Model
ArgusVM uses a segmented memory model optimized for smart contracts:Memory Layout
Storage (Persistent State)
- Key-value store:
bytes32 → bytes32 - Accessed via:
SLOADandSSTOREopcodes - Gas costs:
SLOAD: 200 gas (cold), 100 gas (warm)SSTORE: 5000 gas (cold), 200 gas (warm)
Instruction Set Architecture (ISA)
Instruction Format
Fixed-width 64-bit instructions:Opcode Categories
- Arithmetic
- Bitwise
- Comparison
- Memory
- Storage
- Control Flow
- Blockchain Context
- External Calls
Gas Model
Base Costs
Memory Expansion Cost
Execution Model
Contract Execution Flow
1
Load Contract
Load contract bytecode from state
2
Initialize VM
3
Execute Instructions
Execute until HALT/REVERT/OUT_OF_GAS
4
Return Result
Return result + remaining gas + state changes
Call Stack
- Max depth: 1024 calls
- Each frame stores:
- Return address (pc)
- Saved registers (r0-r31)
- Local variables
- Gas limit for this call
Syscall Interface
ArgusVM provides a syscall interface for cryptographic operations:Precompiled Contracts
Standard precompiles for common cryptographic operations:Bytecode Format
File Structure
Instruction Encoding Example
Determinism Guarantees
Prohibited (Non-Deterministic)
- ❌ System time (use
block.timestamp) - ❌ Random numbers (use
block.hash + nonce) - ❌ Floating point (use fixed-point arithmetic)
- ❌ Hash map iteration order (use sorted keys)
- ❌ External I/O (only syscalls allowed)
Enforced Determinism
- ✅ All arithmetic is 256-bit integer (no floats)
- ✅ Division by zero returns 0 (no exceptions)
- ✅ Out-of-bounds memory access reverts
- ✅ All randomness from blockchain state
- ✅ Fixed gas costs per operation
Security Features
Sandboxing
- No file system access
- No network access
- No system calls except whitelisted syscalls
- Memory isolation between contracts
Gas Limits
- Prevents infinite loops
- Prevents DoS attacks
- Ensures bounded execution time
Reentrancy Protection
- Call depth limit: 1024
- State changes committed only on success
- Revert cascades up call stack
Overflow Protection
- Built-in overflow checks
- Safe arithmetic by default
- No need for SafeMath library
Performance Characteristics
Expected Performance
Optimization Strategies
- JIT compilation for hot paths (future)
- Register allocation optimization
- Instruction fusion (combine common patterns)
- Lazy memory allocation
Comparison to Other VMs
Key Differentiator: ArgusVM is the only VM that is EVM-compatible but not EVM-dependent, enabling full ecosystem independence.
EVM Compatibility Layer
While ArgusVM is independent, we maintain full EVM compatibility through a translation layer:Bytecode Translation
Bytecode Translation
EVM bytecode can be translated to AVM bytecode:
- Stack operations → Register operations
- EVM opcodes → AVM opcodes
- Gas costs normalized
- Behavior preserved
Tooling Support
Tooling Support
Existing Ethereum tooling works with ArgusVM:
- Hardhat, Foundry, Remix support
- MetaMask and other wallets
- Block explorers
- Bridge protocols
Migration Path
Migration Path
Seamless migration for developers:
- Deploy existing Solidity contracts (via translation)
- Gradually migrate to ArgLang
- Optimise for ArgusVM architecture
- Leverage native performance benefits
ArgLang
ArgLang is the statically typed, contract-oriented language that compiles to AVM bytecode. It combines Rust-style safety with Solidity familiarity.Syntax
Type System
- Integers:
u8,u16,u32,u64,u128,u256,i8–i256 - Boolean:
bool - Address:
address(20 bytes) - Bytes:
bytes1–bytes32,bytes,string - Collections:
Vec<T>,Map<K, V>, arrays (u256[10]), structs, enums, options
Function Visibility
Control Flow
Built-in Globals
- msg:
sender,value,data,sig - tx:
origin,gasprice - block:
number,timestamp,coinbase,gaslimit,chainid - this:
address(this),this.balance
Standard Library
Compiler Pipeline
Map and Array Storage
ArgLang maps and arrays use Keccak256-based slot hashing, similar to Solidity but adapted for register-based codegen:- Simple state → sequential slots (
counterat slot 0,ownerat slot 1) - Maps →
keccak256(key || base_slot) - Nested maps → recursive hashing:
keccak256(spender || keccak256(owner || base_slot)) - Arrays → length at
base_slot, elementiatkeccak256(base_slot) + i
Gas for Map Operations
Resources
PAX-28 Token Standard
Native fungible-token spec for ArgusVM
Architecture Overview
Dual-VM design and precompile framework
Smart Contracts
Deploy Solidity contracts on the EVM layer
PaxSpot
Spot exchange built on four AVM-adjacent precompiles