A smart contract is self-executing code deployed on a blockchain that automatically carries out an agreement's terms when its conditions are met, without needing a bank, escrow agent, or other intermediary to enforce it. Ethereum popularized the concept and remains the largest smart-contract platform, though most modern Layer 1s support them.
What they actually do
A smart contract can hold funds, transfer tokens, mint new assets, or trigger other contracts — all automatically, based on logic written into the code. A simple example: a smart contract could hold two parties' funds in escrow and release them to the correct party the moment both sides confirm a trade, with no need for either party to trust the other, or a third party to arbitrate. This is the underlying mechanism behind almost everything in DeFi — lending pools, decentralized exchanges, staking contracts, and liquidity pools are all smart contracts.
Why it matters for Shariah screening
A smart contract is a mechanism for enforcing an agreement, not a determination of what that agreement is — the same transaction can be structured as interest-bearing lending (riba) or as a genuine profit-sharing partnership (Musharakah) using smart contract code either way. What matters for compliance is the underlying economic logic the code implements: is a return guaranteed regardless of performance, or genuinely variable and risk-shared? Is the contract's behavior transparent and auditable, or does it carry hidden logic that only surfaces after deployment? A security audit confirms the code does what it claims; it doesn't by itself confirm what it claims to do is Shariah-compliant — those are two separate questions our methodology assesses independently.