Overview
ckETH brings Ethereum assets to the Internet Computer with the following benefits:- 1:1 Backed: Every ckETH token is backed by real ETH held in the minter’s custody
- Fast Finality: ckETH transfers finalize in 1-2 seconds
- Low Fees: Transaction fees are ~0.000002 ETH vs. variable Ethereum gas fees
- ERC-20 Support: Also supports ckERC20 tokens for popular ERC-20s
ckETH is available on both Ethereum Mainnet and Sepolia testnet. Use Sepolia for testing without risking real ETH.
Architecture
Minter Canister
The ckETH minter (rs/ethereum/cketh/minter) manages the bidirectional conversion between ETH and ckETH.
Key Responsibilities
Event Scraping
Continuously scrapes Ethereum logs for deposits
ETH → ckETH
Mints ckETH when ETH deposits are detected
ckETH → ETH
Burns ckETH and sends ETH to destination
Gas Management
Dynamically estimates and manages gas fees
Minter Configuration
Configuration Parameters
Configuration Parameters
- ethereum_network: Network (Mainnet or Sepolia)
- ecdsa_key_name: Threshold ECDSA key for signing transactions
- ethereum_contract_address: Address of the helper smart contract
- ledger_id: Principal of the ckETH ledger canister
- ethereum_block_height: Block tag to query (Latest/Safe/Finalized)
- minimum_withdrawal_amount: Minimum ETH for withdrawals (default: 30000000000000000 wei = 0.03 ETH)
- next_transaction_nonce: Nonce for the next outgoing transaction
- last_scraped_block_number: Starting block for log scraping
- evm_rpc_id: Optional EVM RPC canister principal (uses default if not set)
ETH to ckETH (Deposit)
Users deposit ETH via the helper smart contract to receive ckETH on the IC.Deposit Flow
Convert Principal to Bytes32
Convert your IC principal to a bytes32 format for the smart contract.Use the minter dashboard or the
principal-to-hex utility:Call Helper Contract
Call the Parameters:
depositEth function on the helper contract:Mainnet: 0x18901044688D3756C35Ed2b36D93e6a5B8e00E68Sepolia: 0x2D39863d30716aaf2B7fFFd85Dd03Dda2BFC2E38amount: Amount of ETH to deposit (in wei)principal: Your IC principal as bytes32subaccount: IC subaccount (use0xfor default)
Wait for Finalization
Wait ~20 minutes for:
- Ethereum transaction to finalize
- Minter to scrape the event log
- ckETH to be minted to your IC account
Helper Contract Events
The helper contract emits events that the minter scrapes:ckETH to ETH (Withdrawal)
Users burn ckETH to receive ETH at an Ethereum address.Withdrawal Flow
Approve Minter
First-time users must approve the minter to spend ckETH:This approves 1 ETH worth of withdrawals.
Request Withdrawal
Call
withdraw_eth with destination address and amount:Amounts are in wei (1 ETH = 1,000,000,000,000,000,000 wei). Use this converter to convert.
Withdrawal States
Transaction Finalization States
Transaction Finalization States
- Success: Transaction confirmed successfully
- Reimbursed: Transaction failed, ckETH refunded
- PendingReimbursement: Transaction failed, reimbursement in progress
Fee Structure
Deposit Fees
When converting ETH → ckETH:- Ethereum Gas Fee: Paid when calling helper contract (~0.002 ETH typical)
- Minting Fee: No additional fee for minting ckETH
Withdrawal Fees
When converting ckETH → ETH, users pay gas fees:Fee Calculation
Estimate withdrawal fees:- Gas Limit: 21,000 for ETH transfers
- Max Fee Per Gas: Based on current network conditions
- Priority Fee: Miner incentive to include transaction
Important: The withdrawal amount you receive is
withdrawal_amount - max_transaction_fee. The actual cost may be lower if gas prices drop, with the difference kept by the minter to cover operational costs.Fee Example
From the ckETH documentation, here’s a real withdrawal:Transfer Fees
ckETH transfers on the IC:- Transfer Fee: 0.000002 ckETH (2,000,000,000,000 wei)
- Approval Fee: 0.000002 ckETH (2,000,000,000,000 wei)
Gas Fee Management
The minter dynamically manages Ethereum gas fees.Fee Estimation
- Queries EVM RPC for current gas prices
- Estimates max fee and priority fee
- Updates internal fee estimates
- Processes pending withdrawals
EIP-1559 Pricing
ckETH uses EIP-1559 transaction pricing:- More predictable fees than legacy transactions
- Automatic adjustment to network conditions
- Priority fee incentivizes faster inclusion
Fee Caching
- Reduces RPC calls during withdrawal processing
- Provides stable estimates for users
- Updates every 6 minutes
Transaction Management
The minter manages Ethereum transaction lifecycle and nonces.Nonce Tracking
Each Ethereum account has a sequential nonce:- Increments nonce for each sent transaction
- Tracks pending transactions by nonce
- Detects and handles nonce gaps
- Supports manual nonce override via upgrades
Transaction Resubmission
If a transaction is stuck:ckERC20 Support
The ckETH minter also supports ERC-20 tokens through ckERC20 tokens.Ledger Suite Orchestrator
The orchestrator (rs/ethereum/ledger-suite-orchestrator) manages ckERC20 ledgers:
- Creates new ledger/archive/index canisters for each supported ERC-20
- Handles lifecycle management
- Coordinates with minter for deposits/withdrawals
Supported Tokens
Query supported tokens:ERC-20 Deposit Flow
Similar to ETH deposits but using the ERC-20 helper contract:- User calls ERC-20 helper contract with token approval
- Helper contract transfers tokens and emits event
- Minter scrapes ERC-20 event logs
- Minter mints ckERC20 to user’s IC account
ERC-20 Withdrawal Flow
- User burns ckERC20 tokens
- Minter creates ERC-20 transfer transaction
- Transaction signed via threshold ECDSA
- Token sent to destination address on Ethereum
Event Log Scraping
The minter continuously monitors Ethereum for deposit events.Scraping Configuration
- Query last scraped block number from state
- Fetch logs from last_scraped + 1 to current block
- Parse events from helper contracts
- Process deposits and mint ckETH/ckERC20
- Update last_scraped_block_number
Block Height Configuration
ethereum_block_height parameter:
- Latest: Fastest but may be reorganized
- Safe: Recommended balance of speed and safety
- Finalized: Safest but ~15 minutes delay
The minter typically uses “Safe” block tag to balance speed and security.
Threshold ECDSA Integration
The minter uses threshold ECDSA to control an Ethereum address.Address Derivation
- Requests public key from management canister
- Uses empty derivation path for main address
- Computes Ethereum address from ECDSA public key
- Address remains constant across upgrades
Transaction Signing
Signing flow:- Build unsigned EIP-1559 transaction
- RLP encode transaction
- Compute Keccak-256 hash
- Request threshold ECDSA signature
- Combine signature components (r, s, v)
- Create signed transaction
- Submit to Ethereum network via EVM RPC
Security Considerations
Principal Validation
- Verify IC principal format in helper contract events
- Reject malformed principals to prevent lost funds
- Validate subaccount length (32 bytes)
Amount Validation
- Enforce minimum withdrawal amounts
- Check for arithmetic overflow/underflow
- Validate wei amounts are positive
Address Validation
- Verify Ethereum address checksum
- Reject invalid address formats
- Support all standard Ethereum address types
Reimbursement Protection
Failed withdrawals are reimbursed:- Transaction creation fails
- Signing fails
- Broadcast fails
- Transaction reverts on Ethereum
Block Reorganization Handling
- Uses Safe or Finalized block tags
- Maintains list of processed transaction hashes
- Detects and handles chain reorganizations
- Never mints twice for same deposit
Monitoring and Observability
Minter Dashboard
Each minter deployment has a dashboard:- Mainnet: https://sv3dd-oaaaa-aaaar-qacoa-cai.raw.icp0.io/dashboard
- Sepolia: https://jzenf-aiaaa-aaaar-qaa7q-cai.raw.icp0.io/dashboard
- Current gas fee estimates
- Total ETH balance
- Pending withdrawals
- Recent transactions
- Minter configuration
Minter Info Query
Candid Interface
Core Methods
- Withdrawal
- Info
- Admin
Testing with Sepolia
Before using real ETH, test with Sepolia testnet:
Get Sepolia ETH
Use a Sepolia faucet:
Deposit via Sepolia Helper
Call helper contract at:
0x2D39863d30716aaf2B7fFFd85Dd03Dda2BFC2E38View on Sepolia EtherscanInteract with Minter
Sepolia minter:
jzenf-aiaaa-aaaar-qaa7q-caiSepolia ledger: apia6-jaaaa-aaaar-qabma-caiRelated Components
Ethereum Integration
Core Ethereum protocol integration
ICRC Ledger
ckETH implements the ICRC-1 token standard
Bitcoin Integration
Learn about Bitcoin integration on IC
ckBTC Minter
Chain-key Bitcoin implementation
Source Code Reference
Key files in the ckETH implementation:rs/ethereum/cketh/minter/src/lib.rs- Main minter constants and modulesrs/ethereum/cketh/minter/src/deposit.rs- Deposit event processingrs/ethereum/cketh/minter/src/withdraw.rs- Withdrawal transaction handlingrs/ethereum/cketh/minter/src/eth_logs/- Event log parsing logicrs/ethereum/cketh/minter/src/eth_rpc_client.rs- EVM RPC clientrs/ethereum/cketh/minter/src/state/- Minter state managementrs/ethereum/cketh/minter/cketh_minter.did- Candid interface definitionrs/ethereum/cketh/docs/cketh.adoc- User documentation