Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Contracts on Stable

Stable is fully EVM-compatible. Solidity, Vyper, Hardhat, Foundry, ethers.js, and viem work unchanged. Existing contracts deploy as-is once you point tooling at Stable's RPC. On top of the standard EVM, Stable exposes protocol-level modules (Bank, Distribution, Staking) as precompiled contracts at fixed addresses, so your Solidity can call into staking and reward distribution without re-implementing them.

What you can build

  • Standard application contracts (ERC-20, ERC-721, escrows, AMMs) with any EVM toolchain.
  • Verified, indexed contracts on Stablescan with live event streams through ethers.js.
  • Protocol-integrated contracts that call Bank / Distribution / Staking precompiles from Solidity.
  • System-transaction listeners that watch for protocol-emitted events (for example, unbonding completions) through standard eth_getLogs.

How Stable differs

  • USDT0 is the gas token. maxPriorityFeePerGas must be 0. The value field in native transfers carries USDT0, not ETH. See Work with USDT0 as gas.
  • USDT0 has a dual role. Contracts that hold native USDT0 can have their balance changed by ERC-20 transferFrom or permit — never mirror native balance in a uint256. See USDT0 behavior on Stable.
  • Precompile addresses are fixed across testnet and mainnet. Burn them into your contract as constants.

Start here

  • Deploy — Scaffold Foundry, configure Stable, and deploy Counter.
  • Verify — Upload source to Stablescan with forge verify-contract.
  • Index — Subscribe to events with ethers.js and backfill historical logs.

Next recommended