Solana Programs
PayWithZ uses three core Anchor programs deployed on Solana that enforce compliance at the blockchain protocol level.Program Overview
Compliance Hook
Enforces compliance on every transfer
SBT Manager
Issues and manages KYC tokens
Issuer
Mints and redeems stablecoins
Compliance Hook Program
The Compliance Hook program is the core innovation of PayWithZ. It automatically runs on every token transfer.How It Works
- User initiates transfer
- Solana automatically calls Compliance Hook
- Program verifies:
- ✅ Sender has valid SBT
- ✅ Receiver has valid SBT
- ✅ Not on blacklist
- ✅ Passes velocity limits
- Transfer proceeds only if all checks pass
Key Functions
SBT Verification
Verifies both sender and receiver have valid SBTs
Blacklist Check
Checks against Merkle tree-based blacklist
Velocity Limits
Enforces transaction amount and frequency limits
Policy Enforcement
Applies custom risk rules and policies
SBT Manager Program
Manages KYC Soulbound Tokens (SBTs) - non-transferable identity tokens.Key Functions
Issue SBT
Issues SBT to verified wallet after KYC
Store KYC Hash
Stores cryptographic hash of KYC data on-chain
Revoke SBT
Revokes SBT if compliance fails
Expiry Management
Handles SBT expiry and renewal
SBT Characteristics
- Non-Transferable: Bound to wallet, cannot be sent
- Contains KYC Hash: Proof of identity verification
- Required for Transfers: All transfers check for SBT
- Revocable: Can be revoked by admin
Issuer Program
Handles stablecoin minting and redemption operations.Key Functions
Mint Tokens
Mints stablecoins after fiat deposit verification
Redeem Tokens
Burns stablecoins for fiat withdrawal
Supply Management
Tracks and manages total stablecoin supply
Authority Control
Enforces authority controls for minting
Token-2022 Integration
PayWithZ uses Solana’s Token-2022 program with transfer hook extension:Transfer Hooks
Enables automatic compliance checks on every transfer
Extensions
Uses transfer hook extension for compliance enforcement
Program Deployment
All programs are deployed on Solana testnet:- Compliance Hook:
AqzjJ8mxQdHYD4r64qvU1dBfA4zbMh4CPb9zCYTmUDeH - SBT Manager:
3LnG9zZt4y8Z9A2JS6jQ6EqZL4KPVS2RsLnE2Kv9UGCT - Issuer:
Aax14U5pH8KQ7GWRUdDBqZavppZCxjEWEuu41GZMWhtV
All programs are verified on Solana Explorer and can be viewed on-chain.
Security Features
Program Upgradability
Controlled by admin multisig
Authority Control
Secure authority management
On-Chain Verification
All code verifiable on-chain
Audit Trail
Complete on-chain transaction history