Skip to main content

3 posts tagged with "Compliance"

View All Tags

xStocks on Solana: A Developer’s Field Guide to Tokenized Equities

· 7 min read
Dora Noda
Software Engineer

xStocks are tokenized, 1:1 representations of U.S. stocks and ETFs, minted on Solana as SPL tokens. They are built to move and compose just like any other on-chain asset, collapsing the friction of traditional equity markets into a wallet primitive. For developers, this opens up a new frontier of financial applications.

Solana is the ideal platform for this innovation, primarily due to Token Extensions. These native protocol features—like metadata pointers, pausable configurations, permanent delegates, transfer hooks, and confidential balances—give issuers the compliance levers they need while keeping the tokens fully compatible with the DeFi ecosystem. This guide provides the patterns and reality checks you need to integrate xStocks into AMMs, lending protocols, structured products, and wallets, all while honoring the necessary legal and compliance constraints.


The Big Idea: Equities That Behave Like Tokens

For most of the world, owning U.S. equities involves intermediaries, restrictive market hours, and frustrating settlement lags. xStocks change that. Imagine buying a fraction of AAPLx at midnight, seeing it settle instantly in your wallet, and then using it as collateral in a DeFi protocol—all on Solana’s low-latency, low-fee network. Each xStock token tracks a real share held with a regulated custodian. Corporate actions like dividends and stock splits are handled on-chain through programmable mechanisms, not paper processes.

Solana’s contribution here is more than just cheap and fast transactions; it’s programmable compliance. The Token Extensions standard adds native features that were previously missing from traditional tokens:

  • Transfer hooks for KYC gating.
  • Confidential balances for privacy with auditability.
  • Permanent delegation for court-ordered actions.
  • Pausable configurations for emergency freezes.

These are enterprise-grade controls built directly into the token mint, not bolted on as ad-hoc application code.


How xStocks Work (And What It Means for Your App)

Issuance and Backing

The process is straightforward: an issuer acquires underlying shares of a stock (e.g., Tesla) and mints a corresponding number of tokens on Solana (1 TSLA share ↔ 1 TSLAx). Pricing and corporate action data are fed by dedicated oracles. In the current design, dividends are automatically reinvested, increasing token balances for holders.

xStocks are issued under a base prospectus regime as certificates (or trackers) and were approved in Liechtenstein by the FMA on May 8, 2025. It's crucial to understand this is not a U.S. security offering, and distribution is restricted based on jurisdiction.

What Holders Get (And Don’t)

These tokens provide holders with price exposure and seamless transferability. However, they do not confer shareholder rights, such as corporate voting, to retail buyers. When designing your app's user experience and risk disclosures, this distinction must be crystal clear.

Where They Trade

While xStocks launched with centralized partners, they quickly propagated across Solana's DeFi ecosystem, appearing in AMMs, aggregators, lending protocols, and wallets. Eligible users can self-custody their tokens and move them on-chain 24/7, while centralized venues typically offer 24/5 order book access.


Why Solana Is Unusually Practical for Tokenized Equities

Solana’s Real-World Asset (RWA) tooling, particularly Token Extensions, allows teams to combine DeFi’s composability with institutional compliance without creating isolated, walled gardens.

Token Extensions = Compliance-Aware Mints

  • Metadata Pointer: Keeps wallets and explorers synced with up-to-date issuer metadata.
  • Scaled UI Amount Config: Lets issuers execute splits or dividends via a simple multiplier that automatically updates balances displayed in user wallets.
  • Pausable Config: Provides a "kill switch" for freezing token transfers during incidents or regulatory events.
  • Permanent Delegate: Enables an authorized party to transfer or burn tokens to comply with legal orders.
  • Transfer Hook: Can be used to enforce allow/deny lists at the time of transfer, ensuring only eligible wallets can interact with the token.
  • Confidential Balances: Paves the way for privacy-preserving transactions that remain auditable.

Your integrations must read these extensions at runtime and adapt their behavior accordingly. For instance, if a token is paused, your application should halt related operations.


Patterns for Builders: Integrating xStocks the Right Way

