ResourceLock vs Permit2Escrow#
Two production lock primitives, two settlement sequences. Both preserve atomicity and DvP; they differ in who commits first, what solver operations unlock, and how taker risk evolves during the settlement window.
Source material: Smart Contracts and Settlement Flows.
Lock primitive comparison
| Feature | ResourceLock | Permit2Escrow |
|---|---|---|
Commitment Sequence3 features | ||
Who commits first | Solver fills on destination | Taker deposits on origin |
Primary taker risk | Minimal - funds release only on valid fill proof | Funds escrowed during the fill window |
Primary solver risk | Fills before seeing input lock | Fills after seeing deposit |
Approval UX3 features | ||
Taker signature flow | Single EIP-712 StandardOrder + allocator co-sign | Permit2 signature (gasless) |
Works with arbitrary ERC-20 | ||
USDC-specific optimization | Via standard path | EIP3009Escrow variant available |
Atomicity & Failure3 features | ||
DvP atomicity | ||
Refund path on solver default | Automatic - lock never engaged | Time-based - after fillDeadline |
Cross-chain proof requirement | Oracle attestation of fill | Oracle attestation of fill |
When to Choose3 features | ||
Recommended for large notionals | ||
Recommended for familiar UX | ||
Fastest effective settlement | ||