10. KEVM — Ethereum Virtual Machine
The Kortana Ethereum Virtual Machine (KEVM) integration provides complete, unmodified compatibility with the Ethereum smart contract ecosystem.
10.1 EVM Revision: Cancun
The KEVM executes smart contracts under the Cancun (EVMC_CANCUN) hard fork revision. It natively supports all modern EVM opcodes, including transient storage (TSTORE at 0x5D, TLOAD at 0x5E), memory copying (MCOPY at 0x5E), and push-zero (PUSH0 at 0x5F), ensuring that contracts compiled with modern Solidity compilers (0.8.24+) execute flawlessly.
Transient storage enables high-efficiency reentrancy locks and temporary execution buffers that reset automatically at the end of each transaction, substantially reducing gas costs compared to conventional SSTORE/SLOAD patterns.
10.2 evmone Integration
The KEVM engine is powered by evmone, an ultra-fast, C++ implementation of the Ethereum Virtual Machine adhering to the standard EVMC API. By embedding evmone directly into kortana-node, Kortana achieves byte-for-byte behavioral parity with Ethereum mainnet execution, eliminating edge-case incompatibilities in gas calculation, call frame handling, and memory expansion.
The host interface (KevmHost) intercepts EVM state queries and storage operations, redirecting them directly into Kortana's transactional state trie cache.
10.3 Precompiles
Standard Ethereum cryptographic precompiled contracts are natively implemented in C++ for maximum performance:
0x01ecrecover: Recovers public keys from ECDSA signatures.0x02sha256: Computes standard SHA-256 digests.0x03ripemd160: Computes RIPEMD-160 digests.0x04identity: Memory copying identity function.0x05modexp(EIP-198): Arbitrary precision big-integer modular exponentiation.0x06ecadd(alt_bn128): Elliptic curve point addition on the alt_bn128 curve.0x07ecmul(alt_bn128): Elliptic curve scalar multiplication.0x08ecpairing(alt_bn128): Elliptic curve bilinear pairing checks for zk-SNARK verifiers.0x09blake2f(EIP-152): BLAKE2bFcompression function.
10.4 System Contracts (Read-Only)
Kortana exposes native blockchain consensus and governance metadata to Solidity contracts through read-only system contracts deployed at reserved address spaces:
0x0000000000000000000000000000000000000100: Chain Information (slot number, epoch, dPOH tick rate).0x0000000000000000000000000000000000000101: Staking State (active validator set, total bonded stake).0x0000000000000000000000000000000000000102: Governance State (ParamStoreconfiguration values).
[!TIP] These system contracts are strictly read-only. Mutating consensus or staking state via EVM calls is prohibited to prevent transaction reverts from leaving consensus state in an inconsistent state.
10.5 Reserved Address Range
All addresses within the range 0x0000000000000000000000000000000000000000 through 0x00000000000000000000000000000000000001FF are strictly reserved for precompiles and system contracts. Any transaction attempting to transfer native value ($DNR) to these addresses or deploy code into this range will revert immediately.
This reservation protects the protocol against state hijacking, contract address collisions, and accidental destruction of system execution entry points.
10.6 EVM Deployment
Contract deployment on the KEVM follows standard Ethereum semantics. A deployment transaction specifies an empty to address and provides initialization bytecode (init code) in the data field. The KEVM executes the init code, runs the constructor, and permanently writes the returned runtime bytecode to the contract's account in the state trie.
Addresses for deployed contracts are derived deterministically using standard CREATE (Keccak-256(RLP(sender, nonce))[12..31]) or CREATE2 (Keccak-256(0xff || sender || salt || Keccak-256(init_code))[12..31]).
10.7 Known EVM Limitations
To maintain strict consensus determinism, certain EVM opcodes exhibit modified semantics on Kortana:
PREVRANDAOReturns Zero: Kortana derives randomness from dPOH and BLS signatures rather than an Ethereum-style beacon chain. ThePREVRANDAOopcode (0x44) deterministically returns zero. Protocols requiring randomness must use dPOH entropy or off-chain oracles.- Blob Opcodes (
BLOBHASH,BLOBBASEFEE): EIP-4844 blob-carrying transactions are not implemented on Kortana. These opcodes return zero. - No Filter Polling API: The deprecated
eth_newFilterpolling endpoint is omitted in favor of high-performance WebSocket log subscriptions (eth_subscribe).