AMMs and Aggregators

  • Respect Pause States: If a token's mint is paused, immediately halt swaps and LP operations and clearly notify users.
  • Use Oracle-Guarded Curves: Implement pricing curves guarded by robust oracles to handle volatility, especially during hours when the underlying stock exchange is closed. Manage slippage gracefully during these off-hours.
  • Expose Venue Provenance: Clearly indicate to users where liquidity is coming from, whether it's a DEX, CEX, or wallet swap.

Lending and Borrowing Protocols

  • Track Corporate Actions: Use issuer or venue NAV oracles and monitor for Scaled UI Amount updates to avoid silent collateral value drift after a stock split or dividend.
  • Define Smart Haircuts: Set appropriate collateral haircuts that account for off-hours market exposure and the varying liquidity of different stock tickers. These risk parameters are different from those for stablecoins.

Wallets and Portfolio Apps

  • Render Official Metadata: Pull and display official token information from the mint’s metadata pointer. Explicitly state "no shareholder rights" and show jurisdiction flags in the token's detail view.
  • Surface Safety Rails: Detect the token's extension set upfront and surface relevant information to the user, such as whether the token is pausable, has a permanent delegate, or uses a transfer hook.

Structured Products

  • Create Novel Instruments: Combine xStocks with derivatives like perpetuals or options to build hedged baskets or structured yield notes.
  • Be Clear in Your Docs: Ensure your documentation clearly describes the legal nature of the underlying asset (a certificate/tracker) and how corporate actions like dividends are treated.

Compliance, Risk, and Reality Checks

Jurisdiction Gating

The availability of xStocks is geo-restricted. They are not offered to U.S. persons and are unavailable in several other major jurisdictions. Your application must not direct ineligible users into flows they cannot legally complete.

Investor Understanding

European regulators have warned that some tokenized stocks can be misunderstood by investors, especially when tokens mirror a stock's price without granting actual equity rights. Your UX must be crystal clear about what the token represents.

Model Differences

Not all "tokenized stocks" are created equal. Some are derivatives, others are debt certificates backed by shares in a special purpose vehicle (SPV), and a few are moving toward legally equivalent digital shares. Design your features and disclosures to match the specific model you are integrating.


Multichain Context and Solana's Central Role

While xStocks originated on Solana, they have expanded to other chains to meet user demand. For developers, this introduces challenges around cross-chain UX and ensuring consistent compliance semantics across different token standards (like SPL vs. ERC-20). Even so, Solana’s sub-second finality and native Token Extensions keep it a premier venue for on-chain equities.


Developer Checklist

  • Token Introspection: Read the mint’s full extension set (metadata pointer, pausable, permanent delegate, etc.) and subscribe to pause events to fail safely.
  • Price and Actions: Source prices from robust oracles and watch for scaled-amount updates to correctly handle dividends and splits.
  • UX Clarity: Display eligibility requirements and rights limitations (e.g., no voting) prominently. Link to official issuer documentation within your app.
  • Risk Limits: Apply appropriate LTV haircuts, implement off-hours liquidity safeguards, and build circuit-breakers tied to the mint’s pausable state.
  • Compliance Alignment: If and when transfer hooks are enabled, ensure your protocol enforces allow/deny lists at the transfer level. Until then, gate user flows at the application layer.

Why This Matters Now

The early traction for xStocks shows genuine demand, with broad exchange listings, immediate DeFi integrations, and measurable on-chain volumes. While this is still a tiny slice of the $120 trillion global equity market, the signal for builders is clear: the primitives are here, the rails are ready, and the greenfield is wide open.

Digital Asset Custody for Low‑Latency, Secure Trade Execution at Scale

· 10 min read
Dora Noda
Software Engineer

How to design a custody and execution stack that moves at market speed without compromising on risk, audit, or compliance.


Executive Summary

