Architecture Overview
VeriEscrowFactory
Deploys individual escrow instances using the minimal proxy pattern (EIP-1167), reducing deployment costs by ~90%. Maintains registry of all escrows.
VeriEscrow (Core)
Each escrow is an independent contract instance containing all business logic for deposits, releases, refunds, disputes, and arbitration.
Transaction Flow
Contract Constants
PROTOCOL_FEE_BPS80
Protocol fee (0.8%)
MIN_ESCROW_AMOUNT0.001 ETH
Minimum escrow
MAX_DEADLINE365 days
Maximum duration
DISPUTE_TIMEOUT7 days
Arbiter resolution time
AUTO_RELEASE_DELAY14 days
Auto-release after delivery
Escrow States
Created
State 0
Funded
State 1
Delivered
State 2
Completed
State 3
Disputed
State 4
Resolved
State 5
Refunded
State 6
Cancelled
State 7
Created → Funded → Delivered → Completed | Created → Cancelled | Funded → Disputed → Resolved | Funded → Refunded
Contract Functions
initialize()Initializes a new escrow instance with all parameters.
deposit()Deposits funds into the escrow contract.
confirmDelivery()Seller marks the escrow as delivered.
release()Releases funds to the seller. Deducts protocol fee.
openDispute()Initiates a dispute on a funded escrow.
voteDispute()Arbiter casts vote. Resolves when majority reached.
autoRelease()Auto-releases funds after deadline passes.
mutualCancel()Both parties must call to cancel and refund.
getEscrowDetails()Returns escrow information.
Events
EscrowCreated(escrowId, escrowAddress, buyer, seller, token, amount)
Funded(amount, timestamp)
DeliveryConfirmed(by, timestamp)
Released(to, amount)
DisputeOpened(by, reason)
DisputeResolved(winner, amount)
Refunded(to, amount)
Security Features
ReentrancyGuard
Prevents reentrancy attacks on all transfer functions
CEI Pattern
Checks-Effects-Interactions ordering strictly followed
SafeERC20
OpenZeppelin's safe token transfer library
Access Control
Role-based modifiers (onlyBuyer, onlySeller, onlyArbiter)
Pausable
Emergency circuit breaker with multi-sig requirement
Minimal Proxy
EIP-1167 clones for isolated escrow instances
Security Audits
Comprehensive security audit scheduled for Q2 2026. Bug bounty program active with rewards up to $50,000. For security disclosures: [email protected]
Security Guarantees Against Fraud
How VeriEscrow protects both parties from scams and fraud
Fund Protection
Once deposited, funds are locked in the smart contract. The payer cannot withdraw them unilaterally - they can only be released when conditions are met or through dispute resolution.
No Self-Escrow
The system prevents users from creating escrows where they are both payer and receiver, eliminating a common fraud vector.
No Duplicate Addresses
Multiple receivers with the same address are rejected, preventing share manipulation attacks.
Share Validation
Receiver shares must total exactly 100% (10,000 BPS). The contract rejects any transaction with invalid share totals.
Atomic Transactions
All operations are atomic on the blockchain - either they complete fully or they don't execute at all. No partial states.
Immutable Once Funded
Once an escrow is funded, the payer cannot cancel or modify it. Funds can only be released through the defined conditions or dispute resolution.
Neutral Arbitration
Disputes are resolved by independent arbiters (VeriEscrow, AI, Notary, or Custom) with configurable resolution options including split decisions.
Expired Funds Recovery
If the deadline passes without release, payers can claim back their funds, ensuring no permanent loss due to receiver inaction.
Real-time Safety Alerts
The frontend shows clear warnings like 'DO NOT deliver goods yet!' when escrow is not funded, protecting sellers from premature delivery.
Exact Token Approval
For ERC20 tokens, the system requests approval for the exact amount needed - never unlimited approvals that could be exploited.
Ready to Build?
Integrate VeriEscrow into your dApp for secure, non-custodial escrow functionality.