Compliance Middleware for Institutional Stablecoin Infrastructure
Think of PayShield as Stripe for regulatory compliance in DeFi. Drop in the SDK, wire up three hooks, and your protocol becomes instantly KYC-gated, transaction-monitored, AML-screened, and Travel Rule compliant — with all compliance receipts written on-chain for institutional audit.
Built for StableHacks 2026 — Tenity / AMINA Bank / Solana Foundation Track: Programmable Stablecoin Payments Demo Day: Zurich, April 8, 2026
payshield/
├── programs/ # Solana Anchor programs (Rust)
│ ├── payshield_registry/ # KYC attestation store (PDA-based)
│ ├── payshield_gate/ # Transaction interceptor + compliance receipts
│ ├── payshield_audit/ # Immutable on-chain audit ledger
│ └── payshield_travel/ # VASP-to-VASP encrypted messaging
├── sdk/ # TypeScript SDK (@payshield/solana)
│ └── src/
│ ├── kyc/ # ZK identity proof verification
│ ├── kyt/ # Real-time risk scoring (SIX Data API)
│ ├── aml/ # Sanctions screening (OFAC/EU/UN/ChainPatrol)
│ └── travel-rule/ # FATF R.16 VASP messaging
├── dashboard/ # Next.js compliance officer dashboard
└── demo/ # Demo stablecoin payment app
| Program | Address |
|---|---|
| payshield_registry | EhLH7HTooyBriCwz8GxFmCPc81fHmFqNqin81MnHbrar |
| payshield_gate | 6o2E3EeK7rp7Zhpg15vD9M6evmaheb6CVWpGovLJrh8i |
| payshield_audit | 86zhrrUTXf6ttctoSd5YA5xeJnBnhcxKhRv6rh7izUAM |
| payshield_travel | GRADVys4oCSh84eMethwXRQmhK9KNFnsczLkMi7TPugN |
import { PayShield } from "@payshield/solana";
const shield = new PayShield({
network: "devnet",
modules: ["kyc", "kyt", "aml", "travel_rule"]
});
// 1. Gate entry — verify KYC before any interaction
await shield.kyc.verify(userPublicKey);
// 2. Score transaction — KYT + AML check before settlement
const receipt = await shield.tx.screen(txDetails);
// 3. Attach receipt — Travel Rule metadata + on-chain audit record
await shield.tx.settle(transaction, receipt);| Requirement | Implementation |
|---|---|
| KYC | ZK credential verification via payshield_registry; on-chain attestation with expiry and revocation |
| KYT | Pre-settlement risk scoring using SIX Data price feeds + on-chain velocity analysis |
| AML | Sanctions screening via ChainPatrol + OFAC/EU/UN; SAR flagging in audit trail |
| Travel Rule | Encrypted VASP-to-VASP messaging (FATF R.16) for transfers ≥ $1,000 |
Alice (Swiss resident) → Bob (German resident): 5,000 USDC
cd demo && npm run demo:alice-bobExpected output:
[Step 1] KYC Verification — ZK identity proof check
✓ Alice KYC: VALID — Jurisdiction: CH, Tier: Enhanced
✓ Bob KYC: VALID — Jurisdiction: DE, Tier: Enhanced
[Step 3] KYT Risk Score
✓ Risk Score: 12/100 (LOW)
[Step 4] AML Screening
✓ OFAC SDN List: CLEAR
✓ EU Consolidated Sanctions: CLEAR
✓ UN Security Council Sanctions: CLEAR
[Step 5] Travel Rule (FATF R.16)
✓ Travel Rule applies (transfer ≥ $1,000)
✓ Encrypted VASP message sent: Alice-VASP → Bob-VASP
Verdict: ✓ APPROVED
- Node.js 18+
- Rust + Cargo
- Anchor CLI 0.31+
- Solana CLI 1.18+
# Generate lockfile with compatible cargo, then build
~/.cache/solana/v1.43/platform-tools/rust/bin/cargo generate-lockfile
# Downgrade lockfile version for SBF toolchain compatibility
python3 -c "
c = open('Cargo.lock').read().replace('version = 4','version = 3',1)
open('Cargo.lock','w').write(c)
"
cargo-build-sbf --tools-version v1.43 --workspacecd sdk && npm install && npm run buildcd dashboard && npm install && npm run dev
# Open http://localhost:3000cd demo && npm install && npm run demo- On-chain: Only credential hashes, compliance verdicts, and risk scores. No PII ever stored on-chain.
- Off-chain: KYC documents remain with the identity provider. PayShield receives only a signed ZK proof.
- Travel Rule: VASP-to-VASP messages are end-to-end encrypted (X25519 ECDH + AES-256-GCM).
- Audit trail: Compliance verdicts and timestamps only — sufficient for regulatory audit without exposing identity.
- End-to-end compliance flow completes in < 3 seconds on Devnet
- KYC ZK proof verification costs < 10,000 compute units
- KYT risk score produced using live SIX Data FX feed (not mocked)
- Travel Rule VASP message encrypted and delivered within 1 block
- Compliance receipt visible in dashboard within 2 seconds
- Third-party protocol integrated using PayShield SDK in < 30 lines of code
PayShield — Built for StableHacks 2026. The compliance primitive that Solana's stablecoin ecosystem is missing.