Skip to main content

Sphere Guard

Sphere Guard is a transfer hook program that enforces badge verification requirements on token transfers. It validates both sender and receiver badges while allowing accounts to configure additional badge-based allowlists.

Overview

When configured at the mint level, Sphere Guard performs a series of validation steps. It first checks for valid Sphere badges on both the sender and receiver, then verifies badge parameters against account-specific allowlists. The transfer is only permitted once all badge requirements have been successfully met.

Badge Verification

For each transfer, Sphere Guard verifies both basic badge checks as well as more granular, account-specific rules.

Basic Badge Checks

  • Both parties have valid Sphere badges
  • Badges have not expired
  • Badges are in verified state
  • Badge metadata meets requirements

Account-Specific Rules

Each token account can configure additional badge requirements:

  • Specific metadata key-value pairs
  • Custom badge parameter thresholds
  • Jurisdiction or entity type restrictions

Allowlist Configuration

Token accounts can maintain an allowlist of accepted badge parameters:

pub struct BadgeAllowlist {
pub owner: Pubkey,
pub required_metadata: Vec<(String, String)>,
pub custom_rules: Vec<CustomRule>,
}

Configuration Options

  • Required Metadata: Key-value pairs that must be present
  • Custom Rules: Additional validation logic
  • Override Settings: Special case handling

Example Use Cases

Institutional Trading

For institutional trading, Sphere Guard only allows transfers between verified institutions. It requires specific regulatory metadata to be present in the Sphere badge. The system enforces jurisdiction restrictions to maintain compliance with regional regulations.

Retail Transfers

In retail transfers, Sphere Guard verifies the KYC status of both participating parties. The system checks risk scores contained within the badge metadata. It ensures all transfers remain within prescribed compliance limits.

Cross-Border Payments

For cross-border transactions, Sphere Guard validates the jurisdictions of both sender and receiver. It performs checks on license information stored in badge metadata. The system enforces rules specific to different currencies involved in the transfer.