Skip to main content
Skip to main contentTAWF Logo - Home

Documentation

Building the future of value-aligned decentralized systems. Resources, guides, and tools for developers.

Sharia Capital Standard
Available
v0.1.2 (Latest)
MIT License

Why Sharia Capital Standard?

Most DeFi primitives assume interest-based yield or implicit guarantees. Sharia Capital Standard provides composable smart contract primitives aligned with AAOIFI standards, enabling halal capital formation natively on-chain.

Supported Environments

EVM
Solidity
Foundry
Hardhat
Solana
Anchor

Standards Architecture

Capital Primitives

SCS-1
Mudarabah
Manager-investor profit-sharing partnership where capital provider (Rabb al-Mal) provides capital and manager (Mudarib) manages investments.
  • Profit sharing by pre-agreed ratio
  • Loss borne by capital provider
  • Manager liability for misconduct
  • ERC-20 compatible
SCS-2
Musharakah
Joint venture capital model where all partners contribute capital and share profits and losses.
  • Flexible profit ratios
  • Loss ratio equals capital ratio
  • Multi-partner support
  • AAOIFI Standard #12 compliant

Infrastructure Layer

SCS-3
Vault Engine
ERC-4626 compliant vault with epoch-based accounting and NAV calculation for profit-sharing pools.
  • Epoch-based accounting
  • NAV calculation
  • Strategy management
  • ERC-4626 standard
SCS-4
Enforcement Layer
Protocol-level enforcement ensuring Sharia compliance by prohibiting guaranteed returns and fixed-yield structures.
  • No guaranteed returns
  • Profit-sharing validation
  • Fixed-yield prevention
  • Compliance checks

Governance Layer

SCS-5
AAOIFI Governance
Governance framework implementing AAOIFI Governance Standard #3 with Sharia Supervisory Board oversight.
  • SSB oversight
  • Multi-signature approval
  • Prohibited asset screening
  • Financial ratio validation

Architecture Overview

Users

Capital Providers

Vault Engine

SCS-3

Capital Modules

SCS-1, SCS-2

Enforcement

SCS-4

SSB Governance

SCS-5

AAOIFI Compliance Validation

Every transaction flows through the enforcement layer (SCS-4) which validates against AAOIFI standards before execution. The SSB Governance layer (SCS-5) provides ongoing oversight and can update compliance rules through multi-signature approval.

Installation

Choose your preferred development environment and get started in minutes

Step 1: Install Dependency

forge install tawf-labs/Sharia-Capital-Standard

Step 2: Configure Remappings

@sharia-capital/=lib/Sharia-Capital-Standard/evm/src/

Step 3: Import Contracts

import "@sharia-capital/SCS1/MudarabahPool.sol";
import "@sharia-capital/SCS2/MusharakahPool.sol";
import "@sharia-capital/SCS3/VaultEngine.sol";
import "@sharia-capital/SCS4/SCSEnforcement.sol";
import "@sharia-capital/SCS5/AAOIFIGovernance.sol";

Usage Examples

Production-ready code examples for each standard

Mudarabah Pool
Create a profit-sharing partnership pool
// Create Mudarabah pool
MudarabahFactory factory = new MudarabahFactory(enforcementAddress);

address pool = factory.createPool(
    usdcAddress,
    managerAddress,
    capitalProviderAddress,
    2000, // 20% manager share (basis points)
    8000, // 80% provider share (basis points)
    "USDC Mudarabah Pool",
    "MDP-USDC"
);

// Deposit capital
MudarabahPool mudarabah = MudarabahPool(pool);
usdc.approve(pool, 1000e6);
mudarabah.deposit(1000e6);

// Deploy to strategy
mudarabah.deployCapital(strategyAddress, 500e6);
AAOIFI Compliance
Implementing standards from the Accounting and Auditing Organization for Islamic Financial Institutions
Standard #8
Mudarabah (profit-sharing partnership)
Standard #12
Musharakah (joint venture)
Standard #17
Investment Agencies
Governance #3
Internal Sharia Review

No capital guarantee mechanisms exist at protocol level in accordance with AAOIFI standards.

Security Features
Production-grade security measures and best practices
100% test coverage with comprehensive test suite
Fuzz testing with 256+ iterations per function
ReentrancyGuard protection on all state changes
Role-based access control (RBAC) implementation
Aderyn static analysis in continuous integration

External audit recommended before production deployment. Obtain SSB approval and conduct independent Sharia review.

Who Should Use This?

Sharia Capital Standard is designed for organizations and developers building Sharia-compliant financial infrastructure

Islamic Fintech Startups

Build Sharia-compliant DeFi products with production-ready primitives for halal capital formation.

Web3 Protocols (MENA/SEA)

Integrate Islamic finance capabilities to serve Muslim-majority markets with compliant infrastructure.

DAOs Structuring Halal Capital

Implement transparent, on-chain governance with Sharia Supervisory Board oversight mechanisms.

Institutional Sharia-Compliant Funds

Deploy auditable, AAOIFI-compliant investment vehicles with built-in compliance enforcement.

Documentation Sections

Coming Soon
Getting Started
Quick start guide to begin building with TAWF. Learn about installation, configuration, and your first values-aligned dApp.
Coming Soon
API Reference
Complete API documentation for TAWF-SDK. Detailed reference for all methods, types, and interfaces.
Coming Soon
Tutorials & Guides
Step-by-step tutorials for building common use cases. From simple zakat trackers to complex waqf systems.
Coming Soon
Examples
Code samples and example projects to help you understand best practices and common patterns.

Start Building Today

Production-ready smart contracts for Sharia-compliant capital formation. Install via npm or explore the source code on GitHub.