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 (
- Denomination
— 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:
| Level | Denomination (XPOW) | Maturity Offset |
|---|---|---|
| 0 | 1 | 0 years (instant) |
| 3 | 1,000 | 1 year |
| 6 | 1,000,000 | 3 years |
| 9 | 7 years | |
| 15 | 31 years | |
| 30 | ~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 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
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 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:
yourAddressis the recipient (must bemsg.senderor an address you've delegated minting to)levelis the tier level (multiple of 3, less than 100)amountis 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:
- Check your XPowerNft balance — each minted token is identified by
nftId = 100 * currentYear + level - Verify on SnowTrace or the block explorer that the
TransferSingleevent was emitted - 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:
| Level | Matures (if minted 2026) |
|---|---|
| 0 | 2026 (instant) |
| 3 | 2027 |
| 6 | 2029 |
| 9 | 2033 |
| 12 | 2041 |
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:
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:
Authorization: The contract checks that
account == msg.senderor thatmsg.senderhas been approved for minting viaapproveMint(operator, true). If neither, the call reverts withUnauthorizedAccount.Level validation: The function verifies
level % 3 == 0(reverts withNonTernaryLevelif not) andlevel < 100(reverts withInvalidLevel). The year must also be greater than 2020 (InvalidYear).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.NFT minting: The contract computes
nftId = 100 * year() + leveland calls_mint(account, nftId, amount, ""). This is a standard ERC-1155 mint — the tokens appear in your wallet with the computed ID.Event emission: The
TransferSingleevent is emitted withoperator=msg.sender,from=address(0),to=account,id=nftId, andvalue=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.