Skip to main content

Smart Contracts Overview

The Ghost Protocol is implemented as a set of interrelated Solidity smart contracts. All contracts use Solidity 0.8.24 and are built with Foundry.

Architecture

Core contracts

ContractPurposeAddress
CommitRevealVaultOrchestrates all commit and reveal operations0x443434...6c70
CommitmentTreeStores commitments in a Merkle tree (depth 20)0xB7E37E...4D87
NullifierRegistryTracks spent nullifiers to prevent double-reveals0x0987cc...1C58b
NativeAssetHandlerBridges between EVM contracts and the Ghostmint precompile0x35cdaE...d502b7
AssetGuardWhitelist of authorized tokens for commit/reveal0xa1E7d5...A8A1

Token contracts

ContractPurposeAddress
GhostERC20Privacy-enabled ERC20 with vault-controlled mint/burnVarious
GhostERC20FactoryDeploys and registers new GhostERC20 tokens0x925B54...88C8E

Verification

ContractPurposeAddress
Groth16ProofVerifierVerifies Groth16 ZK proofs on-chain0x2C8Fb6...E5bd2

Policy contracts

ContractPurposeAddress
PolicyRegistryMaps commitments to their reveal policies0x54F039...396aB
TimelockExpiryTime-locked reveals0xae2307...39d6
DestinationRestrictionRestrict reveals to specific addresses0x899E9f...9A3ee00
ThresholdWitnessMulti-party approval for reveals0xa89638...fEBD7

See Deployed Addresses for the full address table.