Skip to content

Depositing XPOW

Depositing XPOW converts your mined tokens into an XPowerNft — an ERC-1155 receipt that represents locked XPOW at a chosen tier level, ready for staking or holding until maturity.

Prerequisites

  • XPOW tokens in your wallet (obtained via mining or transfer)
  • A small amount of AVAX for gas (~0.01 AVAX covers multiple deposits)
  • The XPower app at app.xpowermine.com or direct contract access

Understanding Levels

Each XPowerNft belongs to a level (), which determines two things:

  • Denomination D=10 — how much XPOW one NFT at this level represents
  • Maturity lock — how many years until the XPOW can be redeemed

Levels must be multiples of 3: {0,3,6,9,,99}.

LevelDenomination (XPOW)Maturity Offset
010 years (instant)
31,0001 year
61,000,0003 years
91097 years
15101531 years
301030~1,024 years

Level 0 is special — it has zero maturity lock and can be redeemed instantly, making it a fully liquid ERC-1155 wrapper for 1 XPOW.

Step-by-Step

1. Choose Your Level

Decide which level to deposit at. Consider:

  • How much XPOW do you have? Each NFT at level requires 10 XPOW. You need at least that much for a single NFT.
  • How long can you lock? Higher levels offer greater staking rewards (denomination multiplies the APR+APB rate) but lock your capital for longer.
  • Will you stake? If you plan to stake for rewards, higher levels earn significantly more due to the denomination multiplier in the reward formula.

You can deposit at multiple levels — use batch minting (step 4) to do it in one transaction.

2. Calculate the Required XPOW

For n NFTs at level , the total XPOW cost is:

total=n×10

For example:

  • 5 level-0 NFTs → 5 XPOW
  • 3 level-3 NFTs → 3,000 XPOW
  • 2 level-6 NFTs → 2,000,000 XPOW

XPOW Decimal Precision

XPOW uses 18 decimals. The contract transfers amount * 10^level * 10^18 atomic units. When you see "1 XPOW" in a wallet, it represents 1×1018 of the underlying uint256 value. The denomination math handles this automatically.

3. Approve XPOW Spending

Before the XPowerNft contract can pull XPOW from your wallet, you must approve the allowance:

XPower.approve(xpowerNftAddress, totalAmount * 10^18)

Where xpowerNftAddress is the XPowerNft contract address and totalAmount * 10^18 is the raw token amount (including 18 decimals).

Gas cost: ~46,000. You only need to approve once per total amount — subsequent mints up to that allowance skip this step.

4. Mint the NFT(s)

Single-Level Mint

To mint NFTs at one specific level:

XPowerNft.mint(yourAddress, level, amount)

Where:

  • yourAddress is the recipient (must be msg.sender or an address you've delegated minting to)
  • level is the tier level (multiple of 3, less than 100)
  • amount is the number of NFTs to mint

Example: minting 5 level-3 NFTs:

XPowerNft.mint("0xYour...", 3, 5)

The contract transfers 5 * 10^3 = 5,000 XPOW from your wallet and mints 5 tokens with ID 202603 (i.e., 100 * 2026 + 3).

Gas cost: ~120,000–180,000 (ERC20 transferFrom + ERC1155 mint).

Batch Mint (Multiple Levels)

To mint across multiple levels in one transaction:

XPowerNft.mintBatch(yourAddress, [level1, level2, ...], [amount1, amount2, ...])

Example: minting 100 level-0 and 2 level-6 NFTs:

XPowerNft.mintBatch("0xYour...", [0, 6], [100, 2])

Total XPOW cost: 100 * 1 + 2 * 1,000,000 = 2,000,100 XPOW, transferred in a single transferFrom call.

Batch minting saves ~30,000–50,000 gas per additional level compared to separate transactions.

5. Verify Your Deposit

After the transaction confirms:

  1. Check your XPowerNft balance — each minted token is identified by nftId = 100 * currentYear + level
  2. Verify on SnowTrace or the block explorer that the TransferSingle event was emitted
  3. Confirm your XPOW balance decreased by the expected amount

Finding Your NFT ID

If you minted in 2026 at level 3, your NFT ID is 202603. The formula is always year * 100 + level. Since levels are multiples of 3 under 100, the ID's last two digits uniquely identify the level, and the leading digits identify the mint year.

Lock Warning

Deposited XPOW is locked until the NFT's maturity date:

maturityYear=mintYear+2/31
LevelMatures (if minted 2026)
02026 (instant)
32027
62029
92033
122041

There is no early redemption, penalty, or governance override that can release immature NFTs. The only exception is during a contract migration period (migratable() == true), which unlocks all NFTs on a time-limited basis.

You can still transfer or stake your XPowerNft at any time — the lock only prevents burning for XPOW redemption.

Maturity Lookup

To check when a specific NFT matures:

XPowerNft.redeemable(nftId)

Returns true if the NFT can be burned for XPOW (maturity year has arrived), false otherwise.

Alternatively, compute it manually:

javascript
const year = Math.floor(nftId / 100);
const level = nftId % 100;
const maturityYear = year + Math.pow(2, Math.floor(level / 3)) - 1;

What Happens Internally

When you call XPowerNft.mint(account, level, amount), the following steps execute on-chain:

  1. Authorization: The contract checks that account == msg.sender or that msg.sender has been approved for minting via approveMint(operator, true). If neither, the call reverts with UnauthorizedAccount.

  2. Level validation: The function verifies level % 3 == 0 (reverts with NonTernaryLevel if not) and level < 100 (reverts with InvalidLevel). The year must also be greater than 2020 (InvalidYear).

  3. XPOW transfer: The contract calls XPower.transferFrom(account, address(this), amount * 10^level * 10^18). This pulls the required XPOW from your wallet into the XPowerNft contract's escrow balance. If your allowance is insufficient, the ERC20 transfer reverts.

  4. NFT minting: The contract computes nftId = 100 * year() + level and calls _mint(account, nftId, amount, ""). This is a standard ERC-1155 mint — the tokens appear in your wallet with the computed ID.

  5. Event emission: The TransferSingle event is emitted with operator=msg.sender, from=address(0), to=account, id=nftId, and value=amount.

For mintBatch, steps 2–4 are repeated for each (level, amount) pair, but the XPOW transfer in step 3 occurs only once for the total sum, improving gas efficiency.