Pattern: Full Compliance (Router)
Combine KYC allowlist, transfer tax, hold period, and max balance on a single token using the Router Hook
Overview
When a token needs multiple compliance features simultaneously, the Router Hook chains them together. The SDK automatically selects the Router when 2+ hooks are specified.
Implementation
Transfer Flow
When a transfer is executed, the Router enforces all sub-hooks in order:
- Allowlist — checks that both source and destination are on the approved list
- Tax — logs the transfer for later tax collection via Permanent Delegate
- Hold Period — verifies the source wallet's lock-up has expired
- Max Balance — ensures destination wallet stays within the per-wallet cap
If any check fails, the entire transaction reverts.