V2 contracts now correctly handle tokens with non-18 decimal places (USDC = 6 decimals, USDT = 6 decimals). The General Escrow dispute policy document was finalized and uploaded to IPFS (March 2026).
Core Data Structures
Transaction Struct
Status Enumeration
Party & Resolution Enumerations
Creating Transactions
Native ETH Transaction
ERC20 Token Transaction
Managing Transactions
Payment Functions
Key Behaviors:
pay()andreimburse()can be called multiple times with partial amounts- When the entire amount is paid/reimbursed, status changes to
TransactionResolved executeTransaction()transfers all remaining funds to the seller after deadline- All three functions require status to be
NoDisputeor will revert withTransactionDisputed()
Settlement System
Settlement Functions
Settlement Flow
1
Initiate Proposal
Either party proposes a settlement amount using
proposeSettlement().2
Status Change
Status changes to
WaitingSettlementBuyer or WaitingSettlementSeller.3
Response
The other party can either accept the settlement or propose a counter-offer.
4
Counter-Offers
Counter-offers reset
lastFeePaymentTime and switch the waiting status.5
Dispute Option
Only the non-proposing party can raise a dispute (after
settlementTimeout elapses).Settlement Acceptance: Upon acceptance, funds are immediately distributed. Seller receives the proposed settlement amount, buyer receives the remainder. For ERC20 tokens, SafeERC20 library ensures both transfers succeed atomically.
Dispute Management
Arbitration Fee Functions
Dispute Creation Process
Fee Calculation
Query Functions
Transaction Queries
Payout Calculation
Other Queries
Governor Functions
All governor functions are restricted to the current governor address.