Developer Resources

ZetaChain is the first ever L1 blockchain to enable fully interoperable smart contracts, or universal smart contracts, that connect all blockchains and bring the power of programmability to non-smart contract chains like Bitcoin and Dogecoin. We provide an unparalleled combination of security, simplicity, and flexibility for developers.

Built for an unparalleled developer experience

Deploy Once, Access All Chains

Manage a single universal contract for all chains, instead of one contract for each supported chain. Experience the simplicity of building on Ethereum with access to assets on any chain, even non-smart contract chains like Bitcoin.

Fewer Transactions, Fewer Fees

Complex contract logic on ZetaChain can orchestrate assets across all connected external chains through simple transfers and single transactions, minimizing total gas expenditure and slippage for users.

Safer, Better User Experience

Transaction logic occurs atomically in our smart contracts, resulting in lower slippage, reduced attack surface, and less susceptibility to race conditions. Experience truly one-step transactions (and fees), even when operating across chains.

The best DevX = The best UX

Universal Smart Contracts and Messaging give you a complete toolkit to easily build intuitive, traceable, single-step transactions so your users don’t get stuck or risk their funds.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol";
import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol";

import "../shared/SwapHelperLib.sol";

contract ZetaSwap is zContract {
    SystemContract public immutable systemContract;

    constructor(address systemContractAddress) {
        systemContract = SystemContract(systemContractAddress);
    }

    modifier onlySystem() {
        require(msg.sender == address(systemContract), "Only system contract can call this function");
        _;
    }

    function onCrossChainCall(
        zContext calldata context,
        address zrc20,
        uint256 amount,
        bytes calldata message
    ) external virtual override onlySystem {
        (address targetZRC20, bytes32 receipient, uint256 minAmountOut) = abi.decode(
            message,
            (address, bytes32, uint256)
        );
        uint256 outputAmount = SwapHelperLib._doSwap(
            systemContract.wZetaContractAddress(),
            systemContract.uniswapv2FactoryAddress(),
            systemContract.uniswapv2Router02Address(),
            zrc20,
            amount,
            targetZRC20,
            minAmountOut
        );
        SwapHelperLib._doWithdrawal(targetZRC20, outputAmount, receipient);
    }
}

The easiest, most versatile cross-chain platform

To interact with the ZetaChain blockchain, implement 3 functions into your dApp to get intuitive, traceable, revertible behavior so your users don't get stuck or risk their funds.

Start using Connector API
/**
/* Sending value and data cross-chain */
function send(ZetaInterfaces.SendInput calldata input) external;

/* onZetaMessage is called when cross-chain message reaches contract */
function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external;

/* onZetaRevert is called when cross-chain message reverts */
function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external;

Universal Primitives

ZetaChain's universal primitives give developers the ability to deploy applications once and orchestrate assets on any connected chain from a single place of logic.

Universal toolkit

Universal Smart Contracts

Leverage the existing Ethereum smart contract ecosystem and build truly interoperable apps on ZetaChain as if everything were on a single chain.

Learn more

Cross-chain Messaging

Send arbitrary messages and move real value without the need for wrapping or locking assets, from any chain to any chain.

Learn more

Universal Accounts

ZetaChain’s novel TSS architecture lets users and contracts custody and manage assets from a single place, in a secure and decentralized manner.

Coming soon

Explorer

Fully explorable transactions: View and monitor ZetaChain internal transactions as well as transactions occurring from any chain to any chain.

Go to Explorer

How does ZetaChain compare?

As a blockchain and smart contract platform, ZetaChain provides a fully public, transparent, decentralized interoperability solution that supports both universal messaging and smart contracts. Developers on ZetaChain only need to implement their dApp logic, while ZetaChain handles the transaction of data and value across chains in a trust-minimized way.

Read whitepaper
ZetaChainCosmosPolkadotTHORChainBridges/MessagingGeneral Smart Contracts
Yes
Yes
Yes
No
No
Cross-chain Value Transfer
Yes
Yes
Yes
Yes
Yes
Cross-chain Message Passing
Yes
Yes
Yes
No
Yes
Chain-Agnostic
Yes
Only Cosmos/IBC Chains
No
Yes
Application-specific chain-pairs
Settlement
Immediate native settlement
Wrapped
Wrapped
Immediate native settlement
Wrapped, risk of redeem
Native Bitcoin Vault Management
Yes
No
No
Yes
Application-specific
Universal Smart Contracts
Yes
Only Cosmos/IBC Chains
Only Parachains
No
No

Risk Minimized

ZetaChain is a decentralized network built with TSS and PoS Tendermint Consensus with a minimal attack surface.

Unified Liquidity

No wrapped assets, centralized bridges, or increased interdependency risks. More freedom and cheaper transactions.

Infinite Compatibility

ZetaChain can support any existing or new blockchain, even non-smart contract chains like Bitcoin and Dogecoin.

Start Building

Kickstart your development with our growing examples library, with real contracts for real use cases.

Deploy an Universal dApp
Universal lending
Any-to-any payments
Universal NFTs
Cross-chain proof of ownership
Dogecoin smart contracts
Cross-chain DEX
Universal DAOs
Cross-chain stableswap
Universal lending
Any-to-any payments
Universal NFTs
Cross-chain proof of ownership
Dogecoin smart contracts
Cross-chain DEX
Universal DAOs
Cross-chain stableswap

Want to collaborate?

Share ideas and find collaborators to build universal dApps on ZetaChain in our Discord Development Zone. Our team is always ready to help out.

Latest

Check out the latest ZetaChain updates

Placeholder

10,000,000 ZETA: ZetaChain Validator Delegation Program

ZetaChain introduces 10,000,000 ZETA in validator delegations to grow the Universal Blockchain. Submit an application before November 28th to join the program!

Placeholder

150 Million Transactions Processed on the Universal Blockchain!

At ZetaChain, our mission is to build a Universal Blockchain with native access to any blockchain, making crypto as accessible, diverse, and connected as the internet. October marked a major milestone: ZetaChain crossed 150 million transactions just nine months after its mainnet launch. Let’s jump into the exciting highlights and new developments from last month!

Placeholder

Connecting ZetaChain to Base and Welcoming Coinbase to ZetaChain

We welcome Coinbase to ZetaChain, making ZetaChain mainnet one of the networks available on Coinbase. Users can now claim ZETA with Coinbase Earn and custody and stake ZETA with Coinbase Prime.

Placeholder

Goodbye Airdrops and Points, Hello Instant Rewards!

Mint your XP NFT, experience Instant Rewards, and claim ZETA now! ZetaChain’s Instant Rewards introduces a new model of continuous incentives, redefining how users earn in web3. Tune into today’s monthly update to learn more!

Placeholder

3.8M wallets now connected to the universal blockchain!

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond. September brought us many steps closer towards realizing this goal. From new network milestones and major global events like Token 2049 to unlocking native BTC in web3 — let’s dive into the highlights!

Placeholder

6,500,000 ZETA now available for XP Members: Mint your XP Status on the universal blockchain!

XP members can now claim their ZETA rewards! Check your eligibility, mint your XP Status NFT, and unlock instant rewards and perks on the first universal blockchain!

Placeholder

bitSmiley launches the first native BTC-backed stablecoin on ZetaChain, accessible on all chains

bitSmiley launches the first native BTC-backed stablecoin, bitUSD, on ZetaChain testnet, unlocking seamless cross-chain DeFi with native Bitcoin.


Have questions?
Check out FAQ or chat with an expert.