> For the complete documentation index, see [llms.txt](https://docs.flowfi.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowfi.vip/the-architecture-behind-flowfis-payfi-stack/layered-architecture-the-payfi-stack.md). Agents can also search and read this documentation through its [MCP server](https://docs.flowfi.vip/~gitbook/mcp).

# Layered Architecture: The PayFi Stack

FlowFi’s design follows a six-layer vertical architecture, with each layer solving a specific pain point in real-world financial flows:

#### Transaction Layer

High-performance settlement

* Built on high-throughput L1s such as Solana, Stellar, and EVM-compatible chains for real-time execution
* Finality in under 1 second, sub-$0.001 fees
* Native support for recurring, multi-party, and tokenized payments

#### Currency Layer

Stable and programmable value

* Supports regulated stablecoins (e.g., USDC, PYUSD)
* Compatible with programmable stablecoin frameworks (e.g., Circle’s CCTP, PayPal's conditional disbursement model)
* Fiat-backed assets ensure price stability and off-chain interoperability

#### Custody Layer

Secure and decentralized asset management

* Employs multi-party computation (MPC) and smart contract escrow systems
* Integrates with providers like Fireblocks, Ledger, and protocol-native custody vaults
* Enables shared custody and multi-signer control without compromising transaction speed

#### Compliance Layer

Regulatory integration at the protocol level

* Embedded KYC/AML tools through Chainalysis, Polyflow, and identity bridges
* Support for soulbound tokens (SBTs) and decentralized identity (DID) standards (e.g., ERC-725, Verifiable Credentials)
* Enables jurisdiction-specific policy enforcement, blacklists, and sanctions compliance

#### Financing Layer

On-chain credit rails

* Automated underwriting using on-chain behavioral data, repayment history, and protocol-defined heuristics
* Credit scoring algorithms assign real-time risk tiers to income streams and borrowers
* Loan origination, distribution, and repayment fully governed by smart contracts
* Capital source-agnostic: retail LPs, DAOs, or institutional vaults

#### Application Layer

Modular Interfaces for Fintechs, DAOs, and Enterprise Finance

* Open APIs and SDKs to integrate FlowFi into fintech apps, DAOs, DePIN systems, and ERP platforms
* Supports modular UI components for invoicing, payroll, and embedded financing
* Enables seamless rollout of Web3-native financial products with compliance and infrastructure abstracted
