Skip to content

Whitepaper

XPower: A Proof-of-Work Token System with NFT Staking and Time-Weighted Rewards — Karun The Rich, preprint 2601 [cs.CR], January 2026

Download PDF

Abstract

We present XPower, a novel proof-of-work (PoW) token system deployed on the Avalanche blockchain that combines cryptographic mining with NFT-based staking and time-weighted reward mechanisms. Unlike traditional PoW cryptocurrencies that require dedicated mining infrastructure, XPower enables browser-based mining through nonce discovery using the Keccak-256 hash function. The protocol introduces a dual-token economy: XPOW (the base mining token) and APOW (an aged store-of-value derivative), complemented by ERC-1155 NFTs that serve as staking instruments. We describe the mathematical foundations of the difficulty-to-reward mapping, the polynomial-based annual percentage rate (APR) system, and the integrator mechanism for computing duration-weighted means. Our implementation includes anti-gaming protections, migration support for protocol upgrades, and dynamic rate adjustment based on staking distribution. The system achieves fair token distribution through computational work while providing long-term value accrual through the staking and aging mechanisms.

1. Introduction

The distribution of cryptocurrency tokens remains a fundamental challenge in decentralized systems. Initial Coin Offerings (ICOs) and token airdrops suffer from centralization concerns and Sybil attacks, while traditional proof-of-work mining requires significant capital investment in specialized hardware. XPower addresses these limitations by implementing a browser-accessible proof-of-work system where tokens are minted proportionally to computational difficulty achieved.

Architecture

The XPower protocol consists of six interconnected smart contracts deployed on Avalanche C-Chain:

ContractAliasTypeRole
XPowermoeERC20Base proof-of-work token — mined through Keccak-256 nonce discovery
XPowerNftnftERC1155Deposit receipt NFT — represents locked XPOW with tiered levels
APowerNftpptERC1155Staking receipt NFT — tracks age and shares for reward calculation
APowersovERC20Store-of-value token — minted through staking rewards at a rate-limited pace
MoeTreasurymtyTreasuryReward distributor — calculates APR/APB and mints APOW on claims
NftTreasuryntyTreasuryStaking manager — handles stake/unstake operations on XPowerNft ↔ APowerNft

The token flow follows a mine → deposit → stake → claim pipeline. Miners produce XPOW through nonce discovery; depositors lock XPOW into XPowerNft positions; stakers commit these to NftTreasury to receive APowerNft receipts; those receipts accumulate time-weighted rewards claimable as APOW from MoeTreasury.

Proof-of-Work Cryptocurrencies

Bitcoin pioneered proof-of-work for distributed consensus using SHA-256 double hashing with adjustable difficulty. Ethereum employed Ethash, a memory-hard PoW algorithm designed to resist ASIC mining, before transitioning to proof-of-stake. Monero uses RandomX, optimized for general-purpose CPUs.

XPower differs fundamentally: PoW is used solely for token distribution, not consensus. The underlying blockchain consensus is delegated to Avalanche's proof-of-stake mechanism, while mining determines individual token rewards.

Token Staking Mechanisms

DeFi protocols have developed various staking mechanisms. Compound introduced yield-bearing tokens (cTokens) that accrue interest continuously. Lido created liquid staking derivatives for proof-of-stake networks. Curve implemented vote-escrowed tokens (veCRV) with time-locked staking.

XPower's approach combines NFT representation with time-weighted reward calculation, allowing transferable staking positions while tracking individual stake duration — a pattern not present in any single existing protocol.

ERC-1155 Token Standard

The ERC-1155 multi-token standard enables efficient batch operations and unified handling of fungible and non-fungible tokens. XPower leverages this standard for staking NFTs, encoding both the issuance year and denomination level in the token identifier:

nftId=100×year+level

3. Proof-of-Work Mining

Hash Function and Nonce Discovery

Miners compute Keccak-256 over a structured input to discover a nonce n such that the resulting hash contains a specified number of leading zero nibbles:

H=Keccak256(addressbeneficiaryblockHashn)