Custody and trading can no longer operate in separate worlds. In today's digital asset markets, holding client assets securely is only half the battle. If you can’t execute trades in milliseconds when prices move, you are leaving returns on the table and exposing clients to avoidable risks like Maximal Extractable Value (MEV), counterparty failures, and operational bottlenecks. A modern custody and execution stack must blend cutting-edge security with high-performance engineering. This means integrating technologies like Multi-Party Computation (MPC) and Hardware Security Modules (HSMs) for signing, using policy engines and private transaction routing to mitigate front-running, and leveraging active/active infrastructure with off-exchange settlement to reduce venue risk and boost capital efficiency. Critically, compliance can't be a bolt-on; features like Travel Rule data flows, immutable audit logs, and controls mapped to frameworks like SOC 2 must be built directly into the transaction pipeline.


Why “Custody Speed” Matters Now

Historically, digital asset custodians optimized for one primary goal: don’t lose the keys. While that remains fundamental, the demands have evolved. Today, best execution and market integrity are equally non-negotiable. When your trades travel through public mempools, sophisticated actors can see them, reorder them, or "sandwich" them to extract profit at your expense. This is MEV in action, and it directly impacts execution quality. Keeping sensitive order flow out of public view by using private transaction relays is a powerful way to reduce this exposure.

At the same time, venue risk is a persistent concern. Concentrating large balances on a single exchange creates significant counterparty risk. Off-exchange settlement networks provide a solution, allowing firms to trade with exchange-provided credit while their assets remain in segregated, bankruptcy-remote custody. This model vastly improves both safety and capital efficiency.

Regulators are also closing the gaps. The enforcement of the Financial Action Task Force (FATF) Travel Rule and recommendations from bodies like IOSCO and the Financial Stability Board are pushing digital asset markets toward a "same-risk, same-rules" framework. This means custody platforms must be built from the ground up with compliant data flows and auditable controls.


Design Goals (What “Good” Looks Like)

A high-performance custody stack should be built around a few core design principles:

  • Latency you can budget: Every millisecond from client intent to network broadcast must be measured, managed, and enforced with strict Service Level Objectives (SLOs).
  • MEV-resilient execution: Sensitive orders should be routed through private channels by default. Exposure to the public mempool should be an intentional choice, not an unavoidable default.
  • Key material with real guarantees: Private keys must never leave their protected boundaries, whether they are distributed across MPC shards, stored in HSMs, or isolated in Trusted Execution Environments (TEEs). Key rotation, quorum enforcement, and robust recovery procedures are table stakes.
  • Active/active reliability: The system must be resilient to failure. This requires multi-region and multi-provider redundancy for both RPC nodes and signers, complemented by automated circuit breakers and kill-switches for venue and network incidents.
  • Compliance-by-construction: Compliance cannot be an afterthought. The architecture must have built-in hooks for Travel Rule data, AML/KYT checks, and immutable audit trails, with all controls mapped directly to recognized frameworks like the SOC 2 Trust Services Criteria.

A Reference Architecture

This diagram illustrates a high-level architecture for a custody and execution platform that meets these goals.

  • The Policy & Risk Engine is the central gatekeeper for every instruction. It evaluates everything—Travel Rule payloads, velocity limits, address risk scores, and signer quorum requirements—before any key material is accessed.
  • The Signer Orchestrator intelligently routes signing requests to the most appropriate control plane for the asset and policy. This could be:
    • MPC (Multi-Party Computation) using threshold signature schemes (like t-of-n ECDSA/EdDSA) to distribute trust across multiple parties or devices.
    • HSMs (Hardware Security Modules) for hardware-enforced key custody with deterministic backup and rotation policies.
    • Trusted Execution Environments (e.g., AWS Nitro Enclaves) to isolate signing code and bind keys directly to attested, measured software.
  • The Execution Router sends transactions on the optimal path. It prefers private transaction submission for large or information-sensitive orders to avoid front-running. It falls back to public submission when needed, using multi-provider RPC failover to maintain high availability even during network brownouts.
  • The Observability Layer provides a real-time view of the system's state. It watches the mempool and new blocks via subscriptions, reconciles executed trades against internal records, and commits immutable audit records for every decision, signature, and broadcast.

