p2.market
Getting Started

Blockchain Escrow

Learn about blockchain escrow used in p2.market.

What is Escrow

Escrow is a financial arrangement where a neutral third party holds payment while a transaction is completed. In traditional escrow, a company (like a bank or payment processor) holds the money. In blockchain escrow, a smart contract holds the money.

The p2.market Escrow Mechanism

Think of a smart contract as a digital vault with automatic rules:

Traditional Escrow (Centralized)

Buyer → PayPal/Bank → (They decide) → Seller
         ↑ Can freeze, delay, or reverse

Blockchain Escrow (Decentralized)

Buyer → Smart Contract → (Automatic rules) → Seller
         ↑ No one controls it, code executes automatically

When you make a purchase on p2.market:

  1. Funds Are Locked: Your USDC goes into a smart contract (not to p2.market, not to the seller)
  2. Smart Contract Holds It: The code has clear rules about when funds can be released
  3. Automatic Execution: When conditions are met (delivery confirmed and dispute window passed), the contract automatically pays the seller
  4. No Middleman Needed: No company can freeze, delay, or manipulate your funds

What Makes It Trustless?

  • Code is Public: Anyone can verify the smart contract rules on Etherscan
  • Transparent: You can see your funds on-chain at any time
  • Non-Custodial: p2.market never holds your money—the smart contract does
  • Speed: Smart contracts execute instantly when conditions are met
  • Security: Your funds are protected by Ethereum's security
  • Programmability: Escrows can generate yield, auto-refund, or execute complex rules
  • Finality: Once settled, no one can reverse the transaction

Escrow States

Every escrow on p2.market exists in one of these states:

StateWhat It MeansFunds Status
ActiveEscrow created, awaiting shipmentLocked in contract
ShippedSeller marked as shippedStill locked
DeliveredBuyer received itemAwaiting confirmation
DisputedIssue raisedLocked pending resolution
RefundedTransaction cancelledReturned to buyer
SettledTransaction completeSent to seller

Escrow Creation

Escrow creation is the process of locking funds into a smart contract to initiate a purchase. This signals to the seller that you're a serious buyer with verified funds.

Who Creates the Escrow?

The buyer always creates the escrow. This proves they have the funds and protects sellers from wasting time on non-serious buyers.

What Happens During Creation

When a buyer creates an escrow:

  1. Sign In: Buyer authenticates with their p2.market account (email, social login, or passkeys)
  2. Select Item: Buyer chooses an item to purchase (each has a unique Order ID)
  3. Confirm Purchase: Buyer reviews the total amount and confirms
  4. Escrow Activated: Funds are immediately secured in the blockchain escrow contract

Behind the scenes, p2.market uses account abstraction to create a smart contract wallet for you automatically. You don't need MetaMask, WalletConnect, or any crypto wallet—it works just like any regular checkout.

What Gets Locked?

Item Price: $1,000 USDC
Platform Fee: $20 USDC (2%)
─────────────────────────
Total Locked: $1,020 USDC

These funds cannot be accessed by anyone—not the seller, not p2.market, not even the buyer—until the smart contract's settlement or refund conditions are met.

Yield Generation

While your funds are locked in escrow, the smart contract:

  • Deploys them into ultra-safe yield-generating strategies (like Aave)
  • Earns interest on your locked USDC
  • The yield goes to the protocol treasury (helping keep fees at 2%)
  • Your principal remains protected and available for settlement

Learn more about yield generation

Escrow Settlement

Escrow settlement is the final step where funds are released from the smart contract to the seller after successful delivery.

When Does Settlement Happen?

Settlement occurs automatically when both conditions are met:

  1. Delivery Confirmed: The buyer confirms they received the item (or seller uploads proof of shipment)
  2. Dispute Window Passes: A safety period (typically 3-7 days) passes without the buyer opening a dispute

The Settlement Timeline

Day 0: Item Delivered

Day 1-7: Dispute Window (buyer can raise issues)

Day 7: Automatic Settlement

Seller Receives Payment

What Happens During Settlement

When settlement executes:

  • Smart Contract Releases Funds: The contract automatically sends USDC to the seller
  • Platform Fee Deducted: p2.market's 2% fee is sent to the protocol
  • Yield Distributed: Any earned interest goes to the protocol treasury
  • Order Marked Complete: The transaction is finalized on-chain

Example:

Escrow Total: $1,020 USDC
Seller Receives: $1,000 USDC
Platform Fee: $20 USDC
Yield Earned: $0.50 USDC (to treasury)

Settlement is Automatic and Final

  • No Manual Approval: Once conditions are met, settlement happens automatically
  • No Reversals: After settlement, funds cannot be clawed back (unlike PayPal/credit cards)
  • On-Chain Proof: Settlement is recorded permanently on the blockchain
  • Instant Payment: Sellers receive funds immediately when settlement executes

Escrow Refund

Escrow refund returns the buyer's funds from the smart contract when an order is cancelled or disputed.

When Can a Refund Happen?

Refunds are triggered in these scenarios:

1. Seller Never Ships

  • If the seller doesn't purchase a label within 3 days of order confirmation
  • If the item is not shipped within 2 days of label generation

2. Item Not Received

  • Buyer confirms they never received the item using a dispute
  • Tracking shows delivery failure

3. Item Not as Described

  • Item condition doesn't match listing
  • Wrong item delivered
  • Significant quality issues

4. Mutual Agreement

  • Both parties agree to cancel the transaction