OKRW_EAS_PERIODIC_VOLUME_LIMIT_POLICY
Cumulative period-based OKRW transfer cap that only applies when the sender is not attested. The Travel-Rule-tier primitive.
Combines PERIODIC_VOLUME_POLICY's reset-period cumulative tracking with EAS attestation conditioning, giving un-attested senders a strict daily/monthly OKRW cap and exempting attested senders entirely from this template's accounting. The standard primitive for Travel-Rule-style thresholds.
Solidity struct + ABI
From
IPcl.sol:struct OkrwEasPeriodicVolumeLimitPolicy {
address easContract; // EAS deployment
address indexContract; // EAS Indexer
bytes32 schemaUid; // schema that exempts the sender from the cap
uint256 maxAmount; // cumulative cap (per period) for UN-attested senders
uint64 resetPeriodSeconds; // period length, e.g. 86400 for 24h
} ABI tuple shorthand:
Encode for
(address easContract, address indexContract, bytes32 schemaUid, uint256 maxAmount, uint64 resetPeriodSeconds).Encode for
PolicySet.policy:OkrwEasPeriodicVolumeLimitPolicy memory p = OkrwEasPeriodicVolumeLimitPolicy({
easContract: 0x1000000000000000000000000000000000000007,
indexContract: 0x1000000000000000000000000000000000000008,
schemaUid: 0xabcd...,
maxAmount: 1_000_000 ether, // 1,000,000 OKRW per period
resetPeriodSeconds: 86_400 // 24h
});
bytes memory policyBytes = abi.encode(p);
// PolicySet.templateId = "OKRW_EAS_PERIODIC_VOLUME_LIMIT_POLICY" Evaluation
For each OKRW transfer:
1. Check whether the sender holds a valid attestation under
2. Attested → admit (no cumulative cap from this template).
3. Un-attested → load the
- if
- if
- otherwise admit and add
Attested-vs-un-attested accumulators are independent. Read the un-attested accumulator with
1. Check whether the sender holds a valid attestation under
schemaUid (same lookup as EAS_POLICY).2. Attested → admit (no cumulative cap from this template).
3. Un-attested → load the
PeriodicVolume accumulator for (scope, sender):- if
block.timestamp >= resetAt → reset amount = 0, advance resetAt.- if
amount + value > maxAmount → reject with ExceededPeriodicVolume.- otherwise admit and add
value to amount.Attested-vs-un-attested accumulators are independent. Read the un-attested accumulator with
globalOkrwEasPeriodicVolume(user) or contractOkrwEasPeriodicVolume(contract, user, selector) — useful for showing remaining quota in wallet UI.ReasonCode on rejection
ExceededPeriodicVolume(uint256 maxLimit, uint256 value, uint256 resetAt) — wallet UX: "daily/monthly limit reached for unverified accounts; complete KYC to remove the cap, or wait until <resetAt>". resetAt is a unix timestamp.Typical usage
- Travel Rule compliance: un-attested users capped at 1,000,000 OKRW per 24h (the regulatory reporting threshold for some jurisdictions). Once a user completes KYC and receives the schema's attestation, this template stops capping them.
- Anti-fraud layering: pair with
DENYLIST_POLICYandOKRW_EAS_TRANSFER_LIMIT_POLICYto bound damage from compromised un-attested accounts. - One of the most common production deployments — usually among the first templates registered on a Maroo network.