Security Building Blocks (and Why They Matter)

  • Threshold Signatures (MPC): This technology distributes control over a private key so that no single machine—or person—can unilaterally move funds. Modern MPC protocols can implement fast, maliciously secure signing that is suitable for production latency budgets.
  • HSMs and FIPS Alignment: HSMs enforce key boundaries with tamper-resistant hardware and documented security policies. Aligning with standards like FIPS 140-3 and NIST SP 800-57 provides auditable, widely understood security guarantees.
  • Attested TEEs: Trusted Execution Environments bind keys to specific, measured code running in isolated enclaves. Using a Key Management Service (KMS), you can create policies that only release key material to these attested workloads, ensuring that only approved code can sign.
  • Private Relays for MEV Protection: These services allow you to ship sensitive transactions directly to block builders or validators, bypassing the public mempool. This dramatically reduces the risk of front-running and other forms of MEV.
  • Off-Exchange Settlement: This model allows you to hold collateral in segregated custody while trading on centralized venues. It limits counterparty exposure, accelerates net settlement, and frees up capital.
  • Controls Mapped to SOC 2/ISO: Documenting and testing your operational controls against recognized frameworks allows customers, auditors, and partners to trust—and independently verify—your security and compliance posture.

Latency Playbook: Where the Milliseconds Go

To achieve low-latency execution, you need to optimize every step of the transaction lifecycle:

  • Intent → Policy Decision: Keep policy evaluation logic hot in memory. Cache Know-Your-Transaction (KYT) and allowlist data with short, bounded Time-to-Live (TTL) values, and pre-compute signer quorums where possible.
  • Signing: Use persistent MPC sessions and HSM key handles to avoid the overhead of cold starts. For TEEs, pin the enclaves, warm their attestation paths, and reuse session keys where it is safe to do so.
  • Broadcast: Prefer persistent WebSocket connections to RPC nodes over HTTP. Co-locate your execution services with your primary RPC providers' regions. When latency spikes, retry idempotently and hedge broadcasts across multiple providers.
  • Confirmation: Instead of polling for transaction status, subscribe to receipts and events directly from the network. Stream these state changes into a reconciliation pipeline for immediate user feedback and internal bookkeeping.

Set strict SLOs for each hop (e.g., policy check <20ms, signing <50–100ms, broadcast <50ms under normal load) and enforce them with error budgets and automated failover when p95 or p99 latencies degrade.


Risk & Compliance by Design

A modern custody stack must treat compliance as an integral part of the system, not an add-on.

  • Travel Rule Orchestration: Generate and validate originator and beneficiary data in-line with every transfer instruction. Automatically block or detour transactions involving unknown Virtual Asset Service Providers (VASPs) and log cryptographic receipts of every data exchange for audit purposes.
  • Address Risk & Allowlists: Integrate on-chain analytics and sanctions screening lists directly into the policy engine. Enforce a deny-by-default posture, where transfers are only permitted to explicitly allowlisted addresses or under specific policy exceptions.
  • Immutable Audit: Hash every request, approval, signature, and broadcast into an append-only ledger. This creates a tamper-evident audit trail that can be streamed to a SIEM for real-time threat detection and provided to auditors for control testing.
  • Control Framework: Map every technical and operational control to the SOC 2 Trust Services Criteria (Security, Availability, Processing Integrity, Confidentiality, and Privacy) and implement a program of continuous testing and validation.

Off-Exchange Settlement: Safer Venue Connectivity

A custody stack built for institutional scale should actively minimize exposure to exchanges. Off-exchange settlement networks are a key enabler of this. They allow a firm to maintain assets in its own segregated custody while an exchange mirrors that collateral to enable instant trading. Final settlement occurs on a fixed cadence with Delivery versus Payment (DvP)-like guarantees.

This design dramatically reduces the "hot wallet" footprint and the associated counterparty risk, all while preserving the speed required for active trading. It also improves capital efficiency, as you no longer need to overfund idle balances across multiple venues, and it simplifies operational risk management by keeping collateral segregated and fully auditable.


