1. Time Mechanisms in Smart Contracts
Smart contracts operate on the blockchain and do not have a human concept of 'now'. Instead, they execute based on predefined conditions. A smart contract does not 'wait'; it checks its state when called. Execution occurs only when triggered by an external user or another contract. In Qist, we use the block timestamp (block.timestamp) as a reliable time reference without needing a third party. When all sale or payment conditions are met, the contract produces a new commitment.
2. The 3-Day Grace Period: The Time Trigger
In Qist, the 3-day grace period is a key condition. The smart contract starts counting from the moment the sale contract is activated (when the asset is deposited and ownership transferred). The start time is stored as a variable. After 3 days (259,200 seconds), the buyer can make the remaining payment or the seller can claim the asset back if payment is late. Execution is not automatic but through calling functions like 'pay()' or 'claim()' that check if sufficient time has passed. This design provides flexibility and adheres to the 'grace period' principle in Shariah.
3. How the Contract Avoids Riba and Gharar via Timing
Riba (interest) is prohibited in Islamic finance, so Qist does not charge late fees. The contract maintains the original price throughout the grace period. If the period ends, the seller can only reclaim the asset, not additional money. Gharar (uncertainty) is prevented by precise timing. The contract uses block.timestamp, which is agreed upon by all network nodes, eliminating ambiguity. When time lapses, execution conditions (like 'has 3 days passed?') are clear and indisputable.
4. The Role of 'Suspended Condition' in Islamic Contract
In Islamic jurisprudence, contracts include suspended conditions (shurut) that defer execution. In Qist, the 'passage of 3 days' is a suspended condition for the seller's option to rescind the contract. The smart contract stores this condition as a boolean variable. When a function is called, it checks whether time has passed by comparing the current timestamp with the start time. If the condition is met, the function executes; otherwise, it is rejected. This accurately simulates the 'suspended condition' concept in fiqh while maintaining transparency.
5. How Qist Implements That
In a Qist contract, when an asset is purchased in installments, the contract records the start time (block.timestamp). Each payment period is 3 days. The buyer can make payments anytime within the grace period. After the period expires, they cannot pay (unless an extension is agreed via a frontend). The contract checks time on each call via a modifier like 'onlyAfterStart(3 days)'. Payment or return is executed only when time and other conditions (like correct amount) are met. The contract code is verified on BaseScan for integrity.
About the author
- التمويل الإسلامي اللامركزي على Base — بدون بنك، بدون وسيط، بدون ربا. https://qist.info
Comments
Join the discussionNo comments yet. Be the first to comment.