Islamic Finance · Halal Economy · Digital Shariah

The Gold Standard of
Shariah-Compliant Finance

A complete reference to the principles of Islamic jurisprudence in finance: from the prohibitions of Riba, Gharar and Maysir, to Sukuk structuring, algorithmic equity screening, dividend purification, Zakat, crypto-asset screening and on-chain Islamic DAOs.

$5.98T
Global Sharia-compliant financial assets
$2.60T
Annual Muslim consumer spending across halal sectors
$8.46T
Projected market size by 2031
10.70%
Expected CAGR, 2026–2031
01 — FOUNDATIONS

The Core Shariah Principles of Finance

Islamic finance rests on the objectives of Shariah (Maqasid al-Shariah): protecting faith, life, intellect, lineage and wealth. In commerce this means justice, transparency, and a direct link between money and real economic activity.

The Prohibitions

رباProhibited

Riba — Usury / Interest

Any predetermined, guaranteed increase on a loan or on the exchange of like-for-like money. Money is a measure of value, not a commodity that earns by itself. Returns must come from trade, leasing or shared enterprise.

غررProhibited

Gharar — Excessive Uncertainty

Contracts with excessive ambiguity about the subject matter, price, quantity or delivery. Terms must be clear and known to both parties so that neither is deceived or exploited.

ميسرProhibited

Maysir — Gambling / Speculation

Gains that depend purely on chance, where one party's gain is another's loss without productive activity. Covers games of chance, zero-sum speculation and gambling-like instruments.

حرامProhibited

Haram Activities

Financing or investing in prohibited sectors: alcohol, pork, gambling, tobacco, adult entertainment, conventional interest-based finance and insurance, and (by most screens) defence and weapons.

ظلمProhibited

Zulm — Injustice & Exploitation

Unfair terms, fraud (Ghish), hoarding (Ihtikar) and market manipulation, including artificially inflating prices or exploiting a party's need.

دين بدينProhibited

Sale of Debt for Debt

Trading debt obligations against other debt obligations (Bay' al-Dayn bil-Dayn), and selling what one does not own or possess, are generally impermissible.

The Positive Principles

Required

Risk-Sharing (Profit & Loss Sharing)

Capital providers share in business risk. Returns are earned by bearing risk, following the maxim al-kharaj bil-daman: entitlement to profit comes with liability for loss.

Required

Asset-Backing

Every financial transaction must be tied to a real, identifiable, tangible asset or service. This link to the real economy is what separates Sukuk from conventional bonds.

Required

Transparency & Disclosure

Full, fair disclosure of terms, costs, profit rates and risks, written clearly into the contract.

Required

Sanctity of Contracts

Contracts must be entered into freely, with mutual consent (Taradi), and honoured faithfully. Parties must be competent, and the subject matter must exist and be lawful.

Required

Ethical & Social Purpose

Wealth must serve society. This shows up in Zakat, Sadaqah, Waqf endowments and Qard Hasan, and aligns naturally with ESG investing.

Required

Shariah Governance

Institutions operate under a Shariah Supervisory Board that issues rulings (fatwas), audits compliance and follows standards such as those of AAOIFI and IFSB.

The three pillars of prohibition (Riba, Gharar and Maysir) recur throughout this page. They apply equally to banking, capital markets, equities, crypto-assets and decentralised autonomous organisations.
02 — INSTRUMENTS

Islamic Finance Contracts

Conventional products are replaced by nominate contracts that generate returns through trade, leasing, partnership or agency, never through interest.

ContractCategoryHow it worksTypical use
MudarabahPartnershipInvestor (Rab-al-Maal) supplies capital and entrepreneur (Mudarib) supplies labour. Profit is split by agreed ratio; financial loss is borne by the investor.Investment accounts, venture funds, DAO treasuries
MusharakahPartnershipJoint venture where all partners contribute capital, share profit by agreement and share loss in proportion to capital.Project finance, equity, governance tokens
Diminishing MusharakahPartnershipBank and client co-own an asset; the client gradually buys the bank's share while paying rent on the remainder.Home purchase plans
MurabahaTradeBank buys an asset and sells it to the client at a disclosed cost plus an agreed mark-up, often on deferred payment.Trade finance, asset and vehicle finance
IjarahLeasingThe owner leases an asset for rent. The lessor retains ownership and its risks. Ijarah wa Iqtina ends in transfer of ownership.Leasing, Ijarah Sukuk
SalamTradeFull payment upfront for a specified commodity delivered in the future.Agriculture, commodities
Istisna'TradeOrder to manufacture or construct a specified asset, with flexible payment schedules.Construction, infrastructure, manufacturing
WakalahAgencyAn agent (Wakil) manages funds for a fixed, predefined fee.Investment agency, Takaful operations
Qard HasanBenevolent loanInterest-free loan where only the principal is repaid.Welfare, microfinance, current accounts
TakafulMutual protectionParticipants contribute to a pool on the basis of mutual help (Tabarru'), which compensates members suffering loss.Islamic insurance
SukukCapital marketsCertificates representing proportional ownership of underlying assets, usufruct or projects, rather than a debt claim.Sovereign and corporate funding
WaqfEndowmentA perpetual charitable endowment whose principal is preserved and whose returns fund social causes.Charity, education, the Evergreen DAO
03 — MARKET SIZE

The Global Sharia Economy

Total global Sharia-compliant financial assets stand at approximately $5.98 trillion, while broader Muslim consumer spending across halal sectors reaches an estimated $2.60 trillion annually.

🏦 Islamic Finance Assets: ~$5.98 trillion

Islamic Banking
$4.32T · 72%
Sukuk (Bonds)
$1.03T · 17%
Islamic Funds
$308B · 5%
Other Institutions
$193B · 3%
Takaful (Insurance)
$136B · 2%

🛒 Muslim Consumer Spending: ~$2.60 trillion

  • Halal Food & Beverage: the largest share of consumer expenditure.
  • Modest Fashion: rapid year-over-year retail growth.
  • Halal Travel: rapid year-over-year retail growth.
  • Pharmaceuticals: rapid year-over-year retail growth.
  • Cosmetics: rapid year-over-year retail growth.

📌 Top Global Islamic Economy Leaders

#1 GIEI

🇲🇾 Malaysia

Ranks #1 globally in the Global Islamic Economy Indicator (GIEI) for its advanced regulatory framework and robust Islamic financial ecosystem.

Asset Leader

🇸🇦 Saudi Arabia

Leads in total Sharia-compliant banking assets and large-scale infrastructure Sukuk issuances.

Consumer Scale

🇮🇩 Indonesia

Commands massive consumer scale, backed by rapid growth in halal value chains and domestic Islamic banking integration.

Global Hub

🇦🇪 UAE

A premier global hub for Islamic economy investments, deal flows and fintech innovation.

04 — A DECADE OF GROWTH

The Evolution of Sharia-Compliant Assets

$2.004 trillion was the global benchmark recorded in the State of the Global Islamic Economy Report 2016/17. It represented total Sharia-compliant financial assets at the end of 2015, a 10.5% annual increase on the previous year.

REPORT 2016/17
$2.004T

Global assets cross the $2T mark; Islamic banking accounts for ~$1.45T.

REPORT 2019/20
$2.520T

Driven by steady expansion in the GCC and Southeast Asian Sukuk markets.

REPORT 2023/24
$3.960T

Rapid acceleration as digital Islamic fintech and sovereign green Sukuk take off.

REPORT 2024/25
$4.930T

Saudi Arabia anchors the market as the first country to hold over $1 trillion in national Sharia assets.

REPORT 2025/26 (LATEST)
$5.990T

Near-tripling since 2015, heavily integrated with global ESG investing frameworks.

🔍 Historical vs. Modern Growth Engines

Then (2015)

Growth depended on core retail commercial banking and oil-backed corporate infrastructure bonds (Sukuk).

Now (2026)

Growth is hyper-diversified, driven by:

  • AI-powered automated Sharia equity screening
  • Algorithmic Islamic micro-finance
  • Cross-border digital payment rails
The headline figure appears as both $5.98T and $5.99T in the underlying sources. The difference is rounding between reports.
05 — OUTLOOK

Towards $8.46 Trillion by 2031

By 2031 the global Sharia-compliant finance market is projected to reach approximately $8.46 trillion (Mordor Intelligence), a 10.70% CAGR from 2026 to 2031. That would be more than four times the $2.004 trillion recorded in 2015.

📈 Core Growth Engines

🌳 ESG & Green Sukuk Boom

Shariah compliance aligns naturally with ESG criteria. Green and sustainability-linked Sukuk are gaining institutional traction and attracting non-Muslim ethical investment capital.

📱 Digital WealthTech

The Middle East and GCC Sharia-compliant wealthtech market is growing fast. Automated portfolios, fractional real estate apps and digital onboarding are opening retail investment to a younger, tech-savvy Muslim demographic.

🛡️ Takaful Outpacing Banking

Islamic banking remains dominant at ~70% market share, but Takaful is projected to grow fastest at a 12.80% CAGR through 2031, driven by regulatory updates and mandatory medical and motor insurance laws in the GCC.

🗺️ Regional Targets for 2031

National Strategy

🇦🇪 UAE

In May 2025 the UAE Cabinet approved the Islamic Finance and Halal Industry Strategy 2025–2031, targeting $697 billion in domestic Islamic banking assets and $180 billion in Sukuk issuance by 2031.

Vision 2030

🇸🇦 Saudi Arabia

The anchor of the industry. Capital flows through the Financial Sector Development Program under Vision 2030, holding nearly half of the Middle Eastern Islamic finance market.

Western Hub

🇬🇧 United Kingdom

The UK Islamic finance market is on track to exceed $9.42 billion by 2031, supported by structural tax reforms and strong retail property demand in major cities.

06 — CASE STUDY

🕋 Saudi Electricity Company (SEC) Green Sukuk

SEC executed a landmark international $1.3 billion dual-tranche public Green Sukuk, nearly 4× oversubscribed by more than 260 global institutional investors.

Step 1

The Financial & Sharia Structure: Ijarah

SEC used an Ijarah structure, a Sharia-compliant leasing mechanism.

  • The Asset Link: instead of issuing traditional debt, SEC sold tangible, pre-existing electricity distribution assets to a Special Purpose Vehicle (SPV).
  • The Return: SEC leased those same assets back from the SPV and pays semi-annual rent. This rental income passes to certificate holders as their periodic yield, avoiding interest (Riba) entirely.
Saudi Electricity Company
↓ sells distribution assets
Special Purpose Vehicle (SPV)
↓ issues Sukuk · leases assets back
260+ Sukuk holders receive rent as yield
Step 2

The "Green" Allocation

To keep its green status, 100% of proceeds were legally ring-fenced and channelled into:

  • Refinancing smart meters across the national grid to reduce transmission waste.
  • Funding capital expenditure on grid integration for utility-scale solar and wind projects.
  • External third-party environmental auditing to prove the carbon mitigation achieved.
Sukuk holders own a share of real assets and are paid rent, rather than holding a debt claim that earns interest.
07 — ALGORITHMIC COMPLIANCE

🤖 Digital Wealth Platforms: Automated Sharia Screening

Islamic robo-advisors and apps such as Wahed Invest and Emirates Islamic Digital Wealth screen global equities with algorithmic filters based on AAOIFI (Accounting and Auditing Organization for Islamic Financial Institutions) standards.

Tier 1 · Sector Gate

Qualitative Sector Exclusions

Any company whose core business is a prohibited (Haram) activity is flagged and removed.

  • 🚫 Conventional finance and insurance
  • 🚫 Gambling
  • 🚫 Alcohol and tobacco
  • 🚫 Pork processing
  • 🚫 Adult entertainment
  • 🚫 Defence and weapons manufacturing
⚖️ The 5% Toleration Rule: a company in a permissible industry (e.g. aviation or tech) that earns a small incidental amount from a non-compliant source, such as onboard alcohol sales or minor interest, passes only if that revenue stays under 5% of total income.
Tier 2 · Debt Gate

Quantitative Financial Ratio Screens

A company that passes the sector gate can still be disqualified if its capital structure depends heavily on interest-based debt. Platforms recalculate three ratios every trailing quarter:

Interest-Bearing Debt ÷ 36-Month Avg Market Cap < 30–33%
Interest-Earning Cash & Securities ÷ Market Cap < 30%
Prohibited Revenue ÷ Total Revenue < 5%

Some index providers use Total Assets as the denominator instead of market capitalisation, depending on whether they track Dow Jones Islamic or MSCI Islamic indices.

Tier 3 · Purification

Dividend Purification

If a stock passes both tiers but still has a small (<5%) slice of impure income, the platform calculates a Purification Ratio.

The app tells the investor exactly what percentage of their dividends must be removed and given to charity so the remaining wealth stays halal.

→ Try the purification calculator
08 — INDEX METHODOLOGY

⚖️ Index Strictness: MSCI Islamic vs. S&P Shariah

Both providers aim to isolate halal equities but differ on one critical mathematical choice: the denominator. According to data from the Halal Trading Room, this difference produces a 29.7% disagreement rate across identical pools of global companies.

Balance-Sheet Approach

MSCI Islamic Index

Uses Total Assets as the denominator for its leverage and liquidity calculations.

Market-Value Approach

S&P Shariah Index

Uses a 36-month average market capitalisation as the denominator.

Financial Screen RuleMSCI IslamicS&P ShariahWhich is Stricter?
Total Debt Limit< 33.33% of Total Assets< 33% of 36-Month Avg Market CapS&P Shariah in a market downturn; MSCI in a bull market
Cash & Interest Securities< 33.33% of Total Assets< 33% of 36-Month Avg Market CapMSCI Islamic (total assets are less prone to inflated valuations)
Accounts Receivable< 33.33% (combined with cash)< 49% of 36-Month Avg Market CapMSCI Islamic (caps credit/receivables exposure much lower)
Non-Halal Revenue Limit< 5% of Total Revenue< 5% of Total RevenueTie (aligned on qualitative revenue tolerance)
🏆 Verdict: MSCI Islamic is structurally stricter on liquidity, credit exposure and balance-sheet risk. Because S&P allows receivables up to 49%, companies with large outstanding credit can pass. Market capitalisation can also make a highly indebted company look compliant during an equity bubble. MSCI's asset-based threshold is more rigid and produces tighter portfolios.
09 — PLATFORM LOGIC

💻 Dividend Purification: Python Logic

When a platform such as Wahed or Islamicly flags a company with, say, 2% non-halal revenue, it runs an automated purification calculation. Below is the kind of logic used behind digital wealth platforms to compute the purification amount for each retail account.

purification.py
def calculate_dividend_purification(shares_held, dividend_per_share,
                                    non_permissible_revenue, total_revenue):
    """
    Calculates the exact amount a retail investor must donate to charity
    to purify their dividend payout based on AAOIFI standards.
    """
    # 1. Determine the exact ratio of impure income generated by the firm
    if total_revenue <= 0:
        raise ValueError("Total revenue must be greater than zero.")

    purification_ratio = non_permissible_revenue / total_revenue

    # 2. Assert compliance boundary check (Max tolerance is 5%)
    if purification_ratio > 0.05:
        return {
            "status": "NON_COMPLIANT",
            "msg": "Asset failed Sharia compliance parameters (>5% impure revenue). Divest immediately.",
            "purification_amount": None
        }

    # 3. Compute total gross dividend received by the user account
    total_gross_dividend = shares_held * dividend_per_share

    # 4. Extract the exact proportional dollar value requiring removal
    purification_amount = total_gross_dividend * purification_ratio

    return {
        "status": "COMPLIANT",
        "purification_ratio_pct": round(purification_ratio * 100, 4),
        "total_gross_dividend_received": round(total_gross_dividend, 2),
        "mandatory_charitable_purification": round(purification_amount, 2)
    }

# --- Visualizing an Active Execution Simulation ---
user_portfolio_audit = calculate_dividend_purification(
    shares_held=500,
    dividend_per_share=2.40,
    non_permissible_revenue=4500000,  # e.g., Incidental interest earned on cash reserves
    total_revenue=250000000           # Total gross company revenue
)
print(user_portfolio_audit)
Expected output
{
    "status": "COMPLIANT",
    "purification_ratio_pct": 1.8000,
    "total_gross_dividend_received": 1200.00,
    "mandatory_charitable_purification": 21.60
}

The broker app isolates $21.60 from the user's $1,200.00 payout and instructs the investor to give it to a general public-welfare charity without expecting spiritual reward (it is purification, distinct from Sadaqah given for reward).

🧮 Live Purification Calculator

Same logic as the Python function, running in your browser.

10 — DIGITAL ASSETS

🪙 How Cryptocurrencies Are Screened for Sharia Compliance

Crypto-assets have no traditional corporate balance sheet, so they need their own framework. To decide whether a digital asset is Māl (a valid asset under Islamic jurisprudence), Sharia tech engines and advisory panels such as Amanie Advisors and the Shariyah Review Bureau apply a three-tier technical gate.

Gate 1

Functional Utility vs. Speculative Hype

The Utility Gate: the token must have clear, verifiable utility or economic value in its ecosystem, such as transaction gas, decentralised governance or security staking.

The Meme / Speculation Block: high-risk, zero-utility meme coins and tokens with explicit pump-and-dump tokenomics are flagged as Maysir (gambling-like speculation) or Gharar (excessive, deceptive uncertainty).

Gate 2

Protocol & Smart Contract Intent

The system analyses the protocol's underlying code and deployment architecture.

  • Blocked: tokens powering decentralised lending that mimics conventional banking, where the core mechanism is earning or paying interest (Riba).
  • Widely certified halal: decentralised storage (e.g. Filecoin), smart contract infrastructure (e.g. Ethereum, Solana, Cardano) and interoperability (e.g. Chainlink), because their base utility is technology-driven and value-creating.
Gate 3

Consensus & Staking Yield

Proof of Work & Proof of Stake: both treated as compliant consensus mechanisms.

Staking Yield vs. Usury: staking rewards on PoS chains are classified as a fee (Ujrah) for supplying processing power and capital to secure a network. The staker shares in infrastructure risk, so this is permissible, provided the pool does not route capital into synthetic lending.

11 — WEALTH OBLIGATION

🧮 Automated Zakat Calculation on Equities

Dividend purification cleans impure revenue from a company's operations. Zakat is different: an annual obligatory 2.5% levy on qualifying wealth to support vulnerable communities. When apps such as Thndr calculate a user's Zakat on stocks, the backend follows different paths depending on the investor's intention.

User Portfolio
↓
Is the intention short-term or long-term?
↓
Short-Term Trader
↓
Full liquidation value
(Shares × Market Price)
↓
Apply 2.50% (lunar) or 2.577% (solar)
Long-Term Investor
↓
Net Zakatable base via proxy method
↓
Apply 25% pro-rata proxy formula (see note on 10%/25%)
↓
Final Zakat Owed ($)
Method A

Short-Term / Active Trader Route

If the user trades actively, holding stocks for quick capital gains, the equity is treated like liquid business inventory (trade goods).

Zakat Owed = (Total Shares × Current Market Price) × 2.5%

The app values the holding at the close of the user's personal Zakat anniversary date and applies the levy to the full liquidation value.

Method B

Long-Term / Passive Investor Route

For long-term holdings, taxing the full market value every year is unfair because much of it reflects the company's illiquid, non-zakatable assets such as plants, machinery and land. Platforms use the Quick Proxy Method from Islamic Finance Guru and AAOIFI standards:

  • Scan the company's latest balance sheet for Net Zakatable Assets (Current Assets − Short-term Liabilities).
  • If the data isn't available through the app's API, apply a standard 25% proxy, assuming a quarter of a typical blue-chip firm's value is liquid zakatable assets such as cash and receivables. The source flow also references a 10% variant.
Zakatable Base = Portfolio Market Value × 25%
Final Zakat Owed = Zakatable Base × 2.5%

🌙 The Calendar Accounting Adjustment

Hijri · 354 days

Lunar Accounting

2.500%

Applied to the asset base on the Islamic lunar year.

Gregorian · 365 days

Solar Accounting

2.577%

Adjusted upward to account for the extra 11 days of accumulated wealth.

🧮 Live Zakat on Equities Calculator

Zakat is due only when wealth meets the Nisab threshold and has been held for a full year. Please consult a qualified scholar for your personal circumstances.

12 — WEB3 GOVERNANCE

🏛️ The Islamic Decentralised Autonomous Organisation

An Islamic DAO is a blockchain-native entity where governance, treasury distributions and venture investments are managed by automated smart contracts, bypassing traditional corporate boards while following Shariah. To stay compliant it must systematically eliminate Riba, Gharar and Maysir from its governance and asset protocols.

Architecture

DAO Community / Token Holders
↓ submits investment proposal
On-Chain Sharia Advisory Board
↓ does it pass Sharia audit?
✔ YES
↓
Public Voting
↓
Multi-Sig Execution
✘ NO
↓
Proposal Rejected / Code Blocked

The On-Chain Sharia Gate

Unlike standard DAOs where any token holder can propose an action, all financial proposals pass through a Sharia Advisory Smart Contract. It requires cryptographic signatures from certified Islamic scholars who audit the project before it reaches a community vote.

The Governance Token (Musharakah)

Governance tokens act as equity shares in a digital partnership. Holders get voting rights on treasury allocations and a proportional share of ecosystem profits, not a fixed, interest-like return.

The Multi-Signature Treasury

The treasury wallet is locked behind a multi-sig smart contract. Funds are released only when a predefined consensus threshold is met by both the community vote and the Sharia compliance auditors.

💼 Treasury Management & Sharia Yield Mechanisms

Standard Web3 treasuries often earn yield by lending into liquidity pools such as Aave or Compound. That is Riba, so an Islamic DAO uses alternatives:

1

Tokenised Mudarabah

The DAO treasury (Rab-al-Maal) injects capital into a Web3 project or startup (Mudarib). Profits are split by a pre-agreed percentage; financial losses fall entirely on the treasury, a true risk-sharing structure.

2

Decentralised Wakalah

The community appoints an expert or an automated sub-DAO as agent (Wakil) to manage part of the treasury for a flat fee, investing in halal real-world assets such as tokenised real estate or green infrastructure bonds.

3

Crypto-Sukuk Issuance

To raise capital without interest-bearing debt, the DAO mints Crypto-Sukuk representing fractional ownership of a revenue-generating asset in its ecosystem, such as a decentralised data centre or validator node pool.

🛑 Automated Compliance Challenges in Web3

The Liquid Staking Dilemma: native protocol staking (e.g. staking ETH to secure Ethereum) is compliant, but liquid staking derivatives such as Lido's stETH complicate things. The underlying pools sometimes route capital through algorithmic lending layers that touch interest-based protocols.
Flash Loan Exploits as Gharar: flash loans let users borrow millions with no collateral if repaid in the same block. Many scholars view flash-loan arbitrage as Gharar or market manipulation, so Islamic DAOs explicitly blacklist flash-loan entry points in their contracts.
13 — REAL-WORLD CASE STUDY

🌐 The Evergreen DAO (HAQQ Network)

The most prominent real-world Islamic DAO framework is the Evergreen DAO, built natively on the HAQQ Network, an ethics-first, Ethereum-compatible Layer-1 blockchain powered by its native token, Islamic Coin ($ISLM). It enforces Shariah principles through on-chain mechanics rather than corporate promises.

Mechanism 1

Anti-Inflationary Minting Engine

$ISLM cannot be printed at will. It is minted only programmatically through network validators and stakers at a strictly announced, predetermined rate.

Mechanism 2

The 10% Endowment Mandate

Every time a block is validated and new $ISLM is minted, the smart contract diverts exactly 10% of issuance into the Evergreen DAO treasury, a decentralised crypto endowment (Waqf) funding Islamic internet ventures, community tech infrastructure and verified charities.

Mechanism 3

The Shariah Oracle Gate

An on-chain registry that keeps the DAO away from scams, interest-bearing projects and gambling apps. Any smart contract wanting a marketplace listing must pass a two-level check: a community vote and a Sharia Board approval signature.

Other emerging projects include the MRHB Network (a full-stack halal DeFi ecosystem) and inshAllah Finance (a Solana-based, interest-free borrowing engine with low liquidation penalties).

📜 Smart Contract Logic: Profit-and-Loss Sharing (Mudarabah)

A true autonomous Mudarabah cannot promise a fixed interest return. The contract must pool funds, calculate net venture returns, check whether a loss occurred and distribute capital strictly by the agreed profit-sharing ratio.

ShariaMudarabahPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract ShariaMudarabahPool {
    address public immutable investor;      // Rab-al-Maal (Capital Provider)
    address public immutable entrepreneur;  // Mudarib (Venture Manager/DAO Agent)

    uint256 public capitalProvided;
    uint256 public constant MUDARIB_PROFIT_SHARE_PCT = 30; // 30% to Agent, 70% to Investor

    enum State { Funding, Active, Closed }
    State public poolState;

    event VentureClosed(uint256 finalBalance, uint256 profitAllocated, uint256 lossSustained);

    constructor(address _entrepreneur) payable {
        require(msg.value > 0, "Capital must be provided to initiate.");
        investor = msg.sender;
        entrepreneur = _entrepreneur;
        capitalProvided = msg.value;
        poolState = State.Active;
    }

    /**
     * @notice Closes the venture and settles funds strictly using Sharia risk-sharing rules.
     */
    function settleVenture() external payable {
        require(poolState == State.Active, "Pool is not active.");
        require(msg.sender == entrepreneur, "Only the Mudarib can submit final venture returns.");

        // The contract evaluates total revenue sent back by the business execution layer
        uint256 finalVentureBalance = address(this).balance;
        poolState = State.Closed;

        if (finalVentureBalance > capitalProvided) {
            // --- CASE A: PROFIT GENERATED ---
            uint256 totalProfit = finalVentureBalance - capitalProvided;

            // Calculate proportional split based on pre-agreed ratios
            uint256 entrepreneurReward = (totalProfit * MUDARIB_PROFIT_SHARE_PCT) / 100;
            uint256 investorReturn = capitalProvided + (totalProfit - entrepreneurReward);

            emit VentureClosed(finalVentureBalance, totalProfit, 0);

            // Execute transfers
            payable(entrepreneur).transfer(entrepreneurReward);
            payable(investor).transfer(investorReturn);

        } else {
            // --- CASE B: CAPITAL LOSS SUSTAINED ---
            uint256 lossSustained = capitalProvided - finalVentureBalance;

            // Sharia Law Rule: Financial loss is borne entirely by the capital provider.
            // The Entrepreneur receives zero profit payout for their spent labor/time.
            emit VentureClosed(finalVentureBalance, 0, lossSustained);

            payable(investor).transfer(finalVentureBalance);
        }
    }
}
Zero Usury

No Interest Accrues

If finalVentureBalance stays exactly flat, no interest accumulates; the investor simply receives their remaining capital.

Risk-Sharing

Loss Safeguard

In the else branch, if the venture fails or loses money, the entrepreneur (Mudarib) receives no financial reward. The investor absorbs 100% of the write-down while the entrepreneur loses their uncompensated labour and time, matching classical Islamic accounting.

Illustrative code: a production deployment should be independently audited, use pull-payments or call instead of transfer, and add reentrancy protection.
14 — REFERENCE

Glossary of Shariah Terms

RibaUsury or interest; any guaranteed increase on a loan.
GhararExcessive uncertainty or ambiguity in a contract.
MaysirGambling or pure speculation.
Halal / HaramPermissible / prohibited.
MālA valid asset of value under Islamic jurisprudence.
Maqasid al-ShariahThe higher objectives of Islamic law.
Rab-al-MaalCapital provider in a Mudarabah.
MudaribManaging entrepreneur in a Mudarabah.
WakilAgent acting under a Wakalah contract.
UjrahFee or wage for a service, e.g. staking rewards.
ZakatObligatory annual 2.5% levy on qualifying wealth.
NisabMinimum wealth threshold above which Zakat is due.
SadaqahVoluntary charity.
WaqfPerpetual charitable endowment.
TakafulCooperative Islamic insurance.
SukukAsset-backed Islamic investment certificates.
Tabarru'Donation into a mutual Takaful pool.
AAOIFIAccounting and Auditing Organization for Islamic Financial Institutions.
GIEIGlobal Islamic Economy Indicator.
HijriIslamic lunar calendar (354 days).
SOURCES

References

Sources cited in the underlying research notes.