Shariah Compliance Methodology, in Plain Terms
keel's compliance is designed so that every ruling it enforces is written down, sourced, and supplied by you — the operator. Nothing religious is inferred, defaulted, or hidden in code. This page explains that model in plain language; the fiqh basis document is the authoritative statement, ruling by ruling.
What the framework asks of money
Shariah governance of finance comes down to four prohibitions and one obligation. Riba — interest: money cannot earn money by itself, and a return has to come from bearing real risk in real activity, not from lending at a guaranteed rate. Gharar — excessive uncertainty: contracts must be clear, and you cannot sell what you do not own or have not taken possession of. Maysir — gambling: no zero-sum wagering presented as investment. Prohibited sectors — alcohol, pork, gambling, the adult industry, weapons, conventional interest-based finance. And zakat, an annual levy of about 2.5% on idle wealth — an obligation to redistribute rather than a restriction.
What survives is unremarkable: own real assets, take genuine risk for genuine return. No leverage, no shorting, no derivatives, no selling what you do not hold. In practice this makes keel more conservative than a standard brokerage account, not less — it rules out most of the instruments that failed in 2008.
Computed facts vs attested classifications
Some things about an asset are knowable from the market, and those are simply computed. Others are not. Whether a token's core purpose is a haram sector, whether it is asset-backed ('ayn) or a claim on a debtor (dayn), whether it pays a riba-like yield — these are questions of fact and scholarship about the world. No module in the repository derives them from candle data, and none pretends to. A human records them, with a source and an attributed name. keel then enforces that record deterministically and rejects anything unattested.
The per-(venue, product) attestation model
An attestation is scoped: it names the venue and the product, carries a source, and is attributed to a name. Two operators following different schools can hold different attestations and get different answers from the same code — by design, because the ruling lives in your attestation, not in the code.
The same model covers the venue itself. Rail 14 refuses live BUYs until the operator attests the venue subscription. Rail 17 encodes §65.4 qabd, the doctrine of constructive possession: an asset that cannot be withdrawn may never have been validly possessed. So withdrawal capability is attested and enforced, not assumed.
Three kinds of rules — and where your bank fits
Can you use keel if your bank pays or charges interest? Yes — keel never touches your bank. It operates on one trading account and has no connection to, visibility of, or authority over anything your bank does. The sharper question is where each rule lives, and there are exactly three places:
What you supply: the classifications — is this asset's sector permissible, is it an owned thing ('ayn) or a claim on an issuer (dayn), does it pay a yield. The ruling is an input you record; keel is not a fatwa engine and never derives one.
What the engine enforces mechanically: these are invariants, not opinions. A buy may only spend an already-settled balance already sitting in the trading account — never a linked bank — and a balance the engine cannot read is a trade refused rather than attempted. Silence is not consent to spend.
What it cannot verify, and the remedy: a venue may pay interest inside the account itself — Coinbase's USDC Rewards on idle balances. The trading API exposes no rewards switch, so this cannot be automated, and a config flag claiming "rewards disabled" would be a comforting lie, so there isn't one. It is a required manual step in the operator runbook. When interest does accrue, it is counted: the purification ledger reports the amount that must be given away rather than kept. Moving the money is the operator's act, never the software's.
Purification and the spot-only shape
keel is long-only spot with no leverage, no shorting, and no derivatives; position sizing uses actual cash, so no riba enters through the position itself. Where an obligation cannot be enforced by code, it is stated rather than waved away. Account-level duties no rail can see — chiefly, disabling USDC rewards on idle balances — are the operator's to verify. The operator runbook lists them.
The command that matters
keel assets attest Record a Shariah classification — with a source and an attributed name — that keel then enforces deterministically.
What keel does not do
- It is not a fatwa and cannot produce one. keel never derives a Shariah classification from market data; it enforces the ruling you supply.
- It is not financial advice and not religious (Shariah) advice.
- No scholarly review of keel's fiqh basis has occurred. The basis is one operator's sourced reading, published so it can be audited and challenged; until a review happens, the status is: not reviewed.
- Attestation is the operator's act and the operator's responsibility. keel is the enforcement machinery, not the authority.
- It does not promise profit. No shipped rule family is net positive at the taker fee actually paid, and the reference benchmark is simple DCA.
Is this “Shariah law”?
The phrase is used as a scare tactic in some places, and the word doing the damage is law — which implies something imposed on other people. keel is the opposite: one person constraining his own trading, using software that refuses to let him make a convenient exception later. Nobody's conduct is governed but the operator's own.
No ruling is embedded anywhere in the software. Two operators following different schools of thought get different results from identical code, because the ruling is an input you record, not an output you receive. The honest description is a compliance engine that happens to have been built for one ethical framework.
For perspective: the usury prohibition was Christian doctrine for roughly a thousand years — it runs through Aquinas, the Third Lateran Council, and centuries of canon law, and the same rule appears in Deuteronomy. Islam retained a prohibition Europe relaxed for commercial rather than theological reasons. It is not a foreign import; it is a road not taken.
The honest result, stated first
No shipped rule family is net positive at the taker fee actually paid on Coinbase — about 1.2% on each side of a trade. Every signal rule keel ships has now been measured at its shipped defaults across 24 assets, re-run on v0.16.0 and priced at what each asset's own book plausibly costs: 0 of 240 configurations cleared. Not one, at the fee this account actually pays.
Fees are not the whole cost, and we had been understating the rest. keel prices each asset's spread from its own liquidity — and when we finally measured that against the universe, not one of the 24 assets trades at the 5 basis points our earlier numbers assumed. The range is 1.1 to 36.8 times that floor, with a median near ten times it. Charged honestly, the median result across the matrix drops by 0.09 and the one configuration that had looked positive disappears. The error in our own cost model was larger than the best genuine improvement any rule change of ours has produced.
That correction reaches a claim this page used to make, so we are withdrawing it here rather than quietly editing it. We said the rules sit at break-even inside the venue's fee-free monthly allowance — a 14.9% win rate against a 14.88% break-even. That 14.88% was computed at the 5 basis points nothing actually trades at. Re-derived at the spread the assets are actually assumed to pay — a median ten times that floor — break-even inside the allowance is 20.5%, against the same 14.9% win rate. Roughly five and a half points underwater, inside the window we used to call break-even. The allowance is still the single largest term in the result, worth around 14 points of break-even — more than any change we have made to a rule. It is the boundary between decisively negative and clearly negative, not between negative and profitable.
The point of this project is the enforcement machinery and the honest measurement of what runs through it, not a claim of profit. Every result is compared against a simple buy-every-period (DCA) benchmark, and the reference rules currently do not beat it after fees. We would rather you know that on the front page than discover it yourself. And we are working hard to improve the results of the algorithms and the strategies. We will report our progress here.
Primary sources
-
The fiqh basis (docs/fiqh-basis.md)
The Shariah reasoning keel encodes, ruling by ruling, each with its in-repo source.
-
Scholarly review status
What a scholarly review would cover, what it would and would not signify — and the standing status: not reviewed.
-
The honest result — experiment record
No shipped rule family is net-positive at the taker fee actually paid; every number stated.
-
The glossary (docs/glossary.md)
The single source for the vocabulary — fiqh terms are anchored, never authored.