EVM Compatibility
Xphere targets Ethereum Cancun-level EVM compatibility. The intent is bytecode equivalence — contracts deployed on Ethereum mainnet should compile, deploy, and execute identically on Xphere.
Hard Fork Equivalence
| Ethereum Upgrade | Status on Xphere |
|---|---|
| Homestead | ✅ |
| Byzantium | ✅ |
| Constantinople | ✅ |
| Istanbul | ✅ |
| Berlin | ✅ |
| London (EIP-1559) | ✅ |
| Shanghai (PUSH0) | ✅ |
| Cancun (EIP-4844 blobs, transient storage) | ✅ EVM features ⚠️ EIP-4844 blob carry: not applicable |
| Prague / Pectra | 🛠 Planned |
Opcodes
All opcodes through Cancun are supported, including:
PUSH0(Shanghai)TLOAD/TSTORE(transient storage, Cancun)MCOPY(memory copy, Cancun)BLOBHASHreturns0x0(blobs not used by Xphere data layer)BLOBBASEFEEreturns0x1constant
Precompiles
| Address | Function | Supported |
|---|---|---|
0x01 | ecRecover | ✅ |
0x02 | sha256 | ✅ |
0x03 | ripemd160 | ✅ |
0x04 | identity | ✅ |
0x05 | modExp | ✅ |
0x06 | bn256Add | ✅ |
0x07 | bn256ScalarMul | ✅ |
0x08 | bn256Pairing | ✅ |
0x09 | blake2f | ✅ |
0x0a | point_evaluation (KZG) | ✅ (returns zero proof) |
Differences from Ethereum
| Area | Ethereum | Xphere |
|---|---|---|
| Block time | ~12 s | ~1 s |
| Finality | Probabilistic (PoS slots) | Instant (PBFT) on Main Chain |
| Native token | ETH | XP |
| Chain ID | 1 (mainnet) | 20250217 (mainnet) |
| Min priority fee | 0 | 1 gwei |
| Blob carry (EIP-4844) | Yes | No (op present, no data layer) |
Caveats for Ported Contracts
- Block time assumptions — Many DeFi protocols hard-code
block.timestampchecks assuming 12 s blocks. Audit anyblock.timestamp + Narithmetic for the 1 s cadence. - Reorg assumptions — Xphere Main Chain finalizes within 1 block via PBFT. Some bridge code waits
Nconfirmations for probabilistic finality; you can safely shorten this. - Gas price — Use EIP-1559 fields (
maxFeePerGas,maxPriorityFeePerGas). LegacygasPriceworks but is converted internally.
Verifying Equivalence
# Compile the same source against both targets
solc --evm-version cancun --bin contracts/MyContract.sol
Bytecode output should be byte-identical between Ethereum and Xphere targets when both use --evm-version cancun.