The Smart Contract Chain: ESC
What It Is
ESC (Elastos Smart Chain) is the EVM-compatible execution layer for Elastos. It is a geth fork with Elastos-specific consensus, cross-chain hooks, and native precompiled contracts. Chain ID is 20 on mainnet.
If you have used Ethereum, Polygon, or similar networks, you can reuse Solidity, Hardhat, Remix, ethers.js, web3.js, and MetaMask. Only RPC endpoints, chain ID, and the Elastos-specific precompiles differ.
Consensus
ESC does not use Ethereum-style open validator sets. Instead, PBFT consensus runs over the BPoS validator set elected through bonded staking on the main chain:
- Instant finality — once a block is committed, reorgs do not occur. One confirmation is effectively final.
- No uncle blocks — a single canonical block per height.
- Throughput trades off against PBFT messaging among the validator group.
Custom Precompiles (1000–1009)
ESC extends the EVM with ten native precompiles implemented in the node (not deployed Solidity). They expose Elastos consensus, staking, and cryptography to smart contracts:
| Address | Name | Purpose |
|---|---|---|
| 1000 | arbiters | Query the current BPoS validator / arbiter set |
| 1001 | p256Verify | Verify NIST P-256 (secp256r1) signatures |
| 1002 | pbkVerifySignature | Verify secp256k1 signatures by public key recovery |
| 1003 | pledgeBillVerify | Verify staking pledge bill signatures |
| 1004 | pledgeBillTokenID | Map a main-chain tx hash to staking NFT token IDs |
| 1005 | pledgeBillTokenDetail | Read BPoS NFT payload details |
| 1006 | pledgeBillPayloadVersion | NFT payload format version |
| 1007 | getMainChainBlockByHeight | Get main chain block header by height |
| 1008 | getMainChainLatestHeight | Get latest main chain block height from SPV |
| 1009 | p256VerifyDigest | P-256 signature verification against a pre-hashed digest |
Source: params/protocol_params.go and core/vm/contracts.go. For Solidity call examples, see the precompile reference.
Notable Deployed Contracts
- StakeTicket — BPoS staking NFT representation on ESC. Contracts call
pledgeBillVerifyand related precompiles to verify claims against arbiter-signed pledge data. - ELink — Cross-chain oracle bridge bringing sidechain/DID context to ESC contracts, using P-256 verification paths.
Cross-Chain ELA
Depositing ELA from the main chain to ESC mints sidechain ELA at a 1:1 ratio. Withdrawals burn ESC ELA and release main-chain ELA. Asset supply on ESC is tied to main-chain locks and SPV-validated flows. See Bridge System for details.
Network Endpoints
| Value | |
|---|---|
| P2P port | 20638 |
| JSON-RPC / WebSocket | 20636 |
| Mainnet RPC | https://api.elastos.io/esc |
| Testnet RPC | https://api-testnet.elastos.io/esc |
| Block explorer | esc.elastos.io |
| Testnet faucet | esc-faucet.elastos.io |
For the full list of providers and WebSocket URLs, see Network Endpoints.
Compared to Ethereum
| Aspect | Ethereum L1 | ESC |
|---|---|---|
| Finality | Probabilistic (many confirmations) | Immediate after inclusion |
| Block producers | Open validator set | Rotating BPoS validators (PBFT quorum) |
| Bridge to Elastos | External bridges | Built-in deposit/withdraw with main chain |
| Extra primitives | Standard nine precompiles | Ten Elastos precompiles at 1000–1009 |
Who Uses ESC
- dApp and DeFi builders needing EVM compatibility with fast finality
- NFT and gaming projects using ERC-721 / ERC-1155 patterns
- Integrators bridging main-chain stake (StakeTicket) and identity/oracle data (ELink)
For a hands-on path, see the deploy-a-contract tutorials.