Skip to main content
Stable exposes protocol-level settlement logic through precompiled contracts at fixed addresses. The precompiles let EVM code call Stable SDK modules (staking, reward distribution, STABLE token operations) without re-implementing them. They’re significantly more gas efficient than equivalent Solidity implementations because they run at the protocol level. This guide shows how to call a precompile from both Solidity and ethers.js, and when to use one over a regular contract.
Concept: For what system modules do and why they’re precompiles, see System modules. For per-module method signatures and events, see the System modules reference.

What’s exposed

All of these are callable from any EVM contract or off-chain client. The addresses are stable and identical on mainnet and testnet.

When to call a precompile vs a regular contract

  • Use a precompile when the operation maps to a Stable SDK module: staking, reward distribution, STABLE token ops. Calling the precompile is both cheaper and the only way to trigger protocol-level behavior.
  • Use a regular contract when the operation is application logic: escrow, pricing, access control. Wrap the precompile call in your own contract if you need custom authorization or validation.
Precompiles are not a replacement for application contracts. They’re a stable interface into the underlying protocol.

Call from Solidity

Declare an interface for the methods you need, then call the precompile as if it were a deployed contract.
Compile and deploy with Foundry or Hardhat. The precompile address is burned into the contract at the constant slot, so there’s nothing to wire up post-deployment.

Call from ethers.js

For off-chain clients, declare the same interface as a minimal ABI and instantiate a contract pointed at the precompile address.

Subscribe to system transaction events

Some Stable SDK operations (unbonding completions, for example) don’t naturally emit EVM events. Stable closes this gap with system transactions: validator-generated transactions that call the StableSystem precompile to emit standard EVM events during the next block. To watch UnbondingCompleted, subscribe at the precompile address like any ERC-20 Transfer listener.
For the full system-transaction mechanism and the filter-by-user / historical-query patterns, see Track unbonding completions.

Per-module references

Each precompile’s full method list, events, and authorization rules live in its reference page.

Track unbonding completions

Subscribe to the UnbondingCompleted event emitted via the StableSystem precompile.

System modules reference

Jump to the per-module ABI, method signatures, and event schemas.

System modules concept

Understand why Stable exposes SDK modules through precompiles.
Last modified on June 8, 2026