Migration
The XPower protocol evolved from v9.x (Hardhat-based) to v10.x (Foundry-based) contracts. The migration system enables holders of legacy tokens and NFTs to transition to the current protocol.
Why Migration?
The v10.x rewrite introduced:
- Foundry build system — faster compilation and testing
- Optimized gas usage — ReentrancyGuardTransient (EIP-1153) instead of standard guards
- Improved architecture — cleaner inheritance, better library separation
- Additional features — Banq anti-gaming, integrator smoothing, dynamic rates
Migration preserves the economic continuity of the protocol while enabling technical progress.
Token Migration (XPOW)
Legacy XPOW holders migrate via the MoeMigratable system:
- Approve the legacy contract to spend your old XPOW
- Call
migrateFrom(amount)on the newXPowercontract - Old XPOW is burned, new XPOW is minted 1:1
- The treasury split is maintained — legacy treasury balance migrates to the new MoeTreasury
Deadline
Migration must be completed within ~4 years (126,230,400 seconds) of the new contract deployment. After the deadline, migration is permanently sealed — the moeMigratable.seal() function is one-way and irreversible.
NFT Migration (XPowerNft)
Legacy XPowerNft holders use a two-step process:
- Burn old NFTs — Call
migrateFromOld(ids, amounts)on the new contract, which burns the specified legacy NFTs - Deposit mint — Call
migrateDeposit(level, amount)to mint new XPowerNfts with the equivalent XPOW value
The NftMigratable contract manages the migration window and provides:
- Sealing — Admin can permanently close migration
- Emigration — Admin can open a 1-week window for the reverse direction (new → old)
APOW Migration
Legacy APOW holders use atomic migration via the SovMigratable system:
- Call
migrateFrom(amount)on the newAPowercontract - Old APOW is burned and new APOW is minted atomically
- The entire operation succeeds or reverts as a unit — no partial migration
The SovMigratable also supports cross-migration with the Banq lending system, enabling APOW to function as collateral.
Migration States
| State | Token | NFT |
|---|---|---|
| Open | Migration active | Migration active |
| Sealed | Permanently closed | No new NFT migration |
| Emigration open | N/A | 1-week reverse window |
| Deadline passed | Sealed automatically | Sealed automatically |
Current Deadlines
Check on-chain for exact deadlines:
moeMigratable.migrationDeadline()
nftMigratable.migrationDeadline()
sovMigratable.migrationDeadline()See Contract Addresses for deployed contract addresses on mainnet and testnet.