Most people in East Africa don't have a bank account. But almost everyone has a phone, a mobile money wallet, and a chama — a savings group they run with friends, family, or colleagues.
TotiFi is built for those people.
It's a Web3 financial platform that connects M-Pesa and Airtel Money to the Hedera blockchain. You can apply for a loan, run a savings group, earn crypto rewards, and manage your money — all without ever walking into a bank. Your Hedera wallet is your identity. Your on-chain history is your credit score.
The name comes from toti — Swahili slang for money. That's the energy.
We looked at a lot of blockchains. Hedera won for three reasons:
- Fast enough for real life — transactions confirm in 3–5 seconds. Nobody waits.
- Cheap enough for small amounts — fees are fractions of a cent. Sending 50 KES worth of HBAR doesn't cost 50 KES in gas.
- Predictable — fixed USD-denominated fees. No gas wars, no surprises.
We use Hedera's native token service (HTS) for loan NFTs and TOTI reward tokens, the consensus service (HCS) as an immutable audit trail for every loan and chama event, and Solidity smart contracts for group savings logic.
No username. No password. Connect HashPack or any WalletConnect wallet and you're in. Your Hedera account ID is your identity across the whole platform.
Apply in minutes. Pick an amount, a purpose, and a repayment period. If you need a guarantor, invite them by their Hedera account ID — they get a notification, review the terms, and confirm on-chain. No paperwork. No notaries. Every state change (applied → approved → disbursed → repaid) is recorded on Hedera's consensus service and can never be altered.
Chamas are rotating savings groups — a cornerstone of Kenyan financial culture. TotiFi brings them on-chain. Create a group, set a contribution amount in HBAR, define the payout order, and invite members. Every contribution and payout is enforced by a smart contract and recorded on HCS. Transparent, tamper-proof, and automatic.
TOTI is TotiFi's reward token on Hedera (token ID: 0.0.8348876). You earn it for doing things that build financial health:
| Action | Reward |
|---|---|
| Complete KYC | 100 TOTI |
| Apply for a loan | 50 TOTI |
| Repay on time | 25 TOTI |
| Join a chama | 30 TOTI |
| Refer a friend | 75 TOTI |
One claim per 24 hours. TOTI is a real HTS fungible token — you can hold it, trade it on SaucerSwap, or use it in-app for fee discounts.
Swap between Kenyan shillings and HBAR or USDT directly from the app. Enter your Safaricom or Airtel number, pick a direction, and get a live quote with fees broken down before you confirm. Rates update in real time. Quotes expire after 60 seconds.
- M-Pesa fee: 1.5%
- Airtel Money fee: 1.2%
- Supported numbers:
07xx,01xx,+2547xx,+2541xx
Every disbursed loan is minted as a TOTI-LOAN NFT on Hedera. This makes loans tradeable assets — lenders can sell loan positions on the secondary market, and borrowers build a verifiable on-chain credit history that follows them forever.
TotiFi is governed by its community. Any TOTI holder can submit a proposal — fee changes, new collateral types, protocol upgrades. Voting is on-chain, proportional to token holdings, and fully auditable. An AI assistant analyzes each proposal and gives you a plain-English breakdown before you vote.
- Node.js 18+
- Angular CLI 21+
- A HashPack wallet on Hedera testnet
git clone https://github.com/your-org/toti-fi.git
cd toti-fi
npm installTotiFi runs as two separate processes:
| Process | Command | Port | What it does |
|---|---|---|---|
| Angular dev server | ng serve |
4200 | Frontend with hot reload |
| API + SSR server | npm run start:api |
4000 | Hedera SDK, all /api/* routes |
Quick start (build once, then run both):
# Terminal 1 — build and start the API server
npm run dev
# Terminal 2 — start the Angular dev server with hot reload
ng serveOr just the API server (after a build):
npm run build:dev # build once
npm run start:api # start the API serverWatch mode (rebuilds on file changes, then restart the API server manually):
npm run build:watch # rebuilds on every save
# in another terminal:
npm run start:apinpm run build:prod
npm run serve:ssrnpm run contracts:compile # compile Solidity with Hardhat
npm run contracts:deploy # deploy to Hedera testnet
npm run contracts:build # compile + deploy in one step| Script | What it does |
|---|---|
npm start |
Angular dev server (frontend only, port 4200) |
npm run dev |
Build dev + start API server (port 4000) |
npm run build:dev |
One-time development build |
npm run build:prod |
Production build |
npm run build:watch |
Rebuild on every file save |
npm run start:api |
Start the API/SSR server (requires a prior build) |
npm run serve:ssr |
Alias for start:api |
npm run test |
Run unit tests once (no watch) |
npm run lint |
Lint the codebase |
npm run contracts:compile |
Compile Solidity contracts |
npm run contracts:deploy |
Deploy contracts to Hedera testnet |
src/
├── app/
│ ├── core/
│ │ ├── guards/ # walletGuard, kycGuard
│ │ ├── models/ # User, Loan, Chama, CreditRating
│ │ └── services/ # Hedera, WalletConnect, AI, Mirror Node
│ ├── features/
│ │ ├── ai-assistant/ # Floating chat assistant
│ │ ├── auth/ # Wallet connect flow
│ │ ├── bridge/ # HBAR/USDT transfer + mobile money
│ │ ├── chama/ # Savings groups
│ │ ├── credit-rating/ # On-chain credit score
│ │ ├── dao/ # DAO governance
│ │ ├── dashboard/ # User + official dashboards
│ │ ├── guarantor/ # Guarantor confirmation flow
│ │ ├── kyc/ # KYC verification
│ │ ├── loans/ # Application, dashboard, repayments
│ │ ├── mobile-money/ # M-Pesa / Airtel ↔ HBAR/USDT
│ │ ├── profile/ # Web3 profile + IPFS documents
│ │ ├── stablecoins/ # Stablecoin swap
│ │ └── tokens/ # TOTI token hub (NFT + rewards)
│ ├── layout/ # Nav shell
│ └── shared/ # Glass card, tx viewer, toasts
├── server/ # Express API routes (Hedera SDK lives here)
└── main.server.config.ts # All server config — no process.env
| Layer | Technology |
|---|---|
| Frontend | Angular 21, TypeScript 5.9, Angular Material |
| Blockchain | Hedera Hashgraph — HTS, HCS, Smart Contracts |
| Wallet | HashConnect 3, WalletConnect, Hedera Wallet Connect |
| Smart Contracts | Solidity + Hardhat |
| Storage | IPFS via Pinata (KYC docs, loan snapshots, chama records) |
| AI | Hedera AI Agent Service, Google Gemini |
| Server | Angular SSR + Express 5 |
| Testing | Jasmine, Karma, fast-check (property-based) |
| Network | Hedera Testnet |
| Operator | 0.0.3745354 |
| TOTI Token | 0.0.8348876 |
| Mirror Node | https://testnet.mirrornode.hedera.com |
| HashScan | https://hashscan.io/testnet |
| Frontend | https://toti-fi.web.app |
Every blockchain transaction shows a live bottom sheet:
- Initiating — building and signing the transaction
- Submitted — broadcast to the Hedera network
- Confirmed — receipt received, serial/sequence numbers shown
You get the real Hedera transaction ID (0.0.XXXXX@timestamp.nanos), a direct HashScan link, and an embedded explorer view once confirmed. It auto-dismisses after 12 seconds on success.
- Mainnet deployment
- Real M-Pesa STK push (Safaricom Daraja API)
- Real Airtel Money API
- Mobile app (Capacitor)
- Swahili language support
- Group loans and emergency funds in chamas
- Credit bureau integration for hybrid scoring
- Loan marketplace with secondary trading UI
MIT — see LICENSE.
Built with ❤️ in Nairobi. Powered by Hedera.
