Skip to main content

Smart Contracts (V3)

New intents run through EscrowV2, OrchestratorV4 and UnifiedPaymentVerifierV4. Addresses are on Deployments. Sources are in the public zkp2p-contracts repository.

ContractRoleReference
EscrowV2Holds deposits, payment methods, currencies, rates and fund locksEscrow
OrchestratorV4Intent lifecycle, fee distribution, signal and settlement policiesOrchestrator
IntentSignalPolicy, WhitelistPolicyV2, AddressGroupRegistryV4Admit takers through deposit whitelists and groups, check the gating signatureOrchestrator
DisputeProtectionPolicyV2, StakeVaultV2Lock taker stake or hold the payout during the dispute windowStake to Take
UnifiedPaymentVerifierV4, MultiAttestationVerifierVerify payment attestations against the intent and the witness setUnified Payment Verifier
OrchestratorRegistryAllowlist of orchestrators that can lock and release EscrowV2 fundsBelow
RateManagerV1Delegated rate management with manager feesBelow
ChainlinkOracleAdapterReads Chainlink-compatible feeds for oracle-based ratesBelow
OrchestratorV3Retired 2026-11-05; historical pre- and post-intent hook referencePre-Intent Hooks, Post-Intent Hooks

OrchestratorRegistry​

  • addOrchestrator(address) and removeOrchestrator(address) are owner-only.
  • isOrchestrator(address) returns whether an orchestrator is authorized. OrchestratorV4 is current. OrchestratorV3 was 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 with setRate or setRateBatch.
  • EscrowV2 reads getRate(rateManagerId, escrow, depositId, paymentMethod, currencyCode) and getFee(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.
  • EscrowV2 applies 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 to bytes32 on-chain.
  • conversionRate uses 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.