Related Documentation:
- Runtime Configuration & Launch - Network launch procedures
- Configuration Reference - Commands, examples, and quick reference
Overview
Building a Cosmos EVM chain involves two main configuration phases:- Pre-Genesis Setup - Configure binary and source code before initialization
- Genesis Configuration - Set genesis parameters and prepare for network launch
Most pre-genesis parameters cannot easily be changed after launch. Plan carefully.
Planning Your Configuration
Before you begin, decide on these parameters. Use the links to jump to detailed configuration instructions for each item.Pre-Genesis Parameters (Set Before init)
These parameters are compiled into your binary and must be set before running yourchain init:
View All Pre-Genesis Parameters
View All Pre-Genesis Parameters
Chain Name
Default:
evmd
Modified: yourchain (unique name for your project)Bech32 Address Prefix
Default:
cosmos
Modified: Unique prefix for your chain (e.g., evmos, osmosis)BIP44 Coin Type
Default:
60 (Ethereum)
Modified: 60 for EVM chains, or register unique value (not recommended for EVM compatibility reasons)EVM Chain ID
Default:
262144
Modified: Unique positive integer (number). Make sure it is not already taken by checking chainlist.orgToken Decimal Precision
Default: 18 decimals (EVM standard)
Modified: 18 decimals (simpler), 6 decimals (Cosmos standard, requires PreciseBank)
Default Denomination in Source
Default:
aatom / atom
Modified: Update to your token name before initGenesis Parameters (Set After init)
These parameters are configured in genesis.json after initialization:
View All Genesis Parameters
View All Genesis Parameters
Cosmos Chain ID
Format: String (e.g.,
mychain-1)
Common Practice: {name}-{version} formatGenesis Time
Format: RFC3339 UTC timestamp
Common Practice: Coordinated launch time for validators
Bank Denomination Metadata
Required: Base denom, display denom, decimals
Common Practice: Must match your chosen precision
VM Parameters
Includes:
evm_denom, extended_denom_options, gas settings
Common Practice: Configure EVM gas token and optionsActive Precompiles
Default: All enabled
Common Practice: Enable only what you need or leave all enabled
ERC20 Module
Required: Native token pair configuration
Common Practice: Configure STRv2 native token representation
Fee Market (EIP-1559)
Default: Enabled with 1 gwei base fee
Common Practice: Standard EIP-1559 for EVM chains
EVM Access Control
Default: Permissionless
Common Practice: Permissionless for public chains
Staking Parameters
Includes: Bond denom, unbonding time, max validators
Common Practice: 21-day unbonding, 100+ validators
Slashing Parameters
Includes: Downtime window, slash fractions
Common Practice: Cosmos defaults (5% double-sign, 0.01% downtime)
Governance Parameters
Includes: Voting period, quorum, threshold
Common Practice: 2-7 day voting period
Initial Accounts & Validators
Required: Genesis accounts and gentx collection
Common Practice: Fund accounts and collect validator gentxs
Pre-Genesis Setup
Confirm these parameters before runningyourchain init. These parameters are compiled into your binary, and determine how the genesis file is generated.
Chain Name
Show Full Instructions
Show Full Instructions
| Parameter | Details |
|---|---|
| Description | The name of your compiled blockchain executable |
| Default | evmd |
| File Location | Directory name and all Go imports |
| Why Change It | Brand your chain and avoid confusion with the reference implementation |
- Quick Setup (Recommended)
- Methodical Approach
- What Gets Changed
Simplest approach using find-and-replace:
Copy
Ask AI
# 1. Navigate to evm repository
cd /path/to/evm
# 2. IMPORTANT: Create a backup or commit current state
git add -A
git commit -m "Pre-rename checkpoint" || echo "Skipping commit (no changes or not a git repo)"
# 3. Verify you're in the correct directory
if [ ! -f "go.mod" ] || [ ! -d "evmd" ]; then
echo "ERROR: Not in evm repository root. Expected go.mod and evmd/ directory"
exit 1
fi
# 4. Use your editor's find-and-replace (VSCode, etc.) to replace:
# 'evmd' → 'yourchain' (across all files, excluding .git/)
# '.evmd' → '.yourchain' (for home directories)
#
# OR use sed commands:
find . -type f ! -path "*/.git/*" ! -path "*/vendor/*" -exec sed -i '' 's/evmd/yourchain/g' {} \;
find . -type f ! -path "*/.git/*" ! -path "*/vendor/*" -exec sed -i '' 's/\.evmd/.yourchain/g' {} \;
# 5. Verify sed completed successfully
if [ $? -ne 0 ]; then
echo "ERROR: Find-and-replace failed. Restore from backup/git"
exit 1
fi
# 6. Manually rename directories and files:
[ -d "evmd" ] && mv evmd yourchain
[ -d "yourchain/cmd/evmd" ] && mv yourchain/cmd/evmd yourchain/cmd/yourchain
[ -f "config/evmd_config.go" ] && mv config/evmd_config.go config/yourchain_config.go
# 7. Update go.mod module path (if changing from cosmos/evm):
# Edit yourchain/go.mod first line:
# From: module github.com/cosmos/evm/evmd
# To: module github.com/your-org/your-chain/yourchain
# 8. Tidy and build
go mod tidy
cd yourchain && go mod tidy && cd ..
# 9. Build to verify everything works
make build
# 10. Verify binary was created and runs
if [ ! -f "./build/yourchain" ]; then
echo "ERROR: Build failed - binary not found at ./build/yourchain"
exit 1
fi
./build/yourchain version
echo "SUCCESS: Binary renamed from evmd to yourchain"
Validation Checklist before proceeding:
- ✅ Backup created or changes committed to git
- ✅ Running from repository root (go.mod present)
- ✅
evmddirectory exists before rename - ✅ Build succeeds without errors
- ✅ Binary executes and shows version
Show Step-by-Step Manual Process
Show Step-by-Step Manual Process
For those who prefer a careful, step-by-step process with full visibility into each change:1. Create backup:2. Rename the binary directory:3. Rename command subdirectory:4. Rename config file:5. Update package names in Go files:6. Update all import paths:7. Update 8. Update Makefile:9. Update scripts:10. Update Docker configs:11. Update documentation:12. Update home directory references:13. Tidy modules:14. Build and verify:Why use this approach?
Copy
Ask AI
git add -A
git commit -m "Pre-rename checkpoint"
Copy
Ask AI
mv evmd yourchain
Copy
Ask AI
mv yourchain/cmd/evmd yourchain/cmd/yourchain
Copy
Ask AI
mv config/evmd_config.go config/yourchain_config.go
Copy
Ask AI
# Change package evmd to package yourchain
find yourchain -name "*.go" -type f ! -path "*/tests/*" ! -path "*/cmd/*" \
-exec sed -i '' 's/^package evmd$/package yourchain/' {} \;
Copy
Ask AI
# Update evmd imports to yourchain
find . -type f -name "*.go" -exec sed -i '' \
's|github.com/cosmos/evm/evmd|github.com/your-org/your-chain/yourchain|g' {} \;
yourchain/go.mod:Copy
Ask AI
// Change first line from:
module github.com/cosmos/evm/evmd
// To:
module github.com/your-org/your-chain/yourchain
Copy
Ask AI
sed -i '' 's/evmd/yourchain/g' Makefile
sed -i '' 's/\.evmd/.yourchain/g' Makefile
Copy
Ask AI
sed -i '' 's/evmd/yourchain/g' local_node.sh
sed -i '' 's/\.evmd/.yourchain/g' local_node.sh
find tests -name "*.sh" -exec sed -i '' 's/evmd/yourchain/g' {} \;
find scripts -name "*.sh" -exec sed -i '' 's/evmd/yourchain/g' {} \;
Copy
Ask AI
sed -i '' 's/evmd/yourchain/g' docker-compose.yml
mv contrib/images/evmd-env contrib/images/yourchain-env
sed -i '' 's/evmd/yourchain/g' contrib/images/yourchain-env/Dockerfile
sed -i '' 's/evmd/yourchain/g' contrib/images/Makefile
Copy
Ask AI
sed -i '' 's/evmd/yourchain/g' README.md CLAUDE.md
sed -i '' 's/\.evmd/.yourchain/g' README.md CLAUDE.md
Copy
Ask AI
sed -i '' 's/\.evmd/.yourchain/g' config/yourchain_config.go
Copy
Ask AI
go mod tidy
cd yourchain && go mod tidy && cd ..
Copy
Ask AI
make build
if [ ! -f "./build/yourchain" ]; then
echo "ERROR: Build failed"
exit 1
fi
./build/yourchain version
make install
which yourchain
- Complete visibility into each change
- Easier to debug if issues arise
- Educational for understanding project structure
- Better control for complex customizations
The renaming process updates these components across your codebase:1. Directories:4. Build Files:5. Scripts:
evmd/→yourchain/evmd/cmd/evmd/→yourchain/cmd/yourchain/contrib/images/evmd-env/→contrib/images/yourchain-env/
config/evmd_config.go→config/yourchain_config.go
Copy
Ask AI
// Package names
package evmd → package yourchain
// Import paths
import "github.com/cosmos/evm/evmd/cmd"
→ import "github.com/your-org/your-chain/yourchain/cmd"
// Module declaration (yourchain/go.mod)
module github.com/cosmos/evm/evmd
→ module github.com/your-org/your-chain/yourchain
// Home directory references
".evmd" → ".yourchain"
Copy
Ask AI
# Makefile
EXAMPLE_BINARY := evmd → EXAMPLE_BINARY := yourchain
EVMD_DIR := evmd → CRAWD_DIR := yourchain
test-evmd → test-yourchain
# Makefile comments and section headers also updated
local_node.sh: Allevmd→yourchain,$HOME/.evmd→$HOME/.yourchain- All test scripts in
tests/andscripts/directories - Docker compose files and Dockerfiles
README.mdCLAUDE.md- Any project-specific docs
- Git history (
.git/directory untouched) - External dependencies
- Core EVM module code (remains in
x/directories) - Pre-built binaries or archives
Edge Cases: The renaming process is straightforward because
evmd doesn’t have special meaning in Go syntax or require conditional logic. All replacements are simple text substitutions, making bulk find-and-replace safe and effective.yourchain and all commands will use this name (e.g., yourchain start, yourchain init).Bech32 Address Prefix
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Your chain’s address format (e.g., cosmos1..., evmos1..., yourchain1...) |
| Default | cosmos |
| Type | String (lowercase alphanumeric) |
| File Location | config/config.go:62 |
| Adjustable | Immutable (requires rebuild before init) |
| Why Change It | Create unique, recognizable addresses for your chain |
Must be changed before running
yourchain init. Changing after genesis requires a hard fork.- Configuration
- Address Formats
- Verification
Edit After changing, rebuild:
config/config.go and change the Bech32Prefix constant:Copy
Ask AI
const (
// Bech32Prefix defines the Bech32 prefix for your chain
Bech32Prefix = "yourchain" // Change this line
// Bech32PrefixAccAddr defines account addresses
Bech32PrefixAccAddr = Bech32Prefix
// Bech32PrefixAccPub defines account public keys
Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
// Bech32PrefixValAddr defines validator operator addresses
Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
// Bech32PrefixValPub defines validator operator public keys
Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
// Bech32PrefixConsAddr defines consensus node addresses
Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
// Bech32PrefixConsPub defines consensus node public keys
Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)
Copy
Ask AI
make build
Changing the prefix affects all address types:
All these are automatically derived from the base
| Address Type | Prefix Pattern | Example |
|---|---|---|
| Account Address | yourchain | yourchain1abc123... |
| Account PubKey | yourchainpub | yourchainpub1abc123... |
| Validator Operator | yourchainvaloper | yourchainvaloper1abc123... |
| Validator PubKey | yourchainvaloperpub | yourchainvaloperpub1abc123... |
| Consensus Address | yourchainvalcons | yourchainvalcons1abc123... |
| Consensus PubKey | yourchainvalconspub | yourchainvalconspub1abc123... |
Bech32Prefix.After building with your new prefix, verify it works:Expected output:
Copy
Ask AI
# Initialize chain
./build/yourchain init test --chain-id test-1
# Create a test key
./build/yourchain keys add testkey --keyring-backend test
# Check address format
./build/yourchain keys list --keyring-backend test
Copy
Ask AI
- address: yourchain1abc123...
name: testkey
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey",...}'
type: local
BIP44 Coin Type
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | The HD wallet derivation path for key generation according to BIP-44 |
| Default | 60 (Ethereum) |
| Type | uint32 |
| File Location | crypto/hd/hdpath.go:9 |
| Adjustable | Immutable (requires rebuild before init) |
| Standard | SLIP-0044 |
| Why Change It | For Cosmos SDK chains wanting non-Ethereum derivation paths, or to register a unique coin type |
- Keep Default (Recommended)
- Register Unique Value
- Common Values
For EVM-compatible chains, use the default:Benefits:
Copy
Ask AI
var (
// Bip44CoinType satisfies EIP84 for Ethereum compatibility
Bip44CoinType uint32 = 60
)
- Compatible with Ethereum wallets (MetaMask, Ledger, etc.)
- Standard for EVM chains
- No additional registration needed
m/44'/60'/0'/0/0Recommendation: Keep 60 for EVM chains unless you have specific requirements.To register a unique coin type:Note: Custom coin types may not be supported by all wallets.
- Check SLIP-0044 registry for available numbers
- Submit a PR to register your chain’s coin type
-
Update the code in
crypto/hd/hdpath.go:
Copy
Ask AI
var (
// Bip44CoinType for your chain
Bip44CoinType uint32 = 12345 // Your registered number
// BIP44HDPath with your coin type
BIP44HDPath = fmt.Sprintf("m/44'/%d'/0'/0/0", Bip44CoinType)
)
- Rebuild the binary:
Copy
Ask AI
make build
| Coin Type | Chain | Purpose |
|---|---|---|
60 | Ethereum | EVM chains (recommended) |
118 | Cosmos Hub | Traditional Cosmos chains |
330 | Terra | Terra ecosystem |
529 | Secret Network | Secret Network |
852 | Desmos | Desmos Network |
60 for maximum compatibility.For new Cosmos chains: Register a unique value via SLIP-0044.EVM Chain ID
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | The EIP-155 chain ID used for Ethereum transaction replay protection |
| Default | 262144 |
| Type | uint64 |
| File Location | config/config.go:78 |
| Adjustable | Immutable (must be set in source before building binary) |
| Standard | EIP-155 |
| Why Change It | Must be unique for your network to prevent transaction replay attacks |
The EVM Chain ID must be set before building the application. It cannot be changed after your binary is built. Choose carefully.
- Configuration Steps
- Choosing a Chain ID
- What This Controls
1. Edit 2. Rebuild the binary:3. Initialize your chain:4. Verify the chain ID was set correctly:
config/config.go and change the EVMChainID constant:Copy
Ask AI
const (
// ... other constants ...
// EVMChainID defines the EIP-155 replay-protection chain id for the current ethereum chain config.
EVMChainID = 123456 // Change from 262144 to your unique chain ID
)
Copy
Ask AI
make build
Copy
Ask AI
./build/yourchain init mynode --chain-id mychain-1
Copy
Ask AI
grep 'evm-chain-id' ~/.yourchain/config/app.toml
# Should show: evm-chain-id = 123456
Do not edit
app.toml to change the EVM chain ID after initialization. The chain ID must be set in source code before building. Editing app.toml will not properly configure the chain.Requirements:
- Must be a unique integer
- Not already registered on chainlist.org
- Cannot conflict with major networks
1- Ethereum Mainnet137- Polygon56- BNB Chain43114- Avalanche C-Chain10- Optimism42161- Arbitrum One
- Visit chainlist.org
- Search for an unused ID
- For production mainnets, register your ID
- For testnets/devnets, use any high number (e.g., 900000+)
1-999: Reserved for major networks1000-99999: Public production chains100000+: Private/test networks or application-specific chains
The EVM Chain ID is used for:Transaction Signing:Wallet Configuration:Replay Protection:
Copy
Ask AI
// EIP-155 transaction signature includes chain ID
const tx = {
chainId: 123456, // Your EVM Chain ID
nonce: 0,
gasPrice: 1000000000,
gasLimit: 21000,
to: '0x...',
value: 0,
data: '0x'
}
Copy
Ask AI
// MetaMask network configuration
{
chainId: '0x1E240', // 123456 in hex
chainName: 'My Chain',
rpcUrls: ['http://localhost:8545'],
nativeCurrency: {
name: 'Token',
symbol: 'TKN',
decimals: 18
}
}
- Transactions signed for chain
123456cannot be replayed on other chains - Essential security feature of EIP-155
Token Decimal Precision
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Determines whether your native token uses 18 decimals (like ETH) or another precision (like ATOM’s 6 decimals) |
| Default | 18 decimals |
| Type | Architecture decision (affects bank metadata and module configuration) |
| Adjustable | Immutable (cannot be changed after genesis) |
| Why Choose | Affects EVM compatibility and module requirements |
This decision affects your entire architecture and cannot be changed after genesis. Choose based on your compatibility needs.
- 18 Decimals (Recommended)
- 6 Decimals (Cosmos Standard)
- SI Metric Prefixes
Direct EVM Compatibility - Simplest SetupConfiguration:In Genesis:
- Base denom:
atoken(atto-prefix, 10^-18) - Display denom:
token - Exponent: 18
- No additional modules required
- Native 1:1 EVM compatibility
- Uses standard
x/bankmodule - Simpler architecture
- No precision conversion needed
- Standard for EVM ecosystems
Copy
Ask AI
1 token = 1,000,000,000,000,000,000 atoken
= 10^18 atoken
Copy
Ask AI
{
"app_state": {
"bank": {
"denom_metadata": [{
"base": "atoken",
"display": "token",
"denom_units": [
{"denom": "atoken", "exponent": 0},
{"denom": "token", "exponent": 18}
]
}]
},
"evm": {
"params": {
"evm_denom": "atoken"
// No extended_denom_options needed
}
}
}
}
Cosmos SDK Standard - Requires PreciseBank ModuleConfiguration:Additional Setup Required:How It Works:
- Base denom:
utoken(micro-prefix, 10^-6) - Display denom:
token - Exponent: 6
- Requires
x/precisebankmodule - Requires
extended_denom_optionsin genesis
Copy
Ask AI
1 token = 1,000,000 utoken
= 10^6 utoken
- Add PreciseBank to
app.go:
Copy
Ask AI
import (
precisebankkeeper "github.com/cosmos/evm/x/precisebank/keeper"
precisebanktypes "github.com/cosmos/evm/x/precisebank/types"
)
// Initialize keeper
app.PreciseBankKeeper = precisebankkeeper.NewKeeper(
appCodec,
keys[precisebanktypes.StoreKey],
app.BankKeeper,
app.AccountKeeper,
)
// Add to module manager
app.ModuleManager = module.NewManager(
// ...
precisebank.NewAppModule(app.PreciseBankKeeper, app.AccountKeeper),
// ...
)
- Configure Extended Denom in Genesis:
Copy
Ask AI
{
"app_state": {
"bank": {
"denom_metadata": [{
"base": "utoken",
"display": "token",
"denom_units": [
{"denom": "utoken", "exponent": 0},
{"denom": "token", "exponent": 6}
]
}]
},
"evm": {
"params": {
"evm_denom": "utoken",
"extended_denom_options": {
"extended_denom": "atoken" // 18-decimal EVM representation
}
}
}
}
}
- Cosmos SDK sees:
utoken(6 decimals) - EVM sees:
atoken(18 decimals) - PreciseBank handles conversion:
1 utoken = 10^12 wei
| Prefix | Decimals | Example Denom | Conversion | Used By |
|---|---|---|---|---|
a (atto) | 18 | atoken | 1 token = 10^18 atoken | EVM chains |
u (micro) | 6 | uatom, ustake | 1 token = 10^6 utoken | Cosmos Hub, most Cosmos chains |
n (nano) | 9 | ntoken | 1 token = 10^9 ntoken | Some chains |
p (pico) | 12 | ptoken | 1 token = 10^12 ptoken | Rare |
m (milli) | 3 | mtoken | 1 token = 10^3 mtoken | Rare |
| Base | 0-8 | sats | 1 BTC = 10^8 sats | Bitcoin-style |
- EVM-focused → Use
aprefix (18 decimals) - Cosmos-focused → Use
uprefix (6 decimals) + PreciseBank
Default Denomination in Source
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Default token denominations hardcoded in source files that are used when generating configuration files |
| Default | aatom (extended), uatom (base), atom (display) |
| Type | String |
| Files | server/config/migration/v0.50-app.toml:11, x/vm/types/params.go:21-25, config/constants.go:5-8 |
| Adjustable | Pre-Genesis (must be changed before init) |
| Why Change It | So that generated config files use your token name instead of the default |
This step must be completed before running
yourchain init. The defaults are compiled into the binary and written to generated files during initialization.- Files to Modify
- Quick Setup
- Verification
Three source files contain default denomination values:1. Server Configuration Template
File: 2. EVM Module Defaults
File: 3. Example Chain Constants
File:
server/config/migration/v0.50-app.toml:11Change:Copy
Ask AI
# From:
minimum-gas-prices = "0aatom"
# To:
minimum-gas-prices = "0atoken"
x/vm/types/params.go:21-25Change:Copy
Ask AI
// From:
var (
DefaultEVMDenom = "uatom"
DefaultEVMExtendedDenom = "aatom"
DefaultEVMDisplayDenom = "atom"
)
// To:
var (
DefaultEVMDenom = "atoken" // Your base denom
DefaultEVMExtendedDenom = "atoken" // Same if 18 decimals
DefaultEVMDisplayDenom = "token" // Display name
)
config/constants.go:5-8Change:Copy
Ask AI
// From:
const (
ExampleChainDenom = "aatom"
ExampleDisplayDenom = "atom"
)
// To:
const (
ExampleChainDenom = "atoken"
ExampleDisplayDenom = "token"
)
For 18-decimal tokens (recommended):For 6-decimal tokens (Cosmos standard):
Copy
Ask AI
# 1. Update server config template
sed -i '' 's/minimum-gas-prices = "0aatom"/minimum-gas-prices = "0atoken"/' \
server/config/migration/v0.50-app.toml
# 2. Update EVM module defaults
# Open x/vm/types/params.go and change lines 21-25:
# DefaultEVMDenom = "atoken"
# DefaultEVMExtendedDenom = "atoken"
# DefaultEVMDisplayDenom = "token"
# 3. Update example constants for consistency
# Open config/constants.go and change lines 5-8:
# ExampleChainDenom = "atoken"
# ExampleDisplayDenom = "token"
# 4. Rebuild binary
make build
# 5. Initialize and verify
./build/yourchain init testnode --chain-id test-1
grep "minimum-gas-prices" ~/.yourchain/config/app.toml
# Should show: minimum-gas-prices = "0atoken"
Copy
Ask AI
# Update the same files but use "utoken" instead:
# DefaultEVMDenom = "utoken"
# DefaultEVMExtendedDenom = "atoken" # Still needs extended for EVM
# DefaultEVMDisplayDenom = "token"
After making changes and rebuilding:If verification succeeds, your defaults are correctly configured.
Copy
Ask AI
# 1. Initialize chain
./build/yourchain init testnode --chain-id test-1 --home /tmp/test-home
# 2. Verify app.toml
grep "minimum-gas-prices" /tmp/test-home/config/app.toml
# Expected: minimum-gas-prices = "0atoken"
# 3. Verify genesis.json
jq '.app_state.evm.params.evm_denom' /tmp/test-home/config/genesis.json
# Expected: "atoken"
# 4. Clean up test
rm -rf /tmp/test-home
- Base denom:
atoken(atto-token) - Display denom:
token - Example:
1 token = 1,000,000,000,000,000,000 atoken
- Base denom:
utoken(micro-token) - Display denom:
token - Extended denom:
atoken(for EVM) - Example:
1 token = 1,000,000 utoken
Genesis Configuration
After completing Pre-Genesis Setup and runningyourchain init, configure your genesis file. The genesis file is located at ~/.yourchain/config/genesis.json.
Genesis parameters can be modified until you distribute the genesis file to validators. After the network launches, most parameters can only be changed through governance proposals.
Initialize Your Chain
Show Full Instructions
Show Full Instructions
For Production Chains: Before running
init, ensure you have completed all Pre-Genesis Setup steps, especially Binary Name configuration. Organizations deploying their own chain should rename the binary from evmd to their own chain name (e.g., yourchain) to brand their network and avoid confusion with the reference implementation.Copy
Ask AI
yourchain init <moniker> --chain-id <chain-id>
Copy
Ask AI
yourchain init mynode --chain-id mychain-1
~/.yourchain/config/genesis.json- Genesis state file~/.yourchain/config/app.toml- Application configuration~/.yourchain/config/config.toml- CometBFT configuration~/.yourchain/config/client.toml- Client configuration
Cosmos Chain ID
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | The unique string identifier for your blockchain in the Cosmos ecosystem |
| Genesis Path | chain_id (root level) |
| Type | String |
| Format | Flexible string, commonly {name}-{version} |
| Adjustable | Immutable (cannot be changed after genesis without coordinated upgrade) |
| Why Important | Used for IBC connections, CometBFT consensus, and client identification |
- Set During Init
- Modify After Init
- Naming Conventions
The Cosmos Chain ID is typically set during initialization:This writes the chain ID to
Copy
Ask AI
yourchain init mynode --chain-id mychain-1
genesis.json. You must also set it in client.toml:Copy
Ask AI
yourchain config set client chain-id mychain-1
To change the chain ID after initialization:Verify:
Copy
Ask AI
# Update genesis.json
jq '.chain_id = "mychain-1"' ~/.yourchain/config/genesis.json > tmp && \
mv tmp ~/.yourchain/config/genesis.json
# Update client.toml
yourchain config set client chain-id mychain-1 --home ~/.yourchain
Copy
Ask AI
jq '.chain_id' ~/.yourchain/config/genesis.json
grep 'chain-id' ~/.yourchain/config/client.toml
Recommended Formats:Mainnet:Testnet:Local Development:IBC Considerations:
Copy
Ask AI
mychain-1 # Initial mainnet
mychain-2 # After major upgrade/hard fork
mychain-3 # After another major upgrade
Copy
Ask AI
mychain-testnet-1
mychain-testnet-2
mychain-devnet-1
Copy
Ask AI
mychain-local
test-1
dev-1
- IBC clients reference the chain ID
- Incrementing the version number (e.g.,
-1to-2) is the canonical way to upgrade IBC clients - The chain ID is part of the IBC client identifier
- Chain ID can be any string
- No strict format requirements
{name}-{number}is convention but not required
- All validators must use the exact same chain ID
- Chain ID is included in all transactions and blocks
- Cannot be changed after genesis without coordinated upgrade
Genesis Time
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | UTC timestamp when the chain starts producing blocks |
| Genesis Path | genesis_time (root level) |
| Type | RFC3339 timestamp |
| Format | "2024-12-01T00:00:00Z" |
| Adjustable | Immutable (must be set before network launch) |
| Why Important | Coordinates synchronized network launch across all validators |
Copy
Ask AI
jq '.genesis_time = "2024-12-01T00:00:00Z"' ~/.yourchain/config/genesis.json > tmp && \
mv tmp ~/.yourchain/config/genesis.json
Copy
Ask AI
jq '.genesis_time' ~/.yourchain/config/genesis.json
- Testnet: 1-2 hours ahead (allows validator setup)
- Mainnet: 24-48 hours ahead (allows thorough preparation)
- Local Dev: Use past time (starts immediately)
Network Launch Details: For complete launch coordination procedures, validator startup instructions, and timing best practices, see Coordinate Launch Time in the Runtime Configuration & Network Launch guide.
genesis_time in their genesis files.Bank Denomination Metadata
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Your token’s base denomination, decimal precision, and display properties |
| Genesis Path | app_state.bank.denom_metadata |
| Type | Array of metadata objects |
| Adjustable | Governance |
| Why Important | Controls how tokens are displayed and handled across the chain |
Decimal Precision Decision: Your choice of 18 vs 6 decimals (configured in Token Decimal Precision) determines the values below. See that section for detailed explanation.
- Configuration
- Verification
Configure denomination metadata for your chosen precision:Fields:
Copy
Ask AI
# For 18-decimal tokens (base denom: atoken)
jq '.app_state.bank.denom_metadata=[{
"description": "The native staking and gas token",
"denom_units": [
{"denom": "atoken", "exponent": 0, "aliases": ["attotoken"]},
{"denom": "token", "exponent": 18, "aliases": []}
],
"base": "atoken",
"display": "token",
"name": "My Token",
"symbol": "TKN",
"uri": "",
"uri_hash": ""
}]' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# For 6-decimal tokens (base denom: utoken)
# Change "atoken" → "utoken" and exponent: 18 → 6
base: Smallest unit stored on-chain (must match staking bond_denom)display: Human-readable unitexponent: Decimal places (18 or 6 based on your choice)name: Full token name displayed in walletssymbol: Ticker symbol (e.g.,TKN,ATOM,ETH)
After configuration, verify all denoms match across modules:All should return the same denom (e.g.,
Copy
Ask AI
GENESIS=~/.yourchain/config/genesis.json
# Check bank metadata base
jq '.app_state.bank.denom_metadata[0].base' $GENESIS
# Check staking bond denom
jq '.app_state.staking.params.bond_denom' $GENESIS
# Check mint denom
jq '.app_state.mint.params.mint_denom' $GENESIS
# Check EVM denom
jq '.app_state.evm.params.evm_denom' $GENESIS
# Check governance min deposit
jq '.app_state.gov.params.min_deposit[0].denom' $GENESIS
"atoken" or "utoken").app_state.bank.denom_metadata[0].baseapp_state.staking.params.bond_denomapp_state.mint.params.mint_denomapp_state.evm.params.evm_denomapp_state.gov.params.min_deposit[0].denom
VM Parameters
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Core EVM module configuration including gas token, extended denom options, and chain behavior |
| Genesis Path | app_state.evm.params |
| Type | Object containing multiple EVM configuration parameters |
| Adjustable | Governance |
| Why Important | Defines how the EVM layer interacts with Cosmos SDK |
- evm_denom (Required)
- extended_denom_options
- history_serve_window
- extra_eips
Sets which bank denomination is used for EVM gas:Must match your bank metadata base denomination.Source: x/vm/types/params.go:21
Copy
Ask AI
jq '.app_state.evm.params.evm_denom = "atoken"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
Only required for 6-decimal chains (see Token Decimal Precision):When to configure:Source: x/vm/types/params.go:76
Copy
Ask AI
# Only needed if using 6 decimals with PreciseBank
jq '.app_state.evm.params.extended_denom_options = {
"extended_denom": "atoken"
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
- ✅ 6-decimal chains: Set
extended_denomto enable EVM compatibility via PreciseBank - ❌ 18-decimal chains: Leave empty or omit entirely
Copy
Ask AI
{
"evm_denom": "utoken",
"extended_denom_options": {
"extended_denom": "atoken"
}
}
Controls how far back historical state queries can go:Default:
Copy
Ask AI
jq '.app_state.evm.params.history_serve_window = 8192' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
8192 blocks (matches EIP-2935)Values:0= Unlimited (keep all historical state)8192= ~18 hours at 8s blocks (recommended)86400= ~8 days at 8s blocks
- Higher = More disk space, older state queries supported
- Lower = Less disk space, limited historical queries
0= Maximum compatibility, growing disk usage
Enable additional Ethereum Improvement Proposals:Default:
Copy
Ask AI
jq '.app_state.evm.params.extra_eips = []' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
[] (empty - use standard EVM feature set)When to use:- Most chains should leave empty
- Add specific EIP numbers if you need features not in default config
- Example:
[1153, 3855]to enable specific EIPs
Active Precompiles
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Enabled precompiled contracts that expose Cosmos SDK functionality to EVM smart contracts |
| Genesis Path | app_state.evm.params.active_static_precompiles |
| Type | Array of hex addresses (must be sorted) |
| Default | [] (empty - no precompiles enabled) |
| Adjustable | Governance |
| Source | x/vm/types/precompiles.go:22-32 |
Learn More: Precompiles Overview - Complete documentation with Solidity interfaces
This list represents the currently available static precompiles in the codebase. Precompiles are extensible - you can add custom precompiles to your chain. See the authoritative source for the latest available precompiles.
- Available Precompiles
- Enable All (Recommended)
- Enable Selective
- Disable All
| Address | Name | Purpose |
|---|---|---|
0x0100 | P256 | Cryptographic operations for Web3 auth |
0x0400 | Bech32 | Cosmos ↔ Ethereum address conversion |
0x0800 | Staking | Validator staking operations |
0x0801 | Distribution | Reward distribution and claiming |
0x0802 | ICS20 | IBC token transfers |
0x0803 | Vesting | Token vesting operations |
0x0804 | Bank | Bank module operations |
0x0805 | Governance | Submit/vote on proposals |
0x0806 | Slashing | Slashing queries |
Enable all precompiles for maximum Cosmos SDK integration:Use case: Full-featured chains with rich Cosmos SDK integration
Copy
Ask AI
jq '.app_state.evm.params.active_static_precompiles = [
"0x0000000000000000000000000000000000000100",
"0x0000000000000000000000000000000000000400",
"0x0000000000000000000000000000000000000800",
"0x0000000000000000000000000000000000000801",
"0x0000000000000000000000000000000000000802",
"0x0000000000000000000000000000000000000803",
"0x0000000000000000000000000000000000000804",
"0x0000000000000000000000000000000000000805",
"0x0000000000000000000000000000000000000806"
]' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
Enable only specific precompiles:This example enables:
Copy
Ask AI
jq '.app_state.evm.params.active_static_precompiles = [
"0x0000000000000000000000000000000000000100",
"0x0000000000000000000000000000000000000400",
"0x0000000000000000000000000000000000000800",
"0x0000000000000000000000000000000000000804"
]' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
- P256 (cryptography)
- Bech32 (address conversion)
- Staking
- Bank
Pure EVM chain with no Cosmos SDK integration:Use case: Standard EVM chain without Cosmos features
Copy
Ask AI
jq '.app_state.evm.params.active_static_precompiles = []' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
ERC20 Module
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Configured token pairs between Cosmos bank denoms and ERC20 representations, implementing Single Token Representation v2 (STRv2) |
| Genesis Path | app_state.erc20 |
| Type | Object containing token pairs and configuration |
| Adjustable | Governance |
| Why Important | Allows native tokens to be used in EVM contracts as ERC20 |
- Native Token Pair
- Registration Permissions
- Complete Configuration
Configure the native token’s ERC20 representation:Fields:
Copy
Ask AI
# Set native precompile address
jq '.app_state.erc20.native_precompiles = ["0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"]' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# Set token pair
jq '.app_state.erc20.token_pairs = [{
"erc20_address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"denom": "atoken",
"enabled": true,
"contract_owner": 1
}]' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
erc20_address: Special address0xEeeee...EEeEfor native tokendenom: Your base denomination (must match bank metadata)enabled: Whether the pair is activecontract_owner:1= module-owned (standard for native token)
Control who can register new token pairs:When to use each:
Copy
Ask AI
# Permissionless (anyone can register)
jq '.app_state.erc20.params.permissionless_registration = true' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# Permissioned (governance only)
jq '.app_state.erc20.params.permissionless_registration = false' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
true: Public chains, DeFi-focused ecosystemsfalse: Enterprise chains, controlled environments
Copy
Ask AI
{
"app_state": {
"erc20": {
"native_precompiles": [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
],
"token_pairs": [
{
"erc20_address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"denom": "atoken",
"enabled": true,
"contract_owner": 1
}
],
"params": {
"permissionless_registration": true
}
}
}
}
0xEeeee...EEeE.Fee Market (EIP-1559)
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Dynamic fee pricing mechanism based on EIP-1559, controlling how transaction fees adjust based on network congestion |
| Genesis Path | app_state.feemarket.params |
| Type | Object containing fee market parameters |
| Default | EIP-1559 enabled with 1 gwei base fee |
| Adjustable | Governance |
| Source | x/feemarket/types/params.go:13-21 |
- Standard EIP-1559 (Recommended)
- Fixed Gas Pricing
- Parameter Details
Copy
Ask AI
jq '.app_state.feemarket.params = {
"no_base_fee": false,
"base_fee": "1000000000",
"base_fee_change_denominator": 8,
"elasticity_multiplier": 2,
"min_gas_price": "0",
"min_gas_multiplier": "0.5",
"enable_height": 0
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
no_base_fee:false= EIP-1559 enabledbase_fee:"1000000000"= 1 gwei initial base feebase_fee_change_denominator:8= ±12.5% max change per blockelasticity_multiplier:2= target is 50% of max gasmin_gas_price:"0"= no minimum floormin_gas_multiplier:"0.5"= 50% of base fee minimumenable_height:0= enabled from genesis
Copy
Ask AI
jq '.app_state.feemarket.params = {
"no_base_fee": true,
"min_gas_price": "1000000000"
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
no_base_fee:true= Disable EIP-1559min_gas_price: Fixed minimum gas price in wei
1.
base_fee (string, wei)- Initial base fee per gas
"1000000000"= 1 gwei (Ethereum standard)"100000000"= 0.1 gwei (lower fee chains)"10000000000"= 10 gwei (higher fee chains)
base_fee_change_denominator (uint32)- Controls adjustment speed
8= ±12.5% max change per block (Ethereum standard)50= ±2% max change (slower adjustment)- Lower = faster price adjustment
elasticity_multiplier (uint32)- Determines gas target
2= target is 50% of max gas (standard)- Block above target → base fee increases
- Block below target → base fee decreases
min_gas_price (string, wei)- Network-wide minimum floor
"0"= no floor (standard)"500000000"= 0.5 gwei minimum
min_gas_multiplier (string, decimal)- Fraction of base fee for minimum
"0.5"= 50% of base fee (standard)- Must be between 0 and 1
enable_height (int64)- Block height to activate EIP-1559
0= enabled from genesis> 0= activate at specific height
EVM Access Control
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Permissions for deploying and calling smart contracts |
| Genesis Path | app_state.evm.params.access_control |
| Type | Object with create and call access controls |
| Default | Permissionless (type 0 - anyone can deploy and call contracts) |
| Adjustable | Governance |
| Source | x/vm/types/params.go:160-165 |
- Permissionless (Recommended)
- Permissioned Deployment
- Restricted (Blocklist)
- Access Types
Copy
Ask AI
jq '.app_state.evm.params.access_control = {
"create": {
"access_type": 0,
"access_control_list": []
},
"call": {
"access_type": 0,
"access_control_list": []
}
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
0 = PERMISSIONLESSUse case: Public chains, testnets, open ecosystemsCopy
Ask AI
jq '.app_state.evm.params.access_control = {
"create": {
"access_type": 2,
"access_control_list": [
"0x1234567890123456789012345678901234567890",
"0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
]
},
"call": {
"access_type": 0,
"access_control_list": []
}
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
2 = PERMISSIONED (allowlist)Use case: Enterprise chains, controlled deploymentCopy
Ask AI
jq '.app_state.evm.params.access_control.create = {
"access_type": 1,
"access_control_list": [
"0xbadaddr1234567890123456789012345678901234"
]
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
1 = RESTRICTED (blocklist)Use case: Block known malicious addresses while keeping chain open| Type | Value | Behavior | List Usage |
|---|---|---|---|
| Permissionless | 0 | Anyone can perform action | Ignored |
| Restricted | 1 | Block addresses in list | Blocklist |
| Permissioned | 2 | Only addresses in list | Allowlist |
create: Who can deploy contractscall: Who can call contracts
Staking Parameters
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Staking module behavior, including bond denom, unbonding time, and validator set size |
| Genesis Path | app_state.staking.params |
| Type | Object containing staking configuration parameters |
| Adjustable | Governance |
- Quick Configuration
- Parameter Details
- Complete Configuration
Copy
Ask AI
# Set bond denomination
jq '.app_state.staking.params.bond_denom = "atoken"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# Set unbonding time (21 days is Cosmos standard)
jq '.app_state.staking.params.unbonding_time = "1814400s"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# Set max validators
jq '.app_state.staking.params.max_validators = 100' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
1.
bond_denom (string)- Must match your base denomination from bank metadata
- Example:
"atoken"
unbonding_time (duration string)- How long tokens remain locked after unstaking
- During this period, tokens can still be slashed
- Format: Go duration (e.g.,
"1814400s"= 21 days)
"120s"= 2 minutes (testing)"86400s"= 1 day"604800s"= 7 days"1814400s"= 21 days (Cosmos standard)"2419200s"= 28 days
max_validators (uint32)- Maximum validators in active set
- Only top N by voting power participate in consensus
- Common values: 50, 100, 125, 150, 175
- Higher = more decentralized but potentially slower
max_entries (uint32)- Max concurrent unbonding/redelegation operations per pair
- Default:
7 - Prevents spam on unbonding queue
historical_entries (uint32)- Number of historical validator sets to keep
- Used for IBC light client verification
- Default:
10000 - Higher = more storage, better IBC compatibility
min_commission_rate (decimal string)- Minimum commission validators must charge
- Default:
"0.000000000000000000"(0%) - Example:
"0.050000000000000000"= 5% minimum
Copy
Ask AI
{
"app_state": {
"staking": {
"params": {
"bond_denom": "atoken",
"unbonding_time": "1814400s",
"max_validators": 100,
"max_entries": 7,
"historical_entries": 10000,
"min_commission_rate": "0.000000000000000000"
}
}
}
}
Slashing Parameters
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Thresholds and penalties for validator downtime or misbehavior |
| Genesis Path | app_state.slashing.params |
| Type | Object containing slashing configuration parameters |
| Adjustable | Governance |
- Standard Configuration
- Parameter Details
- How Slashing Works
Copy
Ask AI
jq '.app_state.slashing.params = {
"signed_blocks_window": "10000",
"min_signed_per_window": "0.500000000000000000",
"downtime_jail_duration": "600s",
"slash_fraction_double_sign": "0.050000000000000000",
"slash_fraction_downtime": "0.010000000000000000"
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
- Signed blocks window: 10,000 blocks (~22 hours at 8s blocks)
- Min signed: 50% of blocks in window
- Downtime jail: 10 minutes
- Double-sign slash: 5% of stake
- Downtime slash: 1% of stake
1.
signed_blocks_window (int64)- Number of blocks to track validator liveness
- Validator must sign
min_signed_per_windowwithin this window
100= ~13 minutes at 8s blocks10000= ~22 hours (Cosmos standard)20000= ~44 hours
min_signed_per_window (decimal string)- Minimum fraction of blocks validator must sign
"0.500000000000000000"= 50% (standard)- Example: With window=10000, must sign ≥5000 blocks
downtime_jail_duration (duration string)- How long validator is jailed for downtime
- Jailed validators earn no rewards, must manually unjail
"60s"= 1 minute"600s"= 10 minutes (Cosmos standard)"3600s"= 1 hour"86400s"= 1 day
slash_fraction_double_sign (decimal string)- Percentage of stake slashed for double-signing
- Validator is also permanently tombstoned (cannot rejoin)
"0.050000000000000000"= 5% (Cosmos standard)"0.100000000000000000"= 10%"0.200000000000000000"= 20%
slash_fraction_downtime (decimal string)- Percentage slashed for downtime (less severe)
"0.000100000000000000"= 0.01%"0.010000000000000000"= 1% (Cosmos standard)"0.050000000000000000"= 5%
Downtime Detection:
- Chain tracks last
signed_blocks_windowblocks - If validator signs <
min_signed_per_windowfraction → jailed - Validator loses
slash_fraction_downtimeof stake - Must wait
downtime_jail_durationthen manually unjail
- Validator signs two blocks at same height → slashed
- Loses
slash_fraction_double_signof stake - Permanently tombstoned - cannot ever rejoin
- Tokens remain slashable during entire
unbonding_time - Validators accountable for misbehavior that occurred while bonded
- Historical slashing enforced even after unbonding starts
Governance Parameters
Show Full Instructions
Show Full Instructions
| Attribute | Value |
|---|---|
| Description | Settings for on-chain governance including voting periods, quorum, and deposit requirements |
| Genesis Path | app_state.gov.params |
| Type | Object containing governance configuration parameters |
| Adjustable | Governance |
- Standard Configuration
- Parameter Details
- Setting Min Deposit
Copy
Ask AI
jq '.app_state.gov.params = {
"min_deposit": [{
"denom": "atoken",
"amount": "10000000000000000000"
}],
"max_deposit_period": "172800s",
"voting_period": "172800s",
"expedited_voting_period": "86400s",
"quorum": "0.334",
"threshold": "0.5",
"veto_threshold": "0.334",
"min_initial_deposit_ratio": "0.0",
"expedited_threshold": "0.667",
"expedited_min_deposit": [{
"denom": "atoken",
"amount": "50000000000000000000"
}]
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
1.
min_deposit- Minimum tokens required to submit proposal
- Example:
10 tokens=10000000000000000000 atoken(18 decimals)
max_deposit_period (duration)- Time to reach minimum deposit
"172800s"= 2 days (Cosmos standard)
voting_period (duration)- Length of voting period
- Common values:
"172800s"= 2 days (Cosmos standard)"604800s"= 7 days
expedited_voting_period (duration)- Shorter period for expedited proposals
- Must be <
voting_period "86400s"= 1 day (standard)
quorum (decimal)- Minimum participation required
"0.334"= 33.4% (standard)
threshold (decimal)- Minimum yes votes to pass
"0.5"= 50% (standard)
veto_threshold (decimal)- NoWithVeto threshold to reject
"0.334"= 33.4% (standard)
expedited_threshold (decimal)- Higher threshold for expedited proposals
"0.667"= 66.7% (standard)
Set minimum deposit denom:Set voting periods:Important:
Copy
Ask AI
jq '.app_state.gov.params.min_deposit[0].denom = "atoken"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
Copy
Ask AI
# Standard voting period
jq '.app_state.gov.params.voting_period = "172800s"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
# Expedited period (must be < voting_period)
jq '.app_state.gov.params.expedited_voting_period = "86400s"' \
~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
expedited_voting_period must be strictly less than voting_period.Mint Parameters
Show Full Instructions
Show Full Instructions
| Parameter | Details |
|---|---|
| Description | Token inflation and minting schedule |
| Genesis Location | app_state.mint.params |
- Configuration
- Parameters
Copy
Ask AI
jq '.app_state.mint.params = {
"mint_denom": "atoken",
"inflation_rate_change": "0.130000000000000000",
"inflation_max": "0.200000000000000000",
"inflation_min": "0.070000000000000000",
"goal_bonded": "0.670000000000000000",
"blocks_per_year": "6311520"
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
1.
mint_denom (string)- Must match your base denomination
- Example:
"atoken"
inflation_max (decimal)- Maximum annual inflation rate
"0.200000000000000000"= 20% (Cosmos standard)
inflation_min (decimal)- Minimum annual inflation rate
"0.070000000000000000"= 7% (Cosmos standard)
goal_bonded (decimal)- Target bonded token ratio
"0.670000000000000000"= 67% (Cosmos standard)
blocks_per_year (string)- Expected blocks per year
"6311520"= ~5 second blocks (Cosmos standard)- Adjust based on your block time
- If bonded ratio < goal → inflation increases (toward max)
- If bonded ratio > goal → inflation decreases (toward min)
- Incentivizes target staking ratio
Distribution Parameters
Show Full Instructions
Show Full Instructions
| Parameter | Details |
|---|---|
| Description | Token / reward distribution including community tax and proposer rewards |
| Genesis Location | app_state.distribution.params |
- Configuration
- Parameters
Copy
Ask AI
jq '.app_state.distribution.params = {
"community_tax": "0.020000000000000000",
"base_proposer_reward": "0.000000000000000000",
"bonus_proposer_reward": "0.000000000000000000",
"withdraw_addr_enabled": true
}' ~/.yourchain/config/genesis.json > tmp && mv tmp ~/.yourchain/config/genesis.json
base_proposer_reward and bonus_proposer_reward) are deprecated in recent Cosmos SDK versions and should be set to "0.000000000000000000".1.
community_tax (decimal)- Percentage of rewards going to community pool
"0.020000000000000000"= 2% (standard)
base_proposer_reward (decimal)- Deprecated - set to
"0.000000000000000000"
bonus_proposer_reward (decimal)- Deprecated - set to
"0.000000000000000000"
withdraw_addr_enabled (bool)- Allow setting custom withdraw addresses
true(recommended)
Initial Accounts and Validators
Show Full Instructions
Show Full Instructions
| Overview | Details |
|---|---|
| When | After configuring all genesis parameters |
| Purpose | Add initial accounts and collect validator gentxs |
- Add Genesis Accounts
- Collect Validator Gentxs
- Validate Genesis
Add accounts with initial balances:Verify accounts:
Copy
Ask AI
# Add account by address
yourchain genesis add-genesis-account \
cosmos1abc123... \
1000000000000000000000atoken
# Add account by key name from keyring
yourchain genesis add-genesis-account \
validator1 \
1000000000000000000000atoken \
--keyring-backend test
# Add multiple accounts
yourchain genesis add-genesis-account validator1 1000000000000000000000atoken
yourchain genesis add-genesis-account validator2 1000000000000000000000atoken
yourchain genesis add-genesis-account faucet 10000000000000000000000atoken
Copy
Ask AI
jq '.app_state.bank.balances' ~/.yourchain/config/genesis.json
Workflow:1. Each validator creates their gentx:Output: Creates 3. Coordinator collects all gentxs:4. Verify:
Copy
Ask AI
yourchain genesis gentx validator1 \
1000000000000000000000atoken \
--chain-id mychain-1 \
--keyring-backend test \
--moniker "Validator 1" \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1
~/.yourchain/config/gentx/gentx-<node-id>.json2. Validator shares gentx file:Copy
Ask AI
cat ~/.yourchain/config/gentx/gentx-*.json
Copy
Ask AI
# Create gentx directory
mkdir -p ~/.yourchain/config/gentx/
# Copy all received gentx files to this directory
# (one file per validator)
# Collect into genesis
yourchain genesis collect-gentxs
Copy
Ask AI
yourchain genesis validate
jq '.app_state.genutil.gen_txs | length' ~/.yourchain/config/genesis.json
Final validation before distribution:What it checks:Should output Check validator count:
Copy
Ask AI
# Validate structure and parameters
yourchain genesis validate
- JSON structure is valid
- All module genesis states valid
- No denomination mismatches
- Token supply consistent
- Parameters within valid ranges
- Gentxs are valid
Copy
Ask AI
GENESIS=~/.yourchain/config/genesis.json
jq '[
.app_state.staking.params.bond_denom,
.app_state.mint.params.mint_denom,
.app_state.evm.params.evm_denom,
.app_state.gov.params.min_deposit[0].denom,
.app_state.bank.denom_metadata[0].base
] | unique | length' $GENESIS
1 (all denoms match)Check total supply:Copy
Ask AI
jq '.app_state.bank.balances | map(.coins[0].amount | tonumber) | add' $GENESIS
Copy
Ask AI
jq '.app_state.genutil.gen_txs | length' $GENESIS
Next Steps
Your genesis file is now complete! Next:- Distribute Genesis File to validators
- Configure Runtime Settings
- Launch Network
Quick Reference
See: Configuration Reference for:- Command cheatsheets
- Configuration examples
- Default values table