Compliance is configuration, not code. Employers attach any subset of hooks per-payroll. Each recipient passes through every hook during executeCycle. Failures short-circuit to RecipientSkipped — other recipients in the same cycle are paid normally.
Reference hooks shipped
- KYCSBTHook — requires recipient holds a Soulbound Token from a specified issuer.
- JurisdictionHook — allowlist of country codes per recipient.
- SanctionsHook — owner-maintained sanctioned address blocklist.
- RateLimitHook — per-recipient daily cap across all payrolls (bonus).
- TimelockHook — large payouts delayed by N hours (bonus).
Build your own
interface IComplianceHook {
function check(
address employer,
address recipient,
uint256 amount,
uint256 payrollId
) external view returns (bool passed, string memory reason);
}Limits
Max 5 hooks per payroll (gas protection). Hooks are pure view; cannot mutate state during settlement.