Control Checklist (Copy/Paste Into Your Runbook)

  • Key Custody
    • MPC using a t-of-n threshold across independent trust domains (e.g., multi-cloud, on-prem, HSMs).
    • Use FIPS-validated modules where feasible; maintain plans for quarterly key rotation and incident-driven rekeying.
  • Policy & Approvals
    • Implement a dynamic policy engine with velocity limits, behavioral heuristics, and business-hour constraints.
    • Require four-eyes approval for high-risk operations.
    • Enforce address allowlists and Travel Rule checks before any signing operation.
  • Execution Hardening
    • Use private transaction relays by default for large or sensitive orders.
    • Utilize dual RPC providers with health-based hedging and robust replay protection.
  • Monitoring & Response
    • Implement real-time anomaly detection on intent rates, gas price outliers, and failed transaction inclusion.
    • Maintain a one-click kill-switch to freeze all signers on a per-asset or per-venue basis.
  • Compliance & Audit
    • Maintain an immutable event log for all system actions.
    • Perform continuous, SOC 2-aligned control testing.
    • Ensure robust retention of all Travel Rule evidence.

Implementation Notes

  • People & Process First: Technology cannot fix ambiguous authorization policies or unclear on-call ownership. Clearly define who is authorized to change policy, promote signer code, rotate keys, and approve exceptions.
  • Minimize Complexity Where You Can: Every new blockchain, bridge, or venue you integrate adds non-linear operational risk. Add them deliberately, with clear test coverage, monitoring, and roll-back plans.
  • Test Like an Adversary: Regularly conduct chaos engineering drills. Simulate signer loss, enclave attestation failures, stalled mempools, venue API throttling, and malformed Travel Rule data to ensure your system is resilient.
  • Prove It: Track the KPIs that your customers actually care about:
    • Time-to-broadcast and time-to-first-confirmation (p95/p99).
    • The percentage of transactions submitted via MEV-safe routes versus the public mempool.
    • Venue utilization and collateral efficiency gains from using off-exchange settlement.
    • Control effectiveness metrics, such as the percentage of transfers with complete Travel Rule data attached and the rate at which audit findings are closed.

The Bottom Line

A custody platform worthy of institutional flow executes fast, proves its controls, and limits counterparty and information risk—all at the same time. This requires a deeply integrated stack built on MEV-aware routing, hardware-anchored or MPC-based signing, active/active infrastructure, and off-exchange settlement that keeps assets safe while accessing global liquidity. By building these components into a single, measured pipeline, you deliver the one thing institutional clients value most: certainty at speed.

Momentary Custody, Long-Term Compliance: A Playbook for Crypto-Payment Founders

· 6 min read
Dora Noda
Software Engineer

If you’re building a crypto payments platform, you might have told yourself, “My platform only touches customer funds for a few seconds. That doesn’t really count as custody, right?”

This is a dangerous assumption. To financial regulators worldwide, even momentary control over customer funds makes you a financial intermediary. That brief touch—even for a few seconds—triggers a long-term compliance burden. For founders, understanding the substance of regulation, not just the technical implementation of your code, is critical for survival.

This playbook offers a clear guide to help you make smart, strategic decisions in a complex regulatory landscape.

1. Why “Just a Few Seconds” Still Triggers Money-Transmission Rules

The core of the issue is how regulators define control. The U.S. Financial Crimes Enforcement Network (FinCEN) is unequivocal: anyone who “accepts and transmits convertible virtual currency” is classified as a money transmitter, regardless of how long the funds are held.

This standard was reaffirmed in FinCEN’s 2019 CVC guidance and again in the 2023 DeFi risk assessment.

Once your platform meets this definition, you face a host of demanding requirements, including:

  • Federal MSB registration: Registering as a Money Services Business with the U.S. Department of the Treasury.
  • A written AML program: Establishing and maintaining a comprehensive Anti-Money Laundering program.
  • CTR/SAR filing: Filing Currency Transaction Reports (CTRs) and Suspicious Activity Reports (SARs).
  • Travel-Rule data exchange: Exchanging originator and beneficiary information for certain transfers.
  • Ongoing OFAC screening: Continuously screening users against sanctions lists.

2. Smart Contracts ≠ Immunity

Many founders believe that automating processes with smart contracts provides a safe harbor from custodial obligations. However, regulators apply a functional test: they judge based on who has effective control, not how the code is written.

