Smart Contracts (V3)
New intents run through EscrowV2, OrchestratorV4 and UnifiedPaymentVerifierV4. Addresses are on Deployments. Sources are in the public zkp2p-contracts repository.
| Contract | Role | Reference |
|---|---|---|
EscrowV2 | Holds deposits, payment methods, currencies, rates and fund locks | Escrow |
OrchestratorV4 | Intent lifecycle, fee distribution, signal and settlement policies | Orchestrator |
IntentSignalPolicy, WhitelistPolicyV2, AddressGroupRegistryV4 | Admit takers through deposit whitelists and groups, check the gating signature | Orchestrator |
DisputeProtectionPolicyV2, StakeVaultV2 | Lock taker stake or hold the payout during the dispute window | Stake to Take |
UnifiedPaymentVerifierV4, MultiAttestationVerifier | Verify payment attestations against the intent and the witness set | Unified Payment Verifier |
OrchestratorRegistry | Allowlist of orchestrators that can lock and release EscrowV2 funds | Below |
RateManagerV1 | Delegated rate management with manager fees | Below |
ChainlinkOracleAdapter | Reads Chainlink-compatible feeds for oracle-based rates | Below |
OrchestratorV3 | Retired 2026-11-05; historical pre- and post-intent hook reference | Pre-Intent Hooks, Post-Intent Hooks |
OrchestratorRegistry
addOrchestrator(address)andremoveOrchestrator(address)are owner-only.isOrchestrator(address)returns whether an orchestrator is authorized.OrchestratorV4is current.OrchestratorV3was retired on 2026-11-05; removing it rejects new signal and fulfillment calls without deleting historical data.
RateManagerV1
- A manager creates a config with
createRateManager(config)and sets rates per payment method and currency withsetRateorsetRateBatch. EscrowV2readsgetRate(rateManagerId, escrow, depositId, paymentMethod, currencyCode)andgetFee(rateManagerId).- A manager rate of zero disables the pair; a reverting manager falls back to the deposit's own floor. See Delegated Rate Management.
- The manager fee is capped at 5% and fixed for each intent when it is signaled.
ChainlinkOracleAdapter
validateConfig(rawConfig)validates and normalizes the feed configuration stored on the deposit.getRate(normalizedConfig)returns(valid, rate, updatedAt), with the rate in 1e18 precision. Adapters never write state.EscrowV2applies the deposit's spread:oracleRate = marketRate * (10_000 + spreadBps) / 10_000. See Oracle Rate Configuration.
Conventions
- Payment methods, currency codes, payee IDs and payment IDs are
keccak256-hashed tobytes32on-chain. conversionRateuses 1e18 precision. USDC amounts use 6 decimals.- Fiat amounts in attestations are in the currency's minor unit (for example, cents). Payment timestamps are in milliseconds.