Skip to main content

EVM compatibility

Alongside its native Substrate runtime, AETRON has an EVM-compatible execution layer. It is enabled on both networks, so the blockchain runs Ethereum smart contracts in addition to AETRON's own AI verification logic.

Solidity contracts​

Contracts written for the EVM are deployed on AETRON with the usual Solidity tooling, and there is no new contract language to learn. The familiar standards and contract types work:

  • Token standards: ERC-20, ERC-721 and ERC-1155.
  • DEX, lending, stablecoin and NFT contracts, which teams can deploy themselves.

Anyone can deploy a contract. Before moving an existing contract over, read the differences from Ethereum listed below: the decimal places, the transaction types the blockchain accepts, and the precompiles are not quite the same here as on Ethereum.

Connecting​

Ethereum JSON-RPC is served from the same host as the Substrate RPC, so MetaMask, ethers, viem, Hardhat and Foundry work without adapters.

FieldMainnetTestnet
RPC URLhttps://entrypoint-mainnet.aetron.aihttps://entrypoint-test.aetron.ai
Chain ID33553356
CurrencyAETAET

The native blockchain stores balances with 9 decimal places, the EVM with 18, and the runtime converts between them, which people get wrong regularly. So the same account shows different numbers depending on which side you ask, and a contract that hardcodes 18 decimals for a native transfer is off by a factor of a billion if it is also read from the Substrate side. Full endpoint list: Networks and endpoints.

How an EVM address holds AET​

AETRON has one ledger of AET, the native one. An EVM address (0x…) has no balance of its own: its AET sit in a native account (5…) computed from the address and called its mirror account. MetaMask shows the balance of the mirror account, and an EVM transaction spends from it.

An example. The EVM address

0x1234567890abcdef1234567890abcdef12345678

has this mirror account:

5CL3A7ozfRFw1Hgw9Mmj3S65bvDRQ435YMiHh9DC38oBG43o

AET sent to 5CL3A7oz…G43o from any native wallet appear in MetaMask at 0x1234…5678 as soon as the block is on the blockchain. There is no bridge and nothing to claim.

A few things follow from this:

  • The mirror account is derived in one direction only: it is the BLAKE2-256 hash of the bytes evm: followed by the 20 bytes of the address. A native account cannot be turned back into an EVM address, and nobody holds a native key for the mirror account. Only the key of the EVM address can move its AET, and only through EVM transactions.
  • A native account and an EVM address are two different accounts, even when both belong to the same person. AETRON's own wallets create native accounts; for the EVM, use MetaMask or another Ethereum wallet.
  • Do not paste an EVM address into the recipient field of a native wallet, or a native address into MetaMask. To see the mirror account of any 0x… address and its balance, open Address lookup in the explorer: explorer.aetron.io/evm/address.

Moving AET in and out of the EVM​

Into the EVM. Send an ordinary transfer from your native account to the mirror account of the EVM address. The explorer page Substrate → EVM (explorer.aetron.io/evm/substrate-to-evm) takes a 0x… address, works out its mirror account, and lets your native wallet sign the transfer.

Out of the EVM. An EVM transaction cannot pay a native account directly, so the way out is through the BalanceTransfer precompile at 0x0000000000000000000000000000000000000800. Call its transfer(bytes32 recipient) with the amount as the transaction value; recipient is the 32-byte public key of the native account that receives the AET. The explorer page EVM → Substrate (explorer.aetron.io/evm/evm-to-substrate) builds this call from a 5… address, so all MetaMask has to do is ask you to confirm it.

The way out stays open even if root switches the EVM off in an emergency, so AET from the EVM can always be returned to a native account.

Differences from Ethereum​

The EVM follows the Ethereum Osaka rules, with these differences:

  • EIP-155 transactions only. A transaction must be signed for the chain ID (3355 or 3356). Old legacy transactions without a chain ID are rejected. Modern wallets and libraries sign this way by default.
  • No EIP-7702. Type 4 transactions, the ones with authorization lists, are rejected.
  • Amounts in whole planck. The native ledger has 9 decimal places, so the transaction value must be a multiple of 10^9 wei: no more than 9 decimal places in AET. A value with a smaller fraction is rejected, not rounded.
  • Gas limits. A block holds up to 25,000,000 gas, and a single transaction up to about 21,670,000.
  • Fees. The base fee is not destroyed, unlike on Ethereum. The base fee and the tip go to the block validators' pool along with the fees of native transactions. Once an epoch, every 7,200 blocks (about a day), the pool is paid out to the validators that produced blocks in that epoch, in proportion to the number of blocks each produced. Gas that a transaction does not use is returned to the sender. See Transaction fees.
  • Its own precompiles. Besides the standard Ethereum addresses, the blockchain has its own set, listed below. There is no staking precompile: staking uses native calls.
  • Emergency brakes. Root can close contract creation or switch the EVM off. Neither is in use: the EVM is on, and deployment is open.

Precompiles​

AddressNameWhat it does
0x01 to 0x09Ethereum standardecrecover, SHA-256, RIPEMD-160, identity, modexp, BN128 addition, multiplication and pairing, BLAKE2f, at their Ethereum addresses
0x400Sha3FIPS256SHA3-256 as defined in FIPS 202
0x401ECRecoverPublicKeyRecovers the public key from an ECDSA signature, not only the address
0x402Ed25519Verifyverify(bytes32 message, bytes32 publicKey, bytes32 r, bytes32 s) checks an ed25519 signature
0x403Sr25519VerifyThe same check for an sr25519 signature, the key type of native wallets
0x800BalanceTransfertransfer(bytes32) sends the transaction value to a native account
0x807StorageQueryReads blockchain state, see the next section

The addresses are shown shortened. In full they are 20 bytes, for example 0x0000000000000000000000000000000000000800. Every address in the set holds a small stub code. Before calling a function with no return value, such as transfer(bytes32), Solidity checks that the target has code, and the stub lets that check pass.

One blockchain for finance and AI​

EVM contracts run on the same blockchain as the AI services, without bridges between separate networks.

Contracts read the state of the Proof of Intelligence module through the built-in StorageQuery contract at 0x807, with no external oracle. The call takes a raw storage key and returns the stored value in SCALE encoding, up to 16 KiB. A contract can read Proof of Intelligence records (jobs and their final verdicts, Neuronet and task records, and miner reward records such as the accumulated totals of each account), balances, the timestamp, and from System the accounts, the block number and block hashes. Votes, both hidden and revealed, and the selection of verifiers and witnesses cannot be read from a contract, so that no contract can pay a verifier to vote a certain way. They stay public through the node's RPC.

This opens the way to an AIfi layer: financial instruments built on AI-service data, such as tokenized Neuronets that trade as assets on the blockchain, insurance products tied to recorded verdicts, prediction markets on AI-service metrics, and index products over a pool of Neuronets. These are possibilities for developers; the project itself does not run such products today.