Deploying Smart Contracts to Fantom
Fantom is an EVM-compatible L1 based on aBFT consensus (Lachesis). After transition to Sonic (Fantom S5 upgrade, 2024), finalization speed is ~1 second, throughput up to 10,000 TPS. The ecosystem includes Sonic chain (new main network, chainId 146) and classic Fantom Opera (chainId 250), which coexist with bridge between them.
Fantom Opera vs. Sonic
Fantom Opera (FTM, chainId 250): original network, running since 2019. Most existing DeFi protocols (SpookySwap, Beefy) are here. Native token FTM.
Sonic (S, chainId 146): new high-performance network, launched in 2024. Native token S. New deployments are recommended here. EVM-compatible, same tools.
Configuration and Deployment
// hardhat.config.ts
networks: {
fantom: {
url: 'https://rpc.ankr.com/fantom',
accounts: [process.env.PRIVATE_KEY!],
chainId: 250,
},
sonic: {
url: 'https://rpc.soniclabs.com',
accounts: [process.env.PRIVATE_KEY!],
chainId: 146,
},
sonicTestnet: {
url: 'https://rpc.blaze.soniclabs.com',
accounts: [process.env.PRIVATE_KEY!],
chainId: 57054,
},
}
# Foundry deployment on Sonic
forge create --rpc-url https://rpc.soniclabs.com \
--private-key $PRIVATE_KEY \
--verify \
--verifier-url 'https://api.sonicscan.org/api' \
--etherscan-api-key $SONICSCAN_API_KEY \
src/MyContract.sol:MyContract
Verification: SonicScan (soniccan.org) for Sonic, FTMScan for Opera. API keys obtained on respective explorers.
Features and Compatibility
Fantom/Sonic are fully compatible with EVM bytecode. Contracts from Ethereum deploy without changes. Differences:
Gas: significantly cheaper than Ethereum. Base fee in FTM/S tokens. No EIP-1559 in classic Opera, but Sonic supports EIP-1559.
Block time: Opera ~1 second finalization (aBFT). Sonic even faster. block.timestamp updates frequently. TWAP oracles and time-delay mechanisms work correctly, but should verify time-window-based logic.
RPC endpoints: public RPC unstable under load — for production use Ankr, Blast, or Nirvana (private nodes). Alternative: own node.
Chainlink: Chainlink oracles available on Opera. On Sonic — verify current support status, ecosystem is young.
Timeline Estimates
Deploying ready EVM contract + verification: several hours. With multisig setup (Safe available on Sonic), proxy pattern, deployment scripts and oracle compatibility check: 1-2 days.







