/ Works

/ 2024

/ HAQQ Network Hackathon

Zapfir

Sharia-compliant takaful insurance that pools contributions to support students through financial crises, with the ledger on-chain so the pool is auditable.

/ Client

HAQQ Network Hackathon

/ Role

Full Stack Developer

/ Timeline

Aug 2024

/ Stack

HAQQ Network Finalist / Next.js / Solidity / Hardhat / TailwindCSS / Firebase / IPFS

Zapfir

About the project

/ Overview

Zapfir is a takaful — sharia-compliant — insurance dApp that pools contributions to support students through financial hardship, with the pool and its payouts recorded on-chain so participants can audit where the money went. Built for the HAQQ Network hackathon, where it placed as a finalist.

/ The Challenge

Takaful works on mutual guarantee: contributors underwrite each other rather than buy cover from an insurer, which makes trust in the pool the entire product. That trust is exactly what a conventional insurer asks you to take on faith, and for a student fund — small contributions, urgent claims, no institutional balance sheet behind it — faith is not available.

/ The Approach

Put the pool on a chain that is built for it. Contributions, membership and payouts are held in Solidity contracts on HAQQ, a network purpose-built for sharia-compliant finance, so the rules of the pool are the code rather than a policy document. Supporting documents go to IPFS so a claim's evidence is addressable without sitting in one company's database, and the front end is Next.js with Firebase carrying the parts that do not belong on-chain.

/ The Result

Finalist at the HAQQ Network hackathon, with a working pool: contribute, claim, and read the ledger back. The demonstration was that the transparency argument for takaful is testable rather than rhetorical.

/ What it took

  • The whole insurance lifecycle is on-chain across fourteen contract functions — register, underwrite, price, approve, collect premiums, issue a claim, verify it, pay out
  • Underwriting rules are data, not code paths: a base premium rate with minimum and maximum assured caps, so a new product is a rule rather than a redeploy
  • Premiums price in six per cent annual inflation rather than quoting a flat figure — the contract does the actuarial adjustment
  • Two plan durations and two payment intervals — lump sum or monthly, six or twelve months — with a two-plan cap per member
  • Claims carry a document hash, so the evidence is addressable off-chain while the claim itself is not
  • Solidity contracts on HAQQ holding the pool, its membership and its payouts — the rules of the fund are the code, not a policy document
  • Claim evidence on IPFS, so a document is addressable rather than sitting in one company's database
  • Hardhat for the contract suite; Next.js and Firebase for the parts that do not belong on-chain
  • Placed as a finalist at the HAQQ Network hackathon

/ Results and outcomes

HAQQ Network hackathon
Finalist
On-chain functions
14
Inflation priced in
6%