Skip to main content

Trustless P2P Fiat-to-Crypto Trading

Smart contract infrastructure enabling secure peer-to-peer exchanges between fiat and cryptocurrency using zero-knowledge payment verification.

Quick Start

Get up and running with ZKP2P contracts in minutes

1

Install Dependencies

Clone the repository and install the required dependencies using Yarn.
git clone https://github.com/zkp2p/zkp2p-contracts.git
cd zkp2p-contracts
yarn install
2

Configure Environment

Copy the default environment file and configure your API keys for deployment and verification.
cp .env.default .env
Set the following variables in your .env file:
  • ALCHEMY_API_KEY - For RPC access
  • BASE_DEPLOY_PRIVATE_KEY - Private key for Base mainnet deployments
  • TESTNET_DEPLOY_PRIVATE_KEY - Private key for testnet deployments
  • BASESCAN_API_KEY - For contract verification
3

Build and Test

Compile the contracts and run the test suite to ensure everything is working correctly.
yarn build
yarn test
The test suite includes both Hardhat and Foundry tests for comprehensive coverage.
4

Deploy Locally

Start a local Hardhat node and deploy the contracts for development and testing.
# Terminal 1: Start local node
yarn chain

# Terminal 2: Deploy contracts
yarn deploy:localhost

Explore by Topic

Deep dive into the core concepts and components of ZKP2P

Core Concepts

Understand escrow deposits, intent lifecycle, and payment verification fundamentals

Smart Contracts

Explore the contract architecture including Escrow, Orchestrator, and verifiers

Integration Guides

Learn how to integrate ZKP2P into your application with step-by-step examples

Payment Methods

View supported payment platforms including Venmo, PayPal, Wise, and more

SDK Reference

Use the @zkp2p/contracts-v2 package for addresses, ABIs, and utilities

Deploy to Production

Deploy and verify contracts on Base mainnet and testnet environments

Key Features

What makes ZKP2P powerful for P2P trading

Trustless Trading

Zero-knowledge proofs enable secure fiat-to-crypto exchanges without intermediaries or trusted third parties

Multi-Platform Support

Support for 8+ payment platforms including Venmo, PayPal, Wise, Zelle, CashApp, Revolut, and more

Intent-Based Architecture

Efficient liquidity matching through intent signals with configurable rates, limits, and expiration periods

Modular & Extensible

Registry-based architecture with pluggable verifiers, hooks, and extensibility for new payment methods

Ready to Build?

Start integrating ZKP2P contracts into your application today. Follow our quickstart guide to deploy locally and run your first P2P trade.

View Quickstart Guide