I Am a Software Developer on a Leveraged Forex and CFD Trading Platform. Is My Work Permissible?


Answered by Shaykh Faraz Rabbani

Question

I built a white-label trading platform that supports leveraged forex and contracts for difference. I never trade, take no share of the revenue, and earn a fixed salary. Is my work lawful, and does building the features that place these trades make me an assistant in unlawful transactions?

Answer

In the name of Allah, the Most Merciful, the Most Compassionate.

Your work is lawful in every part of the platform where no unlawful transaction occurs, and unlawful in any module that allows a user to open or finance a leveraged forex position or a contract for difference (CFD). That you never trade and take no cut of the revenue is honest, but the school draws its line at the thing built, not at your hands.

What Is Actually Wrong with These Two Products

The products do not share one defect. A leveraged position is bought with money the broker lends you, and the overnight swap fee you named is the charge on that loan. That is interest (riba), whatever the product sheet calls it. Currency exchange also requires a real taking of possession of both sides [al-Mawsuʿa al-Fiqhiyya al-Kuwaytiyya 26:351], and a leveraged position takes possession of neither. A CFD is worse placed still: nothing is delivered, neither party owns what the price is quoted on, and the contract settles a movement in a number. That is excessive uncertainty (gharar), and, in many treatments, a wager rather than a sale.

Allah Most High commands mutual help in piety and godfearingness, “and do not aid one another in sin and transgression.” [Quran 5:2; Keller, The Quran Beheld] Ibn Nujaym (Allah have mercy on him) gives two rules side by side: “what is unlawful to take is unlawful to give,” and “what is unlawful to do is unlawful to ask for.” [Ibn Nujaym, al-Ashbah wa al-Nazair 1:132] Building the machinery of an unlawful transaction falls under the same principle, though degrees matter: writing that engine is not the same as fixing the company’s login screen.

The Hanafi test is whether the disobedience subsists in the thing itself [Ibn Abidin, Radd al-Muhtar 6:391]. Timber sold to a man who will make musical instruments carries no dislike, “unlike the sale of a weapon to the people of sedition, because the disobedience subsists in the thing itself, and that is the aiding in sin.” [al-Mawsuʿa al-Fiqhiyya al-Kuwaytiyya 9:212] Timber becomes a lute or a roof beam, and the man who sold it aided neither. A weapon handed to men already at war is the thing itself.

Your interfaces, account management, reporting, and the order flow for shares and ETFs are timber. An engine written so that a user can open or finance those positions is not a general facility that some customers misuse. It is the facility. Only you can say which of your tickets fall where, and by your own description, your work has been landing on both sides. That you could have written the same code for something lawful is an argument about your intention, not about what the module does. Cryptocurrencies, copy trading, funded accounts, and algorithmic execution need their own question.

Sort Your Tickets, Then Ask to Be Moved

Put your tickets in two columns: the leveraged forex engine, the CFD order and settlement path, and anything posting swap or financing charges in one; everything else in the other. Stop taking work from the first column now. Ask your lead in writing to be assigned off it, and keep earning on the second one in the meantime. Platform companies move developers between modules all the time, so this is an ordinary request.

If you are refused, set a horizon and not a mood: three months to be moved or to have another offer in hand. I know what that asks of a family that eats from this salary, and you do not sin by taking the time it needs. The money already paid to you is a separate question; this answer does not settle; send it on its own. If your visa is tied to this employer, say so, because that changes what is reasonable to ask of you. Take heart from where the line fell: most of this platform and all of your skill sit on the lawful side of it, and a developer who can build a trading engine has more doors open to him than he has time to walk through.

And Allah knows best.

Faraz Rabbani

Related Answers

Shaykh Faraz Rabbani is a recognized specialist scholar in the Islamic sciences, having studied under leading scholars from around the world. He is the Founder and Executive Director of SeekersGuidance.Shaykh Faraz stands as a distinguished figure in Islamic scholarship. His journey in seeking knowledge is marked by dedication and depth. He spent ten years studying under some of the most revered scholars of our times. His initial studies took place in Damascus. He then continued in Amman, Jordan. In Damascus, he was privileged to learn from the late Shaykh Adib al-Kallas. Shaykh Adib al-Kallas was renowned as the foremost theologian of his time. Shaykh Faraz also studied under Shaykh Hassan al-Hindi in Damascus. Shaykh Hassan is recognized as one of the leading Hanafi jurists of our era. Upon completing his studies, Shaykh Faraz returned to Canada in 2007. His return marked a new chapter in his service to the community. He founded SeekersGuidance. The organization reflects his commitment to spreading Islamic knowledge. It aims to be reliable, relevant, inspiring, and accessible. This mission addresses both online and on-the-ground needs. Shaykh Faraz is also an accomplished author. His notable work includes “Absolute Essentials of Islam: Faith, Prayer, and the Path of Salvation According to the Hanafi School.” This book, published by White Thread Press in 2004, is a significant contribution to Islamic literature. His influence extends beyond his immediate community. Since 2011, Shaykh Faraz has been recognized as one of the 500 most influential Muslims. This recognition comes from the Royal Islamic Strategic Studies Center. It underscores his impact on the global Islamic discourse. Shaykh Faraz Rabbani’s life and work embody a profound commitment to Islamic scholarship. His teachings continue to enlighten and guide seekers of knowledge worldwide.