EVM Compatibility
Specter embeds a full Ethereum Virtual Machine within its Cosmos SDK application using the cosmos/evm module v1.0.0-rc2. This means any smart contract that runs on Ethereum can run on Specter — with the same Solidity code, the same tooling, and the same developer experience. The EVM is not a simulation or a compatibility shim; it is a complete execution environment that processes the same opcodes, supports the same precompiles, and follows the same gas accounting as mainnet Ethereum.
EVM Configuration
| Parameter | Value |
|---|---|
| EVM Module | cosmos/evm v1.0.0-rc2 |
| EVM Chain ID (Testnet) | 5445 |
| Go-Ethereum Fork | Specter-Foundation/go-ethereum v1.15.11-specter-2 |
| Solidity Version | ^0.8.20 |
| Max Code Size | 64 KB (increased from Ethereum's 24 KB default) |
| Max Transaction Gas | 25,000,000 |
| Fee Model | EIP-1559 (dynamic base fee + priority fee) |
| Ethereum Fork Level | Cancun |
Custom go-ethereum Fork
Specter uses a patched version of go-ethereum (Specter-Foundation/go-ethereum v1.15.11-specter-2) that includes Cosmos-specific opcode modifications required by the cosmos/evm module. Beyond the Cosmos integration patches, the fork increases the MaxCodeSize from 24 KB to 64 KB.
Why 64 KB?
The Poseidon hash function — which is fundamental to the entire data protocol — requires an on-chain library (PoseidonT3) that compiles to approximately 55 KB of deployed bytecode. Ethereum's default limit of 24,576 bytes (24 KB, introduced in EIP-170) would reject this deployment.
Poseidon is not a typical smart contract — it is a cryptographic primitive that performs BN254 scalar field arithmetic with a specific round structure optimized for ZK circuits. The bytecode is large because it encodes the full round constant table and S-box transformations in Solidity. There is no way to meaningfully reduce its size without compromising the hash function's security properties.
Increasing MaxCodeSize to 64 KB is a targeted change that affects only deployment validation. It does not alter gas costs, execution semantics, or any other EVM behavior.
| Library | Deployed Size | Standard Limit | Specter Limit |
|---|---|---|---|
| PoseidonT3 (2-input Poseidon) | ~55 KB | 24 KB | 64 KB |
| Standard Solidity contracts | < 24 KB | 24 KB | 64 KB |
Solidity Toolchain
Specter's smart contracts are developed and deployed using standard Ethereum tooling:
| Tool | Purpose |
|---|---|
| Solidity ^0.8.20 | Contract language (overflow checks, custom errors, immutable variables) |
| Foundry | Development framework (forge compile, forge test, forge script, forge create) |
| OpenZeppelin Contracts | Audited base contracts (access control, upgradability patterns, utilities) |
No custom compiler or language extensions are required. Any Solidity developer can read, modify, and deploy Specter contracts using their existing toolchain.
EIP-1559 Fee Market
The feemarket module implements Ethereum's EIP-1559 dynamic fee mechanism:
Base fee adjusts dynamically based on block gas utilization. When blocks are more than 50% full, the base fee increases; when they are less than 50% full, it decreases. The base fee portion of transaction fees is burned (removed from circulating supply).
Priority fee (tip) is an optional additional fee that users include to incentivize validators to prioritize their transaction. The priority fee goes directly to the block proposer.
This mechanism provides predictable fee estimation and prevents fee spikes from sustained congestion. Users can set a maxFeePerGas and maxPriorityFeePerGas using standard Ethereum transaction types (EIP-1559 Type 2 transactions).
Precompiles
Specter supports all standard Ethereum precompiled contracts at the Cancun fork level, plus a set of Cosmos-specific precompiles from the cosmos/evm module, plus the custom ghostmint precompile.
Standard Ethereum Precompiles
| Address | Name | Purpose |
|---|---|---|
0x01 | ecRecover | ECDSA public key recovery |
0x02 | SHA-256 | SHA-256 hash function |
0x03 | RIPEMD-160 | RIPEMD-160 hash function |
0x04 | Identity | Data copy (returns input as output) |
0x05 | ModExp | Modular exponentiation (big integer) |
0x06 | ecAdd | BN254 elliptic curve point addition |
0x07 | ecMul | BN254 elliptic curve scalar multiplication |
0x08 | ecPairing | BN254 elliptic curve pairing check |
0x09 | Blake2f | BLAKE2b compression function |
0x0a | Point Evaluation | KZG point evaluation (EIP-4844) |
The BN254 precompiles (0x06, 0x07, 0x08) are particularly important for Specter because Groth16 proof verification requires elliptic curve pairing operations on the BN254 curve. These precompiles make on-chain ZK proof verification gas-efficient.
Cosmos EVM Precompiles
The cosmos/evm module provides precompiles in the 0x0800–0x0807 range that allow EVM contracts to interact with Cosmos SDK modules:
| Address Range | Purpose |
|---|---|
0x0800–0x0807 | Cosmos SDK module interactions (staking, distribution, governance, IBC from EVM) |
Ghostmint Precompile
| Address | Name | Purpose |
|---|---|---|
0x0808 | ghostmint | Native GHOST token minting and burning from EVM contracts |
The ghostmint precompile at 0x0808 is Specter's custom addition. It bridges EVM contract calls to the Cosmos x/bank module, enabling the NativeAssetHandler contract to mint GHOST tokens during reveals and burn them during commits. See the Ghostmint Precompile page for full details.
EVM-Cosmos Address Mapping
Every account on Specter has both a Cosmos bech32 address and an Ethereum hex address. They represent the same underlying account:
| Format | Example | Used By |
|---|---|---|
| Cosmos bech32 | specter19c95kr4qjnfsqldwsgen007zuv2vs3gajsasdz | Cosmos SDK transactions, staking, governance |
| Ethereum hex | 0x2E0B4b0Ea094d3007dae823337BfC2e314C8451D | EVM transactions, MetaMask, smart contract calls |
The conversion is deterministic — the same secp256k1 key pair produces both addresses. Users can interact with the chain using either format, and balances are shared between the Cosmos and EVM representations.
Developer Experience
Deploying and interacting with contracts on Specter works identically to Ethereum:
JSON-RPC compatibility. Specter exposes standard Ethereum JSON-RPC endpoints (eth_sendTransaction, eth_call, eth_getBalance, eth_estimateGas, etc.). Any Ethereum client library — ethers.js, viem, web3.js — works out of the box by pointing at the Specter RPC URL with chain ID 5445.
MetaMask and wallet support. Users can add Specter as a custom network in MetaMask or any EVM-compatible wallet using the chain ID and RPC URL. Token balances, transaction history, and contract interactions work as expected.
Contract verification. Contracts deployed on Specter can be verified using standard Solidity source verification tools. The same compiler version and optimization settings used on Ethereum apply on Specter.