Transfer Hook
A Solana SPL-2022 extension that intercepts token transfers and enforces compliance rules before allowing any transfer to proceed.
Full Definition
A Transfer Hook is a Solana SPL-2022 token extension that injects custom program logic into every token transfer. When a transfer instruction is executed, the Solana runtime automatically invokes the hook program before the transfer completes. If the hook rejects the transfer, the entire transaction fails atomically. There is no way to bypass it — the hook is embedded in the token mint itself.
In Sails.to, the transfer hook is the enforcement arm of the compliance system. Every transfer of a CrossSecurity token passes through the hook, which performs a battery of checks before allowing the transfer to proceed.
Why It Matters
Security tokens without enforceable transfer restrictions are just tokens with a label. Anyone can claim their token is "compliant" — but if a non-KYC'd wallet can receive it, if a sanctioned jurisdiction can hold it, if a lock-up period can be circumvented by a simple peer-to-peer transfer, then compliance is a fiction.
The transfer hook makes compliance a fact. It is not a middleware that can be routed around. It is not an API that can be skipped. It is baked into the Solana runtime's transfer logic. Every transfer — whether initiated from a dApp, a CLI, a DEX, or a direct RPC call — must pass through the hook. The rules are inescapable.
How It Works
When a transfer is initiated, the Sails.to transfer hook executes the following checks in sequence:
- KYC Verification: Both the sender and receiver wallets must hold valid KYC verification NFTs issued by the credentialing system
- Jurisdiction Whitelist: Both wallets must be associated with jurisdictions permitted by the offering's compliance configuration
- Lock-Up Period: The sender's tokens must have cleared any time-based lock-up restrictions defined in the offering terms
- Accreditation Tier: The receiver must meet the minimum accreditation requirements for the specific security class
- If all checks pass, the transfer proceeds atomically. If any check fails, the entire transaction reverts
All compliance parameters are stored in PDA-derived ComplianceConfig accounts, readable and verifiable by anyone.
Related Terms
Compliance you cannot bypass
Every transfer checked. Every rule enforced. Every violation blocked at the protocol level.
Learn More