The Financial Action Task Force (FATF) made this clear in its 2023 targeted update, stating that “marketing terms or self-identification as DeFi is not determinative” of regulatory status.

If you (or a multisig you control) can perform any of the following actions, you are the custodian:

  • Upgrade a contract via an admin key.
  • Pause or freeze funds.
  • Sweep funds through a batch-settlement contract.

Only contracts with no admin key and direct user-signed settlement may avoid the Virtual Asset Service Provider (VASP) label—and even then, you still need to integrate sanctions screening at the UI layer.

3. The Licensing Map at a Glance

The path to compliance varies dramatically across jurisdictions. Here is a simplified overview of the global licensing landscape.

RegionCurrent GatekeeperPractical Hurdle
U.S.FinCEN + State MTMA licencesDual layer, costly surety bonds, and audits. 31 states have adopted the Money Transmission Modernization Act (MTMA) so far.
EU (today)National VASP registersMinimal capital requirements, but passporting rights are limited until MiCA is fully implemented.
EU (2026)MiCA CASP licence€125k–€150k capital requirement, but offers a single-passport regime for all 27 EU markets.
UKFCA crypto-asset registerRequires a full AML program and a Travel Rule-compliant interface.
SG / HKPSA (MAS) / VASP OrdinanceMandates custody segregation and a 90% cold-wallet rule for customer assets.

4. Case Study: BoomFi’s Poland VASP Route

BoomFi’s strategy provides an excellent model for startups targeting the EU. The company registered with the Polish Ministry of Finance in November 2023, securing a VASP registration.

Why it works:

  • Fast and low-cost: The approval process took less than 60 days and had no hard capital floor.
  • Builds credibility: The registration signals compliance and is a key requirement for EU merchants who need to work with a VASP-of-record.
  • Smooth path to MiCA: This VASP registration can be upgraded to a full MiCA CASP license in-place, preserving the existing customer base.

This lightweight approach allowed BoomFi to gain early market access and validate its product while preparing for the more rigorous MiCA framework and a future U.S. rollout.

5. De-risking Patterns for Builders

Compliance shouldn’t be an afterthought. It must be woven into your product design from day one. Here are several patterns that can minimize your licensing exposure.

Wallet Architecture

  • User-signed, contract-forwarding flows: Use patterns like ERC-4337 Paymasters or Permit2 to ensure all fund movements are explicitly signed and initiated by the user.
  • Time-lock self-destruct of admin keys: After the contract is audited and deployed, use a time-lock to permanently renounce admin privileges, proving you no longer have control.
  • Shard custody with licensed partners: For batch settlements, partner with a licensed custodian to handle the aggregation and disbursement of funds.

Operational Stack

  • Pre-transaction screening: Use an API gateway that injects OFAC and chain-analysis scores to vet addresses before a transaction is ever processed.
  • Travel Rule messenger: For cross-VASP transfers of $1,000 or more, integrate a solution like TRP or Notabene to handle required data exchange.
  • KYB first, then KYC: Vet the merchant (Know Your Business) before you onboard their users (Know Your Customer).

Expansion Sequencing

  1. Europe via VASP: Start in Europe with a national VASP registration (e.g., Poland) or a UK FCA registration to prove product-market fit.
  2. U.S. via partners: While state licenses are pending, enter the U.S. market by partnering with a licensed sponsor bank or custodial institution.
  3. MiCA CASP: Upgrade to a MiCA CASP license to lock in the EU passport for 27 markets.
  4. Asia-Pac: Pursue a license in Singapore (MAS) or Hong Kong (VASP Ordinance) if volume and strategic goals justify the additional capital outlay.

Key Takeaways

For every founder in the crypto-payments space, remember these core principles:

  1. Control trumps code: Regulators look at who can move money, not how the code is structured.
  2. Licensing is strategy: A lightweight EU VASP can open doors while you prepare for more capital-intensive jurisdictions.
  3. Design for compliance early: Admin-free contracts and sanction-aware APIs buy you runway and investor confidence.

Build like you will one day be inspected—because if you move customer funds, you will.