The XOR of the contract address and beneficiary address prevents nonce reuse across different recipients while maintaining a fixed-size prefix. The block hash ties computation to a specific point in Avalanche's history, preventing pre-computation attacks.

Difficulty and Reward

Difficulty level z is defined as the number of leading zero nibbles in the 256-bit hash output. The token reward is:

amount(z)=(2z1)×1018

This exponential relationship ensures that higher difficulties yield proportionally more tokens. At z=1, the reward is 1018 (1 XPOW); at z=8, the reward is 255×1018 (255 XPOW). The probability of success drops by a factor of 16 per additional zero: P(z)=1/16z.

Block Hash Intervals and Duplicate Prevention

Mining operates within 1-hour windows tied to Avalanche block hashes. Solutions must be submitted within 3,600 seconds of calling init(blockHash). Each (nonce-hash, block-hash) pair can only be used once, enforced via a mapping of pair indices:

pairIndex=HnonceblockHash

Treasury Split

Every successful mint splits the reward 50/50 between the miner's beneficiary and the MoeTreasury, funding the staking reward pool and aligning incentives across the ecosystem.

4. NFT Staking

XPowerNft — Deposit Receipts

Users convert XPOW tokens to XPowerNft positions by depositing into the NFT contract. Each NFT has a denomination level {0,3,6,,99} and an issuance year. The denomination is:

D()=10

The level step of 3 enables the upgrade mechanism: 1,000 NFTs at level can be burned to mint 1 NFT at level +3, preserving the 10× denomination increase since 10+3=1,000×10.

Maturity and Redemption

NFTs can be redeemed back to XPOW tokens after a maturity period determined by level:

redeemable when:ymint+2/31ycurrent

Higher-level NFTs have exponentially longer lock periods — a level 9 NFT matures in 7 years, while a level 60 NFT requires approximately one million years, making it effectively permanent.

APowerNft — Staking Receipts

When XPowerNfts are staked in the NftTreasury, users receive APowerNfts as receipts tracking:

  • Staked amount per NFT identifier
  • Weighted staking timestamp via an age accumulator
  • Total shares per level for rate adjustment

The age accumulator follows a proportional adjustment invariant: partial unstaking preserves the average staking duration per remaining token. Age resets on transfer, preventing buyers from accumulating age bonus they did not earn.

5. Reward Calculation

Reward Formula

The reward for a staked NFT position combines a level-based base rate and an age-based loyalty bonus:

R=(APR+APB)×age×D×1018106×C

where C=3,155,760,000 seconds (one century) normalizes the annual rate to a per-second accrual.

APR Polynomial

The APR maps an NFT's level to a base reward rate via a configurable three-term polynomial with fractional exponentiation:

APR()=(add+×muldiv)exp/256×106baseexp/256

Default parameters [0,3,3,375,000,256] yield APR()=1.125% — each ternary level step adds 3.375% APR.

APB Polynomial

The APB rewards older NFT vintages, mapping age in years through the same polynomial structure:

APB(y)=(add+y×muldiv)exp/256×106baseexp/256

Default parameters [0,1,100,000,256] yield APB(y)=0.1y% — a deliberately modest 0.1% per year, additive to APR.

Dynamic Rate Adjustment and Integrator

Per-level share accumulation drives a dynamic scalar that redistributes rewards toward under-staked levels:

scalar()=mul×sharesbins×shares[]

Rate changes are smoothed by the integrator mechanism, which computes duration-weighted arithmetic means over rate history, preventing flash-staking manipulation.

6. Migration

The protocol supports migration from previous contract versions through the Migratable base contract. Token migration allows users to convert old tokens to new tokens within an approximately 4-year deadline window (126,230,400 seconds from deployment). NFT migration uses a two-step process: burn old NFTs from the previous contract, then deposit equivalent XPOW to mint new NFTs. APower migration is atomic — burning old APOW triggers migration of the corresponding XPOW backing before minting new APOW.

