Skip to content

Maqāṣid & the ḥiyal ceiling

A riba spec will not compile. But a formally valid contract whose purpose is to circumvent riba, taḥāyul al-murābaḥa ʿalā al-ribā, is a different matter entirely. Intention is not syntactic. It cannot be settled by a rule over the shape of a contract. This page documents the deliberate ceiling the engine places on itself: the maqāṣid / ḥiyal-risk layer (maqasid.rs), the one place it warns and never rules.

The layer runs over a checked spec and emits warnings only, Diagnostic::warn, never an error, and never blocking codegen. A warning flags a form-compliant contract whose maqṣad a qualified scholar should examine, the classic site of ḥiyal (legal stratagems). An empty result is not a ruling that the maqṣad is sound. It means only that no known pattern matched.

Code Fires on What it surfaces
MAQASID-1 tawarruq even when each leg is valid and the onward sale is to a genuine third party, the maqṣad may be pure cash-financing dressed as trade. A scholar should confirm a real need for the commodity, and that this is not organised tawarruq in substance.
MAQASID-1 murabahah murābaḥah can become taḥāyul al-murābaḥa ʿalā al-ribā where the markup merely tracks a prevailing interest rate. A scholar should confirm the buyer genuinely wanted the good and that the markup is a real trade profit, not interest by another name.
MAQASID-2 musharakah_mutanaqisah sound by construction, but if the rent is, in substance, calibrated to return the financier’s capital at a fixed yield rather than to price the living share’s usufruct, the partnership drifts toward a disguised interest-bearing loan. A scholar should review the rent’s economic basis.

These are the historic homes of circumvention: sale-based financing, where each leg can be valid while the substance is pure financing. The engine names them. It does not judge them.

It would be easy, and wrong, to let the compiler rule on intent. That is the boundary described in the third paper, beyond the bilateral contract. The engine polices form, meaning consistency with a cited rule-base; the maqṣad, and the question of ḥiyal, are the faqīh’s. Ibn al-Qayyim wrote at length in Iʿlām al-Muwaqqiʿīn on the ḥiyal, and al-Shāṭibī in al-Muwāfaqāt on the maqāṣid. Discerning purpose behind a permissible form is the work of a trained jurist, not a predicate over syntax.

So the engine does the most honest thing a machine can do here. In the spirit of al-umūr bi-maqāṣidihā, “matters are by their intentions,” the first of the five great qawāʿid, it surfaces the question it cannot answer, and hands it to the one who can.

A further ceiling: the ring the engine was never shown

Section titled “A further ceiling: the ring the engine was never shown”

The bundle graph check (INAH-1/INAH-2) proves bay’ al-’inah and organized tawarruq absent from the legs a bundle declares. It cannot prove a ring absent from legs it was never shown. A financier who structures an organized-tawarruq ring across several institutions — so that no single submitter’s bundle contains the whole cycle — defeats the graph search by construction, not by any flaw in the cycle enumeration. Two things follow from taking that seriously rather than quietly overselling the graph check:

  • BUNDLE-2 (error): a bundle must declare meta { completeness_attestation: "…"; }, an attributed claim that the submitter has represented every leg known to them. A cycle-free verdict without this is not a verdict — it is silence about what might have been left out, from someone unnamed. With it, “no ring found” is at least a falsifiable claim attached to a party.
  • MAQASID-3 (warning): a party who takes on a deferred debt for an asset with no disposal of that asset declared anywhere in the bundle is flagged. This is the topological signature a hidden ring’s remainder would leave — and equally the signature of an ordinary end consumer who simply keeps what they bought. The engine cannot tell those apart, so it warns, and leaves the question to a scholar or auditor rather than guessing.

Neither mitigation makes concealment impossible. Both raise its cost: hiding a ring now requires a false attestation, which is a specific, falsifiable claim by a specific party — discoverable and attributable if the true graph later surfaces — rather than an unclaimed silence nobody said anything false about.