Skip to content

How It Works ​

The XPower protocol orchestrates six smart contracts through a pipeline that transforms computational work into time-weighted store-of-value tokens.

1. Mine XPOW ​

The entry point is proof-of-work mining. A miner iterates over random nonces, computing:

Keccak256(address⊕beneficiary∥blockHash∥nonce)

When the result has z leading zero nibbles (hex digits), the miner submits the solution on-chain. The reward is (2z−1)×1018 XPOW — split 50% to the miner's beneficiary and 50% to the MoeTreasury. Block hashes are valid for 1 hour and each (blockHash, pairIndex) pair is single-use, preventing replay attacks.

2. Deposit into XPowerNft ​

XPOW holders deposit tokens into the XPowerNft contract to mint tiered ERC-1155 NFTs. Each NFT has:

  • Level ℓ∈{0,3,6,…,99} — must be a multiple of 3
  • Denomination D=10ℓ — the XPOW value locked per NFT
  • ID =100×year+ℓ — encodes both mint year and level
  • Maturity year =mintYear+2⌊ℓ/3⌋−1 — the earliest year the NFT can be redeemed

Higher levels concentrate more XPOW into fewer NFTs, proportional to 10ℓ, and require exponentially longer lock periods.

3. Stake in NftTreasury ​

To earn rewards, XPowerNft holders stake their NFTs in the NftTreasury contract. This:

  • Transfers the XPowerNft to the treasury
  • Mints an APowerNft to the staker — a staking receipt that tracks accumulated age and per-level shares
  • Refreshes the MoeTreasury rate calculations

APowerNfts are transferable (with reward refresh on transfer) and can only be minted or burned by the NftTreasury.

4. Accrue Rewards ​

While staked, rewards accumulate continuously based on two polynomial rate functions:

  • APR (Annual Percentage Rate) — determined by NFT level via polynomial evaluation. Default: linear scaling at 1.125% per level.
  • APB (Annual Percentage Bonus) — determined by stake age via polynomial evaluation. Default: 0.1% per year of stake duration.

The reward formula for a staked NFT is:

R=(APR+APB)×age×D106×C

where D is the denomination, age is in seconds, 106 converts parts-per-million to a fraction, and C=36,525 days (the CENTURY constant).

An integrator mechanism computes duration-weighted arithmetic means of rate changes, preventing flash-stake manipulation. A dynamic scalar redistributes rewards based on per-level share distribution — under-staked levels receive bonus multipliers; over-staked levels receive penalty divisors.

5. Claim APOW ​

Accumulated rewards can be claimed at any time via MoeTreasury.claim(). This mints APOW tokens at a rate-limited pace — the mean minting rate targets approximately 1 token per minute, enforced through a moving average with square-root smoothing. Unclaimed rewards continue accruing; there is no penalty for infrequent claiming.

6. Unstake / Upgrade / Migrate ​

The staking lifecycle supports multiple exit paths:

  • Unstake: Burn APowerNft → receive XPowerNft back. Any pending rewards must be claimed first.
  • Upgrade: Burn 1,000 XPowerNfts at level ℓ → mint 1 XPowerNft at level ℓ+3. This 1000:1 ratio preserves the 10× denomination increment.
  • Redeem: After the maturity year, burn XPowerNft → receive the locked XPOW back.
  • Migrate: Legacy v9.x contracts support full token and NFT migration with ~4-year deadlines.
XPower Architecture
The six-contract XPower architecture: Miner → XPOW → XPowerNft → NftTreasury → APowerNft → MoeTreasury → APOW