Both token and SOV migration can be sealed by authorized roles (MOE_SEAL_ROLE, SOV_SEAL_ROLE), making the migration windows finite. The system attempts multiple level variations to find matching old NFTs, handling cases where level encoding changed between versions.

7. Security

Audit

The XPower smart contracts underwent a comprehensive security audit by Hacken.io in January 2024, achieving an overall score of 9.1/10 with a perfect 10/10 security score. The audit identified 6 findings (1 critical, 2 high) — all resolved:

  • Critical: Block hash validity window — the timestamp comparison was corrected to enforce proper one-hour expiry
  • High: NFT transfer age tracking and reward accumulation — resolved via proportional age adjustment and refreshClaimed functionality
  • Low: Migration access controls strengthened

Banq Anti-Gaming System

The Banq library implements multiple protections:

  • Minimum balance ratio: Claims must satisfy netBalance/excessBalance>100, with excess balance burned
  • Supply cap: Without a lending pool, total APOW supply is capped at 43,830 tokens
  • Pool locking: With a pool configured, claimed tokens are auto-supplied and locked

Reentrancy Protection

Critical functions use OpenZeppelin's ReentrancyGuardTransient, leveraging EIP-1153 transient storage for gas-efficient reentrancy prevention.

Access Control and Reparametrization Limits

Role-based access control restricts sensitive operations to APR_ROLE, APB_ROLE, and seal roles. The Rpp library constrains parameter changes to ±50% per update with a minimum 1-month interval between changes, preventing sudden rate manipulation.

Known Risks

The audit identified inherent risks including APOW supply variation based on claiming frequency, migration deadlines subject to sealing, dynamic rate impacts from large stakers, administrative parameter control (within bounded constraints), and APowerNft transfer reward reset.

8. Conclusion and Future Work

XPower presents a novel approach to proof-of-work token distribution that separates mining from consensus, enabling accessible participation without specialized hardware. The NFT staking system provides flexible position management with exponential tier scaling, while the time-weighted reward mechanism incentivizes long-term commitment through additive APR and APB. The polynomial-based rate system and dynamic adjustment create a self-balancing ecosystem that rewards diverse staking strategies.

Future work includes analysis of mining difficulty distribution, optimization of reward parameters based on observed staking patterns, and integration with decentralized lending protocols for the Banq lending pool.

Key Results

Expected Mining Yield: A miner performing N hash attempts expects approximately 0.076N XPOW, yielding roughly one token per 13 hash attempts on average:

E[tokens]N(17115)0.076N

Staking Age Invariant: Partial unstaking preserves the average staking duration per remaining token. After burning amount b from balance B, the proportional reduction in the age accumulator maintains:

ageeffective=BbB×ageeffective

Appendices

A. Glossary

TermDefinition
APBAnnual Percentage Bonus — additional reward rate based on NFT vintage year
APOWAged Power token — a rate-limited store-of-value token backed by XPOW
APRAnnual Percentage Rate — base reward rate per NFT level
BanqAuto-supply and anti-gaming library for APOW claims
IntegratorMechanism for computing duration-weighted arithmetic means of rate values
LevelNFT classification (0, 3, 6, ..., 99) determining denomination
RPMRug Pull Protection — library enforcing bounds on parameter changes
SharesAccumulator tracking total staked value per NFT level for rate adjustment

B. Contract Addresses

ContractAliasRole
XPowerMOEProof-of-work ERC20 token
XPowerNftNFTERC1155 deposit receipt
APowerNftPPTERC1155 staking receipt
APowerSOVStore-of-value ERC20 token
MoeTreasuryMTYReward distributor
NftTreasuryNTYStaking manager

Contract addresses are maintained in environment files and verifiable on Snowtrace. See Contract Addresses for current deployment addresses.

C. Mathematical Derivations

Expected Token Yield: The sum-of-geometric-series derivation shows that expected token yield per hash converges to 1/71/150.07619, giving approximately 13.1 hashes per expected token.

Age Invariant Proof: The proportional burn formula A=A(Bb)/B ensures age/(Bb)=age/B, proving that average staking duration per remaining token is preserved under partial unstaking.