⛓️ On-Chain Islamic Finance · Base Blockchain

The first Murabaha Smart Contract
on Blockchain

Qist implements the Islamic Murabaha installment sale entirely on the Base blockchain. Buy ETH or BTC at a fixed, halal markup - paid monthly in USDC. No bank. No riba. No intermediary.

Smart Contract (permanent proxy)
0xb2275E4aA2724D875a1a00206b40dD0fF188DEd5
Base Mainnet · Chain ID 8453 View on BaseScan ↗

What is a Murabaha Smart Contract?

Murabaha (Arabic: مرابحة) is an Islamic finance contract in which a seller discloses the cost of an asset and adds a transparent, pre-agreed profit margin. The buyer repays the total in installments - no interest, no compounding, no riba.

Qist moves this centuries-old contract onto the blockchain. Instead of a bank or Islamic finance institution as intermediary, a UUPS upgradeable smart contract on Base handles every step: asset custody, instant delivery to the buyer, payment scheduling, and collateral management. Everything is immutable, auditable, and permissionless.

// Simplified Qist Murabaha contract logic function buyOffer(uint256 offerId, uint256 quantity, uint256 installments) external { Offer storage offer = offers[offerId]; // Seller must own the asset - no short-selling (Islamic requirement) require(offer.assetAmount >= quantity, "seller must hold asset"); // Fixed total price known upfront - no variable interest uint256 totalPrice = computeTotalPrice(offer, quantity, installments); // Transfer asset to buyer immediately - real possession (qabd) _transferAsset(offer.asset, msg.sender, quantity); // Lock USDC collateral (110-200%) - surplus always returns to buyer _lockCollateral(msg.sender, totalPrice * collateralRatio / 10000); }

Five Sharia Principles Enforced in Code

These are not policies - they are hard-coded constraints the contract cannot violate:

01
Real Ownership (Milkiyyah)
The seller's asset balance is checked on-chain. No selling what you don't own.
02
Known Price (No Gharar)
Total price and all installments are fixed at contract creation. Zero hidden fees or variable rates.
03
Instant Delivery (Qabd)
ETH or BTC transfers to the buyer's wallet in the same transaction as the contract signing.
04
No Penalty Interest (Rifq)
Late payments trigger a 3-day grace period - never additional interest or compounding charges.
05
Fair Collateral (Adl)
Any collateral surplus after liquidation is always returned to the buyer. Taking the excess is prohibited.

Qist vs. Standard DeFi Lending

Standard DeFi Lending
(Aave, Compound)
  • Variable interest rate (APY) = riba
  • Loan in cash - no asset sale
  • Liquidation based on price drop
  • Compounding penalties on late payment
  • Not Sharia-compliant
Qist Murabaha Smart Contract
  • Fixed profit margin - agreed upfront
  • Asset sale - buyer receives ETH/BTC
  • Liquidation only on payment default
  • Grace period before any liquidation
  • Sharia-compliant (Murabaha)

How the Smart Contract Works

Network: Base Blockchain (Ethereum L2)

Base is an Ethereum Layer-2 by Coinbase, offering gas fees under $0.01 per transaction. Low fees make monthly USDC installments economically viable - a critical requirement for micro-finance use cases that would be cost-prohibitive on Ethereum mainnet.

Contract Architecture: UUPS Proxy

The contract uses a UUPS (Universal Upgradeable Proxy Standard) pattern from OpenZeppelin. The proxy address 0xb2275E4aA2724D875a1a00206b40dD0fF188DEd5 is permanent - users always interact with the same address. The implementation can be upgraded by the owner (a 2-of-3 Safe multisig) to fix bugs or add features, without disrupting active positions.

Price Oracles: Chainlink

Collateral ratios and liquidation thresholds are computed using Chainlink price feeds for ETH/USD and BTC/USD. This ensures collateral assessment is based on tamper-proof, decentralized market prices.

Payment Token: USDC Stablecoin

Installments are denominated in USDC, not ETH, to eliminate price uncertainty (gharar) in the payment amount - a core Sharia requirement that the repayment value be known at contract inception.

Automation: Chainlink Automation

Sellers can optionally enable automatic installment collection and auto-liquidation via Chainlink Automation, removing the need for manual intervention while keeping every action transparent and on-chain.

Frequently Asked Questions

What is a Murabaha smart contract?
A Murabaha smart contract is an on-chain implementation of the Islamic cost-plus financing contract. A seller deposits a real asset (ETH/BTC), a buyer agrees to a fixed total price paid in USDC installments, and the smart contract handles custody, delivery, payment scheduling, and collateral - replacing the role of an Islamic bank with transparent, open-source code on the Base blockchain.
How is Qist different from conventional DeFi lending?
DeFi lending (Aave, Compound) gives you a cash loan with an interest rate (riba). Qist is a sale protocol: you buy a real asset at a pre-agreed fixed markup. No interest rate, no APY, no compounding. The buyer receives ETH/BTC immediately upon contract signing - not cash. This structural difference is why Murabaha is halal and conventional DeFi lending is not.
Is Qist's contract audited and open source?
The contract is deployed and verified on BaseScan at 0xb2275E4aA2724D875a1a00206b40dD0fF188DEd5. The source code is open-source on GitHub. A formal security audit is planned before the public launch. The contract uses audited OpenZeppelin libraries (UUPS proxy, ReentrancyGuard, SafeERC20).
Who controls the Qist smart contract?
Governance is a 2-of-3 Safe multisig wallet at 0x64D738021BAe4cb9a7fd82529C2F94f61d404064. Any upgrade to the implementation contract or change to protocol parameters requires 2 of 3 key holders to sign. This prevents single-key compromise from affecting user funds.
Can Qist be used without a bank account or KYC?
Yes. Qist is a fully permissionless DeFi protocol. Any wallet on Base can interact with the smart contract - no KYC, no account creation, no approval required. You need ETH for gas (~$0.01/tx) and USDC for installments. This makes Sharia-compliant financing accessible to the 1.8 billion Muslims globally, including those without access to Islamic banking.

Related Pages