Overview
EscrowPeriod is a dual-purpose contract — it functions as both a recorder and a condition:- As a recorder: Records the
block.timestampwhen a payment is authorized - As a condition: Returns
trueonly after the escrow period has elapsed
AUTHORIZE_RECORDER and RELEASE_CONDITION slots on the operator.
Type: Per-deployment via EscrowPeriodFactory
Architecture
EscrowPeriod extends AuthorizationTimeRecorder and addsICondition implementation. You don’t need to deploy AuthorizationTimeRecorder separately — use EscrowPeriod directly.
Logic
- Payment was authorized (has a recorded timestamp)
- Current time >= authorization time + escrow period
Deployment
Deploy via EscrowPeriodFactory:Composition with Freeze
For freeze functionality, deploy a separate Freeze condition and compose via AndCondition:Use Cases
- Time-lock releases — 7-day escrow for e-commerce
- Delayed fund access — Grace period before receiver can access funds
- Buyer protection — Give payers time to freeze or request refunds
Gas
Cost: ~20k gas perrecord() call (one SSTORE for the timestamp). The check() call is a view function with one SLOAD.
Next Steps
Freeze
Add freeze protection to escrow periods.
Factories
Deploy EscrowPeriod via factory.
