HyperPaxeer NetworkPaxeer Network

ArgusVM (AVM)

Register-based virtual machine for Paxeer Network - EVM-compatible but not EVM-dependent

Overview

ArgusVM (AVM) is Paxeer Network's native register-based virtual machine designed for high-performance smart contract execution. Built from the ground up for blockchain applications, ArgusVM provides 256-bit native arithmetic, deterministic gas metering, and superior performance compared to stack-based architectures.

Revolutionary Architecture: ArgusVM represents Paxeer's path to becoming the first EVM L2 to transition into EVM-compatibility without EVM-dependency. We maintain full compatibility while building a fully self-sustainable ecosystem.

Why ArgusVM?

The Path to Independence

Paxeer Network is pioneering a new approach: EVM-compatible but EVM-independent. While we maintain full compatibility with existing Ethereum tooling and contracts, we're building our own execution environment that doesn't rely on EVM infrastructure.

Architecture

Register Set

ArgusVM uses 32 general-purpose 256-bit registers plus special-purpose registers:

// General-purpose registers (256-bit)
r0-r31    : 32 general-purpose registers

// Special-purpose registers (64-bit)
pc        : Program counter
sp        : Stack pointer (for call frames)
fp        : Frame pointer (for local variables)
gas       : Remaining gas
status    : Status flags

Status Flags

64-bit status register with condition flags:

bit 0: ZERO      - Last operation result was zero
bit 1: CARRY     - Arithmetic carry occurred
bit 2: OVERFLOW  - Arithmetic overflow occurred
bit 3: HALT      - Execution halted
bit 4: REVERT    - Transaction should revert
bit 5-63: Reserved

Memory Model

ArgusVM uses a segmented memory model optimized for smart contracts:

Memory Layout

┌─────────────────────────┐ 0x00000000
│   Code Segment          │ (Read-only, contract bytecode)
│   (Max 24KB)            │
├─────────────────────────┤ 0x00006000
│   Data Segment          │ (Read/Write, initialized data)
│   (Max 8KB)             │
├─────────────────────────┤ 0x00008000
│   Stack                 │ (Read/Write, grows downward)
│   (Max 64KB)            │
├─────────────────────────┤ 0x00018000
│   Heap                  │ (Read/Write, dynamic allocation)
│   (Max 128KB)           │
└─────────────────────────┘ 0x00038000

Storage (Persistent State)

  • Key-value store: bytes32 → bytes32
  • Accessed via: SLOAD and SSTORE opcodes
  • 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 │  dst   │  src1  │  src2  │   immediate    │
│ 8-bit  │ 8-bit  │ 8-bit  │ 8-bit  │    32-bit      │
└────────┴────────┴────────┴────────┴────────────────┘

Opcode Categories

0x00  NOP                    - No operation
0x01  ADD   dst, src1, src2  - dst = src1 + src2
0x02  SUB   dst, src1, src2  - dst = src1 - src2
0x03  MUL   dst, src1, src2  - dst = src1 * src2
0x04  DIV   dst, src1, src2  - dst = src1 / src2 (unsigned)
0x05  SDIV  dst, src1, src2  - dst = src1 / src2 (signed)
0x06  MOD   dst, src1, src2  - dst = src1 % src2
0x07  EXP   dst, src1, src2  - dst = src1 ** src2
0x08  ADDMOD dst, src1, src2 - dst = (src1 + src2) % imm
0x09  MULMOD dst, src1, src2 - dst = (src1 * src2) % imm
0x10  AND   dst, src1, src2  - dst = src1 & src2
0x11  OR    dst, src1, src2  - dst = src1 | src2
0x12  XOR   dst, src1, src2  - dst = src1 ^ src2
0x13  NOT   dst, src1        - dst = ~src1
0x14  SHL   dst, src1, src2  - dst = src1 << src2
0x15  SHR   dst, src1, src2  - dst = src1 >> src2 (logical)
0x16  SAR   dst, src1, src2  - dst = src1 >> src2 (arithmetic)
0x17  ROL   dst, src1, src2  - dst = rotate_left(src1, src2)
0x18  ROR   dst, src1, src2  - dst = rotate_right(src1, src2)
0x20  LT    dst, src1, src2  - dst = (src1 < src2) ? 1 : 0
0x21  GT    dst, src1, src2  - dst = (src1 > src2) ? 1 : 0
0x22  EQ    dst, src1, src2  - dst = (src1 == src2) ? 1 : 0
0x23  ISZERO dst, src1       - dst = (src1 == 0) ? 1 : 0
0x24  SLT   dst, src1, src2  - dst = (src1 < src2) ? 1 : 0 (signed)
0x25  SGT   dst, src1, src2  - dst = (src1 > src2) ? 1 : 0 (signed)
0x30  MLOAD  dst, src1       - dst = memory[src1]
0x31  MSTORE src1, src2      - memory[src1] = src2
0x32  MLOAD8 dst, src1       - dst = memory[src1] (8-bit)
0x33  MSTORE8 src1, src2     - memory[src1] = src2 (8-bit)
0x34  MCOPY  dst, src, len   - memcpy(dst, src, len)
0x40  SLOAD  dst, key        - dst = storage[key]
0x41  SSTORE key, value      - storage[key] = value
0x50  JMP    addr            - pc = addr
0x51  JMPI   addr, cond      - if (cond != 0) pc = addr
0x52  CALL   addr            - call subroutine at addr
0x53  RET                    - return from subroutine
0x54  HALT                   - stop execution (success)
0x55  REVERT                 - stop execution (revert state)
0x80  ADDRESS    dst         - dst = current contract address
0x81  BALANCE    dst, addr   - dst = balance of addr
0x82  ORIGIN     dst         - dst = transaction origin
0x83  CALLER     dst         - dst = message sender
0x84  CALLVALUE  dst         - dst = msg.value
0x85  CALLDATALOAD dst, idx  - dst = calldata[idx]
0x86  CALLDATASIZE dst       - dst = len(calldata)
0x87  CODESIZE   dst         - dst = len(code)
0x88  GASPRICE   dst         - dst = tx.gasprice
0x89  BLOCKHASH  dst, num    - dst = blockhash(num)
0x8A  COINBASE   dst         - dst = block.coinbase
0x8B  TIMESTAMP  dst         - dst = block.timestamp
0x8C  NUMBER     dst         - dst = block.number
0x8D  GASLIMIT   dst         - dst = block.gaslimit
0x8E  CHAINID    dst         - dst = chain_id
0x90  EXTCALL addr, gas, value, argsOffset, argsSize, retOffset, retSize
0x91  EXTDELEGATECALL addr, gas, argsOffset, argsSize, retOffset, retSize
0x92  EXTSTATICCALL addr, gas, argsOffset, argsSize, retOffset, retSize
0x93  CREATE value, offset, size, salt
0x94  CREATE2 value, offset, size, salt
0x95  SELFDESTRUCT beneficiary

Gas Model

Base Costs

OperationGas Cost
Arithmetic3 gas
Bitwise3 gas
Comparison3 gas
Memory load3 gas
Memory store3 gas
Storage load (cold)200 gas
Storage load (warm)100 gas
Storage store (cold)5000 gas
Storage store (warm)200 gas
Jump8 gas
Call100 gas + target gas
Create32000 gas
Log375 gas + 375 per topic + 8 per byte

Memory Expansion Cost

memory_cost = (memory_size_word ** 2) / 512 + (3 * memory_size_word)

Execution Model

Contract Execution Flow

Load Contract

Load contract bytecode from state

Initialize VM

pc = 0
gas = tx.gas_limit
registers = [0; 32]
memory = empty

Execute Instructions

Execute until HALT/REVERT/OUT_OF_GAS

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:

IDNameInputOutput
0ecrecoverhash, v, r, saddress
1sha256data, lenhash
2keccak256data, lenhash
3blake2bdata, lenhash
4verify_ed25519msg, sig, pubkeybool
5verify_secp256k1msg, sig, pubkeybool
6bls_verifymsg, sig, pubkeybool
7bls_aggregatesigs[], lenaggregated_sig
8modexpbase, exp, modresult
9bn256_addx1, y1, x2, y2x3, y3
10bn256_mulx, y, scalarx2, y2
11bn256_pairingpoints[], lenbool

Precompiled Contracts

Standard precompiles for common cryptographic operations:

AddressNamePurpose
0x01ECRecoverECDSA signature recovery
0x02SHA256SHA-256 hash
0x03RIPEMD160RIPEMD-160 hash
0x04IdentityData copy
0x05ModExpModular exponentiation
0x06BN256AddBN256 elliptic curve addition
0x07BN256MulBN256 elliptic curve multiplication
0x08BN256PairingBN256 pairing check
0x09Blake2FBlake2b F compression
0x0ABLS12VerifyBLS12-381 signature verification
0x0BBLS12AggregateBLS12-381 signature aggregation

Bytecode Format

File Structure

┌──────────────────────┐
│Magic Number (4 bytes)│ 0x41564D00 ("AVM\0")
├──────────────────────┤
│ Version (2 bytes)    │ 0x0001
├──────────────────────┤
│ Code Size (4 bytes)  │ Length of code section
├──────────────────────┤
│ Data Size (4 bytes)  │ Length of data section
├──────────────────────┤
│ Code Section         │ Executable instructions
│ (variable length)    │
├──────────────────────┤
│  Data Section        │ Initialized constants
│ (variable length)    │
├──────────────────────┤
│  Metadata Section    │ ABI, source map, etc.
│  (variable length)   │
└──────────────────────┘

Instruction Encoding Example

// Example: ADD r1, r2, r3
// Encoding: 0x01 0x01 0x02 0x03 0x00000000
┌────────┬────────┬────────┬────────┬────────────────┐
│ opcode │  dst   │  src1  │  src2  │   immediate    │
0x010x010x020x030x00000000
└────────┴────────┴────────┴────────┴────────────────┘

Determinism Guarantees

Prohibited (Non-Deterministic)

The following are prohibited in ArgusVM contracts:

  • ❌ 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

Performance Characteristics

Expected Performance

MetricValue
Throughput10,000+ simple transactions/sec per core
Latency<1ms per simple contract call
Memory<100MB per VM instance
Startup<10ms to initialize VM

Optimization Strategies

  • JIT compilation for hot paths (future)
  • Register allocation optimization
  • Instruction fusion (combine common patterns)
  • Lazy memory allocation

Comparison to Other VMs

FeatureArgusVMEVMWASM
ArchitectureRegisterStackStack
Word Size256-bit256-bit32/64-bit
Gas MeteringYesYesExternal
DeterministicYesYesDepends
PrecompilesYesYesNo
JIT SupportFutureNoYes
EVM CompatibleYesN/ANo
EVM DependentNoYesNo

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:

OpenLang Integration

ArgusVM is designed to work with OpenLang, Paxeer's Rust-inspired smart contract language:

// OpenLang example
contract MyToken {
    state balance: Map<address, u256>;
    
    pub fn transfer(to: address, amount: u256) -> bool {
        require(balance[msg.sender] >= amount, "insufficient balance");
        balance[msg.sender] -= amount;
        balance[to] += amount;
        return true;
    }
}

OpenLang → ArgusVM Compilation

OpenLang compiles directly to ArgusVM bytecode:

  • Rust-inspired syntax
  • Type safety
  • Built-in overflow protection
  • Optimized register allocation

Roadmap

Phase 1: Core Implementation

  • VM core in Go
  • Bytecode assembler
  • Test suite

Phase 2: Language & Tooling

  • OpenLang compiler
  • OpenLang → AVM compiler
  • Development tools

Phase 3: EVM Translation

  • EVM → AVM bytecode translator
  • Compatibility testing
  • Migration tools

Phase 4: Optimization

  • JIT compilation
  • Performance tuning
  • Production deployment

Resources

Conclusion

ArgusVM represents Paxeer Network's commitment to building a fully self-sustainable ecosystem while maintaining EVM compatibility. By combining register-based architecture, 256-bit native arithmetic, and deterministic execution, ArgusVM provides the foundation for Paxeer to become the first EVM L2 to transition into EVM-compatibility without EVM-dependency.

Join the Revolution: Build on ArgusVM and be part of the future of blockchain execution environments. Start with OpenLang and OPAX-28 today!

How is this guide?

On this page