Skip to content
/ accredit Public

Shared KYC/AML compliance infrastructure for Solana. Accredit provides on-chain transfer enforcement and compliant DEX routing as reusable building blocks for regulated token applications.

License

Notifications You must be signed in to change notification settings

psyto/accredit

Repository files navigation

Accredit

Shared KYC/AML compliance infrastructure for Solana. Accredit provides on-chain transfer enforcement and compliant DEX routing as reusable building blocks for regulated token applications.

Overview

Accredit is organized into two layers:

Core Layer — KYC verification and transfer enforcement via Token-2022 transfer hooks. Every token transfer is validated against an on-chain whitelist that tracks KYC level, jurisdiction, expiry, and daily volume limits.

Routing Layer — Compliance-aware DEX aggregation built on top of Jupiter. Routes are filtered to only pass through audited, whitelisted liquidity pools. Includes optional zero-knowledge proof support for privacy-preserving compliance.

                        ┌───────────────────────────────┐
                        │           Accredit             │
                        │                                │
                        │  Core:                         │
                        │   transfer-hook program        │
                        │   accredit-types crate         │
                        │   @accredit/types              │
                        │   @accredit/sdk                │
                        │                                │
                        │  Routing:                      │
                        │   compliant-registry program   │
                        │   @accredit/router             │
                        └───────────────┬───────────────-┘
                                        │
                       ┌────────────────┴───────────────┐
                       │                                │
                  core + routing                   core only
                       │                                │
              ┌────────▼────────┐            ┌──────────▼────────┐
              │    Meridian     │            │    Continuum      │
              │  (securities)   │            │  (repo treasury)  │
              └─────────────────┘            └───────────────────┘

Repository Structure

accredit/
├── crates/
│   └── accredit-types/         # Shared Rust types (KycLevel, Jurisdiction, helpers)
├── programs/
│   ├── transfer-hook/          # Token-2022 transfer hook — KYC enforcement
│   └── compliant-registry/     # Pool compliance registry — route verification
├── packages/
│   ├── types/                  # @accredit/types — TypeScript type definitions
│   ├── sdk/                    # @accredit/sdk — PDA derivation + KycClient
│   └── router/                 # @accredit/router — compliance-aware Jupiter routing
└── tests/                      # Integration tests (ts-mocha)

Programs

Transfer Hook (5DLH2UrDD5bJFadn1gV1rof6sJ7MzJbVNnUfVMtGJgSL)

Token-2022 transfer hook that validates every token transfer against KYC/AML requirements:

  • Wallet whitelist with KYC level, jurisdiction, and expiry
  • Per-wallet daily volume tracking and limits
  • Per-KYC-level transaction size limits
  • Jurisdiction restrictions (USA blocked by default)
  • Emergency pause/resume for the registry
  • Authority transfer

See docs/programs/transfer-hook.md for full reference.

Compliant Registry (66tKcQqpv8GH2igWWBcLVrTjvo8cgpVJJAE8xadAgnYA)

On-chain registry of audited DEX pools for compliant route verification:

  • Pool registration with audit hash, jurisdiction, and KYC requirements
  • Pool lifecycle management (Active / Suspended / Revoked)
  • Batch route verification (validate all hops in a single instruction)
  • Compliance config linking pool registry to KYC registry

See docs/programs/compliant-registry.md for full reference.

TypeScript Packages

Package Description Layer
@accredit/types Shared type definitions (enums, interfaces, constants) Core
@accredit/sdk PDA derivation, KycClient, RegistryClient Core
@accredit/router ComplianceAwareRouter, Jupiter integration, ZK proofs Routing

See docs/sdk/ for usage guides.

Quick Start

Prerequisites

Build

# Install TypeScript dependencies
pnpm install

# Build Anchor programs
anchor build

# Build TypeScript packages
pnpm build

Test

# Run on-chain + SDK tests (requires solana-test-validator)
anchor test

# Run TypeScript package tests
pnpm test

Using as a Dependency

Rust crate (in your program's Cargo.toml):

[dependencies]
accredit-types = { path = "../accredit/crates/accredit-types" }

TypeScript packages (add accredit to your pnpm workspace):

# pnpm-workspace.yaml
packages:
  - "packages/*"
  - "../accredit/packages/*"

Then in your package.json:

{
  "dependencies": {
    "@accredit/types": "workspace:*",
    "@accredit/sdk": "workspace:*",
    "@accredit/router": "workspace:*"
  }
}

See docs/integration.md for detailed integration instructions.

KYC Levels

Level Description Per-Transaction Limit
Basic Email + phone verification 100,000 JPY
Standard Government ID document 10,000,000 JPY
Enhanced Video call + address proof 100,000,000 JPY
Institutional Corporate KYC/KYB Unlimited

Jurisdictions

Jurisdiction Code Transfer Status
Japan 0 Allowed (primary market)
Singapore 1 Allowed
Hong Kong 2 Allowed
EU 3 Allowed
USA 4 Restricted
Other 5 Allowed

Documentation

Toolchain

Tool Version
Anchor 0.32.1
Solana 2.2.1
Rust 2021 edition
TypeScript 5.6+
Node.js 20+

License

MIT

About

Shared KYC/AML compliance infrastructure for Solana. Accredit provides on-chain transfer enforcement and compliant DEX routing as reusable building blocks for regulated token applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •