🚚
Gulf Trade Finance MURABAHA Cost-plus trade finance Β· s0sta.com/murabaha
β€”
πŸ“

Request Financing

πŸ“’

The Trade Book

loading…

no trades yet

βš™

Actions

πŸŽ“

How this dApp works

πŸ‘£

How to use

  1. Connect your wallet with the top-right Connect Wallet button β€” the dApp runs on the Sepolia testnet (chain id 11155111), so switch your wallet to Sepolia first.
  2. (First run) If the setup banner appears, paste the deployed MurabahaFinancing book address and press Use this book; you can also change address/network in βš™ Settings and press Save & reload.
  3. Request financing in the Request Financing card: fill supplier, guarantor, cost price (AED-S), markup (≀ 50% of cost), number of installments and the asset, then press Request trade.
  4. Approve & fund β€” in the Actions card, type the trade id shown in The Trade Book. The Shariah board presses Shariah approve, then the financier presses Pay supplier.
  5. Confirm delivery β€” the buyer presses Confirm delivery once the goods arrive; repayment starts only after delivery.
  6. Repay β€” the buyer (or guarantor) presses Pay installment each period. Prepay the remainder at a discount with Settle early (rebate); if payments lapse, anyone can Mark default and the financier can Recover to me.
β›“

The process - what happens on-chain

  1. MurabahaFinancing.requestTrade() stores the supplier, guarantor, cost price, fixed markup, installment schedule, invoice hash and asset description, and sets the trade to Requested (markup capped at 50% of cost).
  2. MurabahaFinancing.approveTrade() β€” only a SHARIAH_ROLE holder (enforced by AccessControl) may move the trade to Approved.
  3. MurabahaFinancing.purchaseAsset() β€” the FINANCIER_ROLE pays the supplier directly in AED-S (MockStable), so title passes to the financier first (status Purchased).
  4. MurabahaFinancing.confirmDelivery() β€” the buyer confirms receipt, the trade becomes Delivered and the repayment clock starts.
  5. MurabahaFinancing.payInstallment() β€” the buyer or guarantor pays each due installment; missed payments add a late fee (latePenaltyBps) routed to the charity address, never to the financier. The last installment sets the trade to Settled.
  6. MurabahaFinancing.settleEarly() prepays the remaining installments with a rebate on the remaining markup; if missedInstallments exceed maxMissedInstallments, anyone may markDefault() and the financier may recover() the collected funds.
πŸ—Ί

Flow graph

1 Request trade MurabahaFinancing 2 Shariah approve MurabahaFinancing 3 Pay supplier MurabahaFinancing 4 Confirm delivery MurabahaFinancing 5 Pay installments MurabahaFinancing 6 Settled / defaulted MurabahaFinancing

Lifecycle: Requested β†’ Approved β†’ Purchased β†’ Delivered β†’ Repaying β†’ Settled / Defaulted. Every transition is validated by the MurabahaFinancing state machine; role checks come from AccessControl.