Murabahah Agreement implementation

Smart contract enforced Murabahah Agreement

This contract implements the AIBIM Corporate Murabahah Master Agreement

Key Components of the Murabahah Agreement:

  1. Purchase Transactions: The bank acts as an agent to purchase goods on behalf of the principal.

  2. Sale Transactions: The bank sells the goods to the principal at a marked-up price with deferred payment.

  3. Special Clauses: Early repayment, late repayment, termination, and force majeure provisions.

  4. Multi-Signature Framework: Allows both parties to perform certain actions, including liquidation.

  5. Liquidation: Allows for the liquidation of commodities, with controllable permissions.

Events

    // Events to log significant actions within the contract
    event PurchaseCommodity(address indexed bank, uint256 stableAmount);
    event DeclineOffer(address indexed principle, uint256 commodityAmount);
    event AcceptOffer(address indexed principle, uint256 commodityAmount);
    event SaleOfferSet(uint256 salePrice, uint256[] installmentAmounts, uint256[] installmentDueDates);
    event InstallmentCollected(address indexed principle, uint256 amountDue);
    event EarlyRepaymentRebateSet(uint256 rebateAmount);
    event EarlyRepaid(address indexed principle, uint256 amountPaid);
    event DefaultDeclared(address indexed bank, uint256 amountDue);

Financing Request submitted

Financing request of [Amount] using [Commodity] for Customer [Client ID] has been submitted

Commodity purchase completed

Commodity purchase completed: [Commodity Type] acquired

Murabaha sale offer prepared

Murabahah sale offer prepared for customer: [Commodity Type] with [Payment Terms]

Murabaha offer accepted by Customer

Customer accepted the Murabahah offer for [Commodity Type] with [Payment Terms]

Murabaha offer declined by Customer

Customer declined the Murabahah offer for [Commodity Type]

Installment payment received

Installment payment of [Amount] received for Murabahah contract [Contract ID]

Early repayment rebate calculated

Early repayment rebate of [Rebate Amount] calculated for Murabahah contract [Contract ID]

Murabaha contract repaid early

Murabahah contract [Contract ID] settled early with a payment of [Settlement Amount]

Customer default declared

Customer default declared on Murabahah contract [Contract ID]

Purchase Commodity

Initiates a Purchase Transaction (Clause 3 and Appendix 3) The principal requests the bank to purchase goods on their behalf

Set the terms of the offer

Initiates a Sale Transaction (Clause 5 and Appendix 3) The bank offers to sell the goods to the principal at a marked-up price

Accept Offer

Completes a Sale Transaction (implied by Clause 5.4) The bank transfers the sale price to the principal on the deferred payment date

Decline Offer

Collect Installments

Early Repayment

Early Settlement request (Appendix 8, Clause 1) The principal can request early settlement before the deferred payment date

Approve Early Settlement (Appendix 8, Clause 1) The bank can approve the early settlement request within 7 days

Declare Force Majeure Event (Clause 9.5)

Either party can declare a force majeure event - liquidation

TODO

Calculate Overdue Compensation Calculate Compensation for late payment (Appendix 8, Clause 2) Calculates the compensation amount based on the number of overdue days

Pay with Overdue Compensation Pay with Compensation for late payment (Appendix 8, Clause 2) The bank pays the sale price plus compensation for late payment

Terminate Agreement (Clause 7) Either party can terminate the agreement under certain conditions

Last updated