Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.keystoneos.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Sepolia (Chain ID: 11155111) - Coordinator Chain

The coordinator chain hosts the state machine, compliance registry, and audit trail. It coordinates settlement execution across all chains via LayerZero.

Core Contracts

ContractAddressEtherscan
SettlementCoordinator0xcE6f3b4F1808d46A6dB16F3C13f4F12F7708d544View
KeystoneEscrow0x1B5FdfCfF9235cA6EcD7232841BdFE1f359A8f48View
ComplianceRegistry0x00E060D68D464b0b47D1c53E3A17A12F8eA97be7View

Test Tokens

TokenSymbolDecimalsAddressEtherscan
KeyStone Test BondKBOND180x75bc5a45994046C91197932581aF4a1Acd1Bf347View
Test USDCTUSDC60xE272c622A04D72F0F6a9ed09f0119ECa418C0336View

Base Sepolia (Chain ID: 84532) - Remote Escrow Chain

The remote escrow chain handles asset custody for settlements where tokens live on Base. Connected to the Sepolia coordinator via LayerZero.

Core Contracts

ContractAddressBaseScan
KeystoneEscrow0x353A903b9A7D4851aAe817e4dB5e912cdC6e8E5CView

Test Tokens

TokenSymbolDecimalsAddressBaseScan
KeyStone Test BondKBOND180xAc05a121607d10fcD5Da8863A2013DAfb921d88dView
Test USDCTUSDC60xd8a70E5789d6DE8e4B9A991974bF591bB9712324View

Cross-Chain Configuration

ParameterValue
Coordinator ChainSepolia (EID: 40161)
Remote ChainBase Sepolia (EID: 40245)
LayerZero Endpoint (both chains)0x6EDCE65403992e310A62460808c4b910D972f10f
Deployer / Authorized Creator0x7003bb68C5b97267dd2C3361690406A3065D8194
v0.2.0 contracts with AccessControl-based escrow (OPERATOR_ROLE + DEFAULT_ADMIN_ROLE), wallet-bound deposit keys, and hybrid fee model. Deployed from the keystone-smart-contracts repository, branch KEY-115-escrow-access-control.

Contract Descriptions

SettlementCoordinator

On-chain state machine enforcement with autonomous post-compliance execution. Validates state transitions against registered rules, enforces compliance and deposit gates, and calls executeSettlement with recipient addresses when all deposits are confirmed. Supports LayerZero OApp messaging for cross-chain coordination. Restricted settlement creation via creator allowlist. See SettlementCoordinator for full documentation.

KeystoneEscrow

Multi-leg atomic escrow for DvP settlement with per-leg fee deduction. Supports commitment-based deposits (deposit secrets verified against on-chain deposit keys), per-leg deposits, and atomic execution with recipient reveal at execution time. Handles ERC-20 and ERC-3643 token standards. See KeystoneEscrow for full documentation.

ComplianceRegistry

On-chain attestation of compliance screening results. Stores compliance status (Pass/Flagged/Fail) per party per settlement using hashed identifiers - no PII is stored on-chain. Serves as a gate that the SettlementCoordinator checks before allowing transitions past compliance. See ComplianceRegistry for full documentation.

Test Tokens

  • KBOND represents a tokenised government bond for repo collateral (18 decimals, mintable ERC-20)
  • TUSDC represents stablecoin payment, mimicking USDC (6 decimals, mintable ERC-20)
Both are mintable ERC-20 tokens deployed on both chains for testnet demonstrations. In production, settlements use real tokenized securities and stablecoins.

Integration

To interact with these contracts directly, you need:
  1. The contract ABI (available in the keystone-smart-contracts repository)
  2. An EVM-compatible wallet library (ethers.js, web3.py, viem, etc.)
  3. Sepolia ETH for gas (available from Sepolia faucets)
  4. Base Sepolia ETH for gas on Base (available from Base Sepolia faucet)
See KeystoneEscrow for details on how to interact with the escrow contract, including the commitment-based deposit flow.