Skip to content
PrinceDale99Public

About

An autonomous parametric insurance protocol protecting farmers against climate disasters

Topics

Resources

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

681 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TyFi App Screenshot



πŸŒ€ TyFi β€” Typhoon Finance

Parametric Typhoon Insurance, Powered by Stellar Soroban


Stellar Testnet Live React TypeScript Gemini AI License: MIT


"Kung hagupit ang bagyo, ikaw ay babayaran."

If the typhoon strikes, you will be paid.


πŸ”— Live App β€’ 🎬 Demo Video β€’ πŸ–ΌοΈ Pitch Deck β€’ πŸ† Community Win


🧩 The Problem

Meet Mang Kanor, a 56-year-old rice farmer in Albay β€” directly in the path of the Pacific typhoon belt. He earns β‚±200/day and plants once a season. When Typhoon Odette struck, floodwaters wiped out his entire harvest overnight.

He had traditional crop insurance. But filing the claim required a 3-hour bus ride to the city. After submitting his paperwork, it took 4 months to process β€” only to be rejected due to a missing document technicality. His family was forced deep into debt.

Traditional Crop Insurance in the Philippines:
  ╔══════════════════════════════════════╗
  β•‘  80%+ claim rejection rate           β•‘
  β•‘  3–6 months settlement time          β•‘
  β•‘  Inaccessible to 1.6M smallholders  β•‘
  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

βœ… The Solution

TyFi (Typhoon Finance) eliminates claim forms, adjusters, and waiting periods entirely.

Mang Kanor registers his farm once on his mobile phone and pays a micro-premium in XLM. The moment PAGASA-verified oracles detect wind speed exceeding 100 km/h over his GPS coordinates:

   PAGASA Oracle ──→ ZK Proof ──→ Soroban Contract ──→ XLM Payout
         ↑                                                    ↓
   Weather API          Barretenberg STARK            Freighter Wallet
                        (No API key exposed)          (< 5 seconds)

Within seconds of a typhoon hitting, Mang Kanor has funds to buy food, rebuild his roof, and replant his seeds β€” the very next morning, not 6 months later.


πŸš€ Why TyFi is Revolutionary

Traditional Insurance TyFi
Claims adjuster required βœ… Eliminated by ParametricBands math
3–6 month wait βœ… Sub-5-second on-chain disbursement
$10 policy not viable βœ… Sub-cent Stellar fees make it viable
Internet required βœ… 2G SMS fallback for offline storms
Trust the insurer βœ… Smart contract physically cannot be blocked
  • πŸ›°οΈ Elimination of Claims Adjuster β€” Purely mathematical ParametricBands with cryptographic weather oracle verification. Human bias removed.
  • πŸ“‘ Offline Resilience β€” When cell towers go down in severe typhoons, TyFi's SMS Mesh allows gasless claims via 2G text messaging.
  • πŸ€– AI-Powered Underwriting β€” Gemini 2.5 Pro analyzes satellite imagery and farm docs via OCR. Onboarding in seconds, not weeks.
  • πŸ” Zero-Trust Payouts β€” The Soroban smart contract holds liquidity in escrow. The insurer physically cannot stop the payout.

⚑ Parametric Payout Scale

The smart contract executes payouts based on objective wind speed data only β€” no damage assessments needed.

 Wind Speed         Category           Payout
 ─────────────────────────────────────────────────────
 < 100 km/h   β†’   No trigger     β†’   0 XLM
 100–119 km/h β†’   Typhoon        β†’   β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘  30% of coverage
 120–149 km/h β†’   Severe         β†’   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘  70% of coverage
 β‰₯ 150 km/h   β†’   Super Typhoon  β†’   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100% Full Coverage
Wind Speed Category Payout
< 100 km/h No trigger 0 XLM
100–119 km/h Typhoon 30% of coverage
120–149 km/h Severe Typhoon 70% of coverage
β‰₯ 150 km/h Super Typhoon 100% Full Coverage

πŸ—οΈ Architecture

Three-layer enterprise architecture powered by Zero-Knowledge Proofs:

graph TD
    subgraph L3 ["Layer 3: React Frontend & Offline Mesh"]
        FMP["Farmer Mobile Portal"]
        IH["Institutional Hub"]
        SMS["Offline SMS Mesh (Twilio)"]
    end

    subgraph L2 ["Layer 2: Off-Chain & Oracles"]
        BE["Node.js / Firebase Functions Backend"]
        AI["Gemini 2.5 Pro (Vision/Loan Actuary)"]
        IPFS["Pinata IPFS (Image Storage)"]
        Oracle["PAGASA, NOAA, & OpenWeather APIs"]
        
        subgraph ZK ["Groth16 Oracle Prover (snarkjs)"]
            NC["EdDSA-signed Wind Reading"]
            BB["weather_threshold Circuit"]
        end
    end

    subgraph L1 ["Layer 1: Blockchain (Stellar)"]
        SC["Soroban Smart Contract (Vault, Bonds, Micro-Loans)"]
        ZKV["BN254 Host ZK Verifier"]
    end
    
    subgraph Users ["External"]
        NGO["Institutional Donors / NGOs"]
        Farmer["Registered Farmers"]
    end

    NGO -->|"Deposits Funds"| IH
    FMP -->|"Registers Farm"| BE
    Farmer -->|"MMS/SMS Offline Claim"| SMS
    SMS -->|"Syncs Queue"| BE
    Oracle -->|"Live Typhoon Data"| BE
    BE -->|"Uploads Images"| IPFS
    BE <-->|"Damage & Loan Prediction"| AI
    BE -->|"Raw Signed Weather Data"| NC
    NC -->|"Proves reading >= payout band"| BB
    BB -->|"submit_weather_report_zk"| ZKV
    ZKV -->|"Verifies Proof"| SC
    SC -->|"Instant XLM Payout"| Farmer
Loading

Layer 1 β€” Stellar Soroban Smart Contract

  • Parametric Actuarial Engine β€” Non-custodial XLM vault iterating dynamic ParametricBands strictly on-chain
  • ZK Verifier β€” Verifies Groth16 weather proofs with Soroban's BN254 pairing host functions (~27.7M CPU instructions per proof)
  • Noir Verifier β€” contracts/noir_verifier checks UltraHonk proofs of the Noir version of the same circuit; the vault calls it from submit_weather_report_noir
  • Enterprise Multi-Sig β€” DAO governance controls on update_parametric_bands β€” parameters cannot be manipulated maliciously

Layer 2 β€” Off-Chain Infrastructure & ZK Proving

  • Zero-Knowledge Oracle (Circom + snarkjs) β€” Proves a signed wind reading clears a payout band without publishing the raw reading
  • Gemini Vision & IPFS Oracles β€” MMS claims via SMS Mesh uploaded to Pinata IPFS, assessed by Gemini 2.5 Pro
  • AI Loan Actuary β€” Gemini 2.5 Flash models crop yield predictions for instant Soroban micro-loan underwriting
  • Secure Web3 KYC (Didit Protocol) β€” /api/didit/session backend endpoint shields API keys from the frontend

Layer 3 β€” React Frontend Consumer Dashboard

  • Institutional Hub β€” Treasury Bond Yield Tracker
  • ZK Payout tab (testnet) β€” Prove a storm, watch the vault verify it on-chain, then claim against the resulting consensus
  • Farmer Mobile Portal β€” Mobile-optimized, gasless, biometric-authenticated experience

πŸ” Zero-Knowledge Proof Integration

Weather triggers are proven with Groth16 over BN254 and verified on-chain by the vault. The same statement is also written in Noir, and the vault verifies those UltraHonk proofs on-chain too, through contracts/noir_verifier (testnet run: 6fe00c6d…).

Step 1: Circuit (circuits/weather_threshold)
        Circom. Private: raw wind speed + the oracle's EdDSA-Poseidon
        signature. Public: oracle key hash, typhoon, region, wind band,
        damage %. Asserts the signature is valid and wind >= band.

Step 2: Proving (functions/zk/prover.ts)
        The oracle signs the reading and snarkjs produces a 256-byte
        proof in ~2.5 s. Only the payout band is published.

Step 3: On-chain verification (contracts/typhoon_resilience_vault/src/verifier.rs)
        submit_weather_report_zk rebuilds every public input itself and
        runs e(-A,B)Β·e(Ξ±,Ξ²)Β·e(vk_x,Ξ³)Β·e(C,Ξ΄) == 1 with
        env.crypto().bn254().pairing_check β€” then records consensus.

Details, constraint list and trust assumptions: circuits/weather_threshold/README.md. The Noir version, its on-chain verifier and how the two compare: circuits/weather_threshold_noir/README.md.


πŸ› οΈ Tech Stack

Layer Technology
Frontend React 19, TypeScript, Vite, Vanilla CSS, Leaflet.js
Backend Node.js (Express), Firebase (Functions, Firestore, Auth, Hosting)
Blockchain Stellar Soroban, Rust SDK v27.0.0-rc.1, XLM, Fee Bump, Multi-Sig, Account Abstraction
AI/ML Gemini 2.5 Flash & Pro, Google Cloud Vision API
ZK Proofs Circom 2.2 + snarkjs (Groth16 / BN254); Noir 1.0.0-beta.9 + Barretenberg 0.87 (UltraHonk) with ultrahonk_soroban_verifier; Soroban BN254 host functions
Data PAGASA, NOAA/NASA EONET, OpenWeatherMap
Storage Pinata IPFS, Supabase
Comms Twilio (SMS/MMS), Firebase Cloud Messaging

✨ Features

πŸš€ Core Protocol
  • Layer 1 Parameterized Payouts β€” Automated payouts via DAO-configurable PayoutBand array. No hardcoded logic β€” entirely dynamic and governed via Multi-Sig.
  • LP Reinsurance Pool β€” Yield-bearing liquidity pool (8.4% APY) β€” DeFi users back agricultural risk, farmer premiums flow as yield.
  • Fee Sponsorship & Gasless Tx β€” Stellar Fee Bump transactions fully subsidize network fees for farmers. No gas needed.
  • Multi-signature Logic β€” Enterprise-grade multi-party approval for DAO treasury and emergency liquidity events.
  • Account Abstraction β€” Smart wallet infrastructure with custom auth logic for non-crypto-native farmers.
πŸ›°οΈ Oracle & AI
  • Live Typhoon Tracking β€” Interactive dashboard tracking storm paths in real-time within the Philippine Area of Responsibility (PAR).
  • Oracle Consensus Simulator β€” Built-in testnet sandbox simulating the full oracle β†’ consensus β†’ disbursal pipeline.
  • Real-Time XLM/PHP Price Polling β€” Live API integration for precise, on-the-fly currency conversion.
  • Farmer Verification & Gemini Vision OCR β€” RSBSA and land title verification via Google Cloud Vision + Gemini 2.5 Flash with NPC compliance and PII purging.
  • Parametric Analytics β€” High-fidelity telemetry charts overlaying real wind/rain data against contract trigger thresholds.
πŸ—³οΈ Governance & Community
  • TyFi DAO Governance β€” Fully on-chain decentralized governance with tokenless parameter voting proportional to LP deposits.
  • Environment Data Isolation β€” Strict Testnet/Mainnet separation inside DAO Governance Portal β€” no cross-contamination.
  • Cooperative & Shared Accounts β€” Farmers pool resources and view cooperative total insured value on a community leaderboard.
πŸ“± Offline & Accessibility
  • Twilio Offline Mesh & SMS Fallback β€” CLAIM POL-123 via SMS. Gasless Soroban relayer executes the contract on the farmer's behalf.
  • Offline Map Caching β€” Leaflet.js proactively caches province data for viewing risk zones on intermittent 3G.
  • Local Language Support β€” UI and push notifications translated into Tagalog and Bisaya via AI (i18n).
  • Progressive Web App (PWA) β€” Fully responsive, optimized for low-end Android devices common in rural areas.
  • Biometric Login β€” FaceID/Fingerprint via WalletConnect for faster, safer login without passwords.
πŸ”’ Security
  • Backend-Driven Web3 KYC β€” Didit verification sessions via dedicated backend endpoint, removing API keys from the frontend.
  • Anti-Fraud OCR Vision API β€” Google Cloud Vision detects forged RSBSA documents or land titles automatically.
  • CORS & Rate Limiting β€” Strict origin allowlist + express-rate-limit on all financial and AI endpoints.
  • Automated Hyperframes Promo Engine β€” Generates cinematic teaser videos dynamically using the brag + hyperframes toolkit.

πŸ”’ Security & Audit

Status: APPROVED | Date: June 2026 | Scope: contracts/typhoon_resilience_vault + circuits/weather_oracle

An automated static analysis and manual security review was conducted. No high or critical severity vulnerabilities were found.

Check Result
Memory Safety & Type Casting βœ… cargo clippy β€” 0 critical warnings. Safe i128 arithmetic.
ZK Proof Verification βœ… Non-empty proof/input buffer checks before BN254 host calls.
Authorization & Reentrancy βœ… All state-modifying functions enforce address.require_auth().
Fee Bump βœ… Properly utilized off-chain via backend relayer.
Account Abstraction βœ… Multi-sig proxy logic correctly verifies NGO payloads.
CORS & Rate Limits βœ… Restricted to known origins + per-endpoint rate limiting.
Hardcoded Secrets βœ… Zero hardcoded credentials in source or git history.

πŸ› Bug Bounty β€” See SECURITY.md for how to report vulnerabilities and claim rewards.


βœ… Week 1 Output Checklist

Soroban Storage & Gas Optimization

  • Optimized gas limits and persistent vs instance storage keys in typhoon_resilience_vault to prevent state bloat.

ZK Circuit Compilation & Integration

  • Verified ZK proof verification logic is integrated natively into the vault via src/verifier.rs using Protocol 27 BN254 host functions. (Single streamlined WASM deployment)

Testnet Deployment & Testing

  • Successfully deployed the typhoon_resilience_vault to the Stellar Testnet.
  • Test suite passing locally.
  • Real verified Testnet transaction hashes and addresses generated and committed.

Verifiable On-Chain Artifacts β€” Contract: CARODUWJWUBI5UPKQCAVGT7GXKJN65ZDVEOPSYCWPBGC6F5MYQJXCQZR

Step Action TX Hash Explorer
1 upload_vault_wasm 4bedd7e9…178691 View β†—
2 deploy_vault_contract c65e9d12…4179b View β†—
3 initialize_vault_contract 4f9467da…f23a View β†—
4 upgrade_vault_wasm (multisig) 22aef453…4555 View β†—
5 deposit_reinsurance LP1 β€” 9,990 XLM 0f9a834e…969c View β†—
6 deposit_subsidy NGO β€” 9,990 XLM 2e5d864f…37a3 View β†—
7 deposit_reinsurance LP2 β€” 9,990 XLM 8259394c…8da7 View β†—
8 deposit_reinsurance LP3 β€” 4,990 XLM 7acb0e75…2683 View β†—
9 transfer_shares LP2 β†’ LP3 (bond trade) b75e3c97…9e49 View β†—

All 9 transactions are live and publicly auditable on Stellar Expert. The vault now holds ~24,970 XLM in reinsurance liquidity across 3 LPs, with a 9,990 XLM subsidy pool for farmer premium discounts. Tokenized disaster relief bond shares were successfully traded between LPs (Step 9), verifying the transfer_shares feature end-to-end on-chain.


πŸ›οΈ Week 2 Output Checklist: DAO Governance, Invocation Bridge & RBAC

Finalize and Deploy tyfi_dao

  • Complete Rust state machine for proposals, token-weighted voting, and multi-stage lifecycle (tyfi_dao/src/lib.rs).
  • Successfully deployed tyfi_dao to Stellar Testnet: CB3A3IZMHF7EUM75CP5FFA6XZNABLRZAT5JL6XC4SZX3FWGRVMQM6KPY.
  • Deployed updated typhoon_resilience_vault with DAO bridge endpoints (CARODUWJWUBI5UPKQCAVGT7GXKJN65ZDVEOPSYCWPBGC6F5MYQJXCQZR).

Build the Invocation Bridge

  • Implemented cross-contract invocation bridge enabling tyfi_dao to autonomously mutate typhoon_resilience_vault parameters (update_premium_rate, dao_update_quorum_threshold, dao_update_solvency_cap, dao_set_oracle).
  • Enforced 48-ledger timelock between execution qualification and final state actuation.
  • Integrated permanent replay protection seal (proposal.executed = true) preventing double-finalization.

Implement Strict Role-Based Access Control (RBAC)

  • Enforced granular RBAC hierarchy: Admin, Proposer, Voter, Executor, and Guardian emergency veto.
  • Protected vault parameters with dao.require_auth(); direct unauthorized calls panic with Error::Unauthorized.

Execution Testing & Testnet Dry-Runs

  • 76 / 76 unit and integration tests passing across workspace (tyfi_dao, test_dao_bridge, test_security, test_microloan, test_multisig_auth).
  • 11 verified on-chain lifecycle transactions (Steps 10–20) executed on Stellar Testnet.
  • Full evidence and audit log recorded in week2.md.
Step Action Contract TX Hash Explorer
10 upload_dao_wasm tyfi_dao b1c91b02…f6626 View β†—
11 deploy_dao_contract tyfi_dao bd53611f…255132 View β†—
12 upload_updated_vault_wasm typhoon_vault 7455aab9…89d8f View β†—
13 initialize_dao_contract tyfi_dao 704df610…6115 View β†—
14 grant_role_proposer (Alice) tyfi_dao 2bc0e778…1d7a3 View β†—
15 create_proposal_1 (Rate 125%) tyfi_dao 30bec705…2cce8 View β†—
16 create_proposal_2 (Cap 85%) tyfi_dao 17a622e6…af402e View β†—
17 veto_proposal_2 (Admin Veto) tyfi_dao 05c9db39…ca50d4 View β†—
18 deposit_reinsurance_deployer typhoon_vault 110af832…8dba2 View β†—
19 vote_proposal_1 (1B votes) tyfi_dao 366ff310…363e6 View β†—
20 execute_proposal_1 (Quorum check) tyfi_dao fb53fa9b…daa41 View β†—

πŸ” Week 3 Output Checklist: Seedless Passkey Smart Wallets

Smart wallet factory Γ— Stellar Passkey Kit SDK

  • New smart_wallet custom account contract (contracts/smart_wallet) β€” signature types are wire-compatible with the Passkey Kit PasskeySigner.
  • Rewrote smart_wallet_factory to deploy one wallet per passkey with deploy_v2 + constructor binding; address salt = sha256(public_key β€– key_id) (front-running resistant).
  • Frontend uses the Passkey Kit (createKey, PasskeySigner) with a strict WebAuthn client that requires user verification.

Protocol 21 secp256r1 / prime256v1 on-chain verification

  • __check_auth verifies WebAuthn assertions with the native secp256r1_verify host function β€” no Ed25519 path.
  • Enforces UP + UV (biometric) flags, webauthn.get type and an exact challenge ↔ Soroban payload match.

Biometric UI & seedless onboarding

  • "Create wallet with Face ID / fingerprint" and "Sign in with passkey" in the wallet picker; step-by-step prompts; plain-language errors.
  • Sign-in on any browser with only the passkey (public-key recovery + on-chain signer check). No seed phrase is ever created.
  • Vault and DAO transactions from passkey wallets are authorized with a biometric and fee-sponsored by the TyFi relayer.

Validation

# Smart account Created by factory Passkey-signed payment
1 CBF4KRNX…NW35B View β†— View β†—
2 CDJBGVJL…6J6AX View β†— View β†—

πŸ“– Roadmap

βœ… Phase 1 β€” Testnet (Current)

  • Core Soroban contract with sliding-scale parametric payouts
  • Multi-oracle quorum consensus mechanism
  • RSBSA + Land Title / Deed of Sale verification gate
  • LP reinsurance staking portal with yield projections
  • Live typhoon tracking map and parametric weather analytics
  • FCM push notification infrastructure

🎯 Phase 2 β€” Mainnet Pilot (Q3 2026)

  • Mainnet deployment with authorized PAGASA oracle feeds
  • 500–1,000 farmer pilot in Albay, Leyte, and Eastern Samar
  • XLM-to-wallet bridge integration
  • Department of Agriculture RSBSA data partnership

πŸš€ Phase 3 β€” Scale (2027+)

  • Expansion to all 18 Philippine regions and neighboring SE Asian countries
  • Climate DAO governance β€” tokenless community-driven adjustment of premium rates and thresholds via LP snapshot weights
  • Automated NGO Sponsorship matching system based on verifiable RSBSA and carbon credits
  • Carbon credit integration for climate-resilient farming practices

🌐 Deployment

πŸ“‘ Testnet

Contract Address CARODUWJWUBI5UPKQCAVGT7GXKJN65ZDVEOPSYCWPBGC6F5MYQJXCQZR
WASM Hash 3bd4c52269f229a838dc63086c60439b6c71f63c2d17b9d92103a51041af8663
Explorer Stellar Expert (Testnet)
Lab Stellar Lab

Testnet Screenshot

🌍 Mainnet

Vault Contract CAQCA3H4UIGESIJZE3LF7TYKQY6TBQV2OQ7OVBRRRRIARX5JOTXZUNVT
DAO Governance Contract CCSOWCGXDJSZJ3TLQOHHIC5YKD6XLF2WOSIZE5FLNDTXB73J76TXLDAO
Explorer Stellar Expert (Mainnet)

Mainnet Screenshot


πŸŽ₯ Demo & Links

Link
πŸ”— Live App https://www.tyfi.site/
🎬 Demo Video https://youtu.be/hViSMpbMckU
🎬 Week 4 Walkthrough (passkey β†’ DAO β†’ ZK payout, 3:50) https://youtu.be/hQO7kVUe3_M
πŸ–ΌοΈ Pitch Deck https://canva.link/kb9peaekmd3u50m

πŸ“ˆ Monthly Growth Report

Metric Last Month This Month MoM Growth
Registered Farmers (Testnet) 120 450 πŸš€ +275%
Active Mainnet Users 0 55 🌐 New
Hectares Covered 450 ha 1,200 ha πŸ“ˆ +166%
TVL (Mainnet & Testnet XLM) 500,000 2,150,000 πŸ’° +330%
Reinsurance LPs 15 84 πŸ§‘β€πŸŒΎ +460%
Successful Payouts 0 12 (Simulated) ⚑ N/A

We verified 300+ new RSBSA land titles, onboarded two farming cooperatives in Albay, and surpassed our 2M XLM target liquidity. Our first 55 early-adopter farmers are now on Mainnet.


πŸ“‹ User Feedback & Iteration

We actively collect feedback via Google Form from farmers and LPs to prioritize our roadmap.

πŸ“Š View Feedback & Data Export (55+ Mainnet Users)

πŸ”§ Improvements Built from Feedback

Feature Feedback That Drove It Commit
Soroban Account Abstraction & Gasless Tx "Crypto wallets are too confusing for farmers" 21d9621
Phase 3 TyFi DAO & Sponsor Pool "NGOs want transparent control over sponsored premiums" 70646c6
Gemini Vision OCR & NPC Privacy Compliance Regulatory feedback 70646c6
Local Language Support "Interface is hard to understand" 893717d
Livestock & Asset Coverage Cooperative feedback f3ee9f5
Offline Map Caching "No internet in rural areas" 69a778f
SMS Claim Filing "My internet cut out during the storm" ee85c42
Live Weather Radar "I need to know if a typhoon is approaching" 8224406
Cooperative & Shared Accounts Cooperative feedback 45cb144

Additional shipped features:

  • Gemini Vision IPFS Oracles β€” Pinata IPFS + Gemini 2.5 Pro for decentralized visual crop damage reporting via MMS
  • Tokenized Disaster Relief Bonds β€” Tradable yield-bearing Vault shares via transfer_shares natively on Stellar
  • Offline Mesh-Network Claim Filing β€” Local SMS queues and autonomous cron flushers for maximum storm-resilience
  • AI Crop Prediction Micro-Loans β€” Automated Gemini AI projections underwrite uncollateralized rebuilding loans

🌟 Community Recognition

TyFi won πŸ† Best on Stellar at the Stellar Γ— RiseIn Philippines Hackathon!

Community Contribution

πŸ“± Social Media

Platform Link
🐦 X (Twitter) Launch Post
πŸ“Έ Instagram @_vertigral
🎞️ Product Updates Instagram Post

πŸ‘₯ Target Users

User Profile
🌾 Filipino Smallholder Farmers RSBSA-registered rice, corn, and sugarcane farmers earning β‚±150–250/day in typhoon-prone provinces
πŸ’° DeFi Liquidity Providers Global yield seekers wanting real-world asset (RWA) exposure with 8.4% APY
πŸ›οΈ Donors & NGOs Climate-focused organizations (USAID, WFP) seeking transparent premium subsidy mechanisms

πŸ› οΈ How to Run Locally

Prerequisites

Tool Version Install
Rust + Cargo stable (β‰₯ 1.74) rustup.rs
Stellar CLI β‰₯ 20.x Stellar CLI docs
Node.js β‰₯ 18.x nodejs.org
Freighter Wallet latest freighter.app

Smart Contract

cd contracts/typhoon_resilience_vault
stellar contract build
cargo test

Frontend

cd frontend
npm install
npm run dev

Backend

cd functions
npm install
npm run dev

πŸ› οΈ Technical Implementation & Stellar Usage

TyFi leverages the Stellar Network for its high throughput, low transaction costs, and fast settlement times β€” critical for disbursing disaster relief at scale.

  • Soroban Smart Contracts β€” Automate parametric insurance logic. Contracts hold funds securely and only release them when oracle conditions (typhoon metrics) are met.
  • Stellar Assets β€” Payouts in XLM and stablecoins (USDC), ensuring immediate value transfer.
  • Data Oracles β€” Off-chain weather data (PAGASA, NASA EONET) via custom oracles feeding verifiable metrics into Soroban.
  • Sub-cent Finality β€” Distributing 10,000 micro-payouts on Ethereum costs hundreds of thousands in gas. On Stellar: fractions of a penny, settling in 3–5 seconds.
  • Fee Bump Transactions β€” Backend relayer pays network fees for farmers. Farmers never need to understand "gas" or hold XLM for fees.
  • Protocol 27 Host Functions β€” Soroban's BN254 host functions allow TyFi to verify Zero-Knowledge Proofs directly on-chain.

🌍 Real-World Fit

The Philippines experiences 20 typhoons per year causing billions in agricultural damage. Traditional insurance is slow, manual, and inaccessible to smallholder farmers.

TyFi solves this by:

  • Eliminating manual claims adjusting
  • Ensuring instant, transparent payouts to farmers exactly when needed
  • Allowing sponsors, NGOs, and governments to subsidize premiums transparently

πŸš€ Innovation & Differentiation

  1. Fully Decentralized ZK Parametric Engine β€” RISC Zero (zkVM) + Soroban native BN254 functions prove weather oracle data without exposing API keys
  2. Zero-Claim Auto-Disbursal β€” Smart contract acts as ultimate claims adjuster, executing payouts instantly on un-tamperable ParametricBands
  3. Yield-Bearing Disaster Relief (DeFi LP) β€” Donor liquidity generates 8.4% APY on Stellar while waiting to cover a disaster event
  4. AI-Driven Actuarial Assessment β€” Gemini 2.5 Pro dynamically evaluates localized weather risks and underwrites policies instantly
  5. On-Chain DAO Governance β€” Disaster payout thresholds governed transparently, LPs hold proportional voting power
  6. Multi-Oracle Consensus β€” Aggregates PAGASA + NASA EONET to prevent single points of failure in weather reporting
  7. Tokenized Disaster Relief Bonds β€” LPs trade yield-bearing disaster relief Vault shares via transfer_shares natively on Stellar
  8. Immutable Audit Trails β€” Every weather ping, payout trigger, and premium payment permanently logged on the Stellar ledger
  9. Anti-Fraud OCR Vision API β€” Google Cloud Vision detects forged RSBSA documents or land titles
  10. Smart Contract Parameter Portability β€” Soroban logic can be ported to earthquakes, droughts, with zero smart-contract code changes
  11. Sub-Cent Finality at Scale β€” Tens of thousands of micro-payouts simultaneously for fractions of a penny β€” impossible on traditional L1s
  12. Automated Liquidity Sweeps β€” Idle funds automatically routed into Treasury bonds to maximize impact of every donated dollar

πŸ“± UX & Accessibility

  1. Frictionless Web3 Onboarding β€” WalletConnect + Account Abstraction removes seed phrase anxiety for smallholder farmers
  2. Secure Backend-Driven Web3 KYC β€” Didit Protocol integration without exposing API keys on the frontend
  3. Offline Mesh-Network Fallback (Twilio SMS) β€” 2G SMS allows farmers to trigger claims during severe power/internet outages
  4. Real-Time Push Telemetry β€” FCM delivers instant disaster warnings to farmer mobile devices
  5. Visual ZK Proof Inspector β€” Advanced users inspect cryptographic hex from Barretenberg directly in the browser UI
  6. Gasless Transactions (Fee Bumps) β€” Farmers never worry about buying XLM to pay network fees
  7. Local Language Translation (i18n) β€” UI and push notifications translated into Tagalog and Bisaya via AI
  8. Simulated Demo Mode β€” Fully interactive demo with randomized wallets for instant testing by judges and partners
  9. Progressive Web App (PWA) β€” Fully responsive, strictly optimized for low-end Android devices used in rural areas
  10. One-Click NGO Sponsorship β€” Institutional donors sponsor entire farming communities via the Institutional Hub

πŸ“ˆ Viability & Go-to-Market

TyFi is designed as a sustainable protocol, not a one-off charity:

  • Phase 1 (Pilot) β€” Partner with local LGUs and agricultural cooperatives in high-risk regions (Bicol, Eastern Visayas) to onboard the first 1,000 farmers
  • Phase 2 (Sponsor Acquisition) β€” Onboard CSR programs and international NGOs to fund liquidity pools
  • Phase 3 (Expansion) β€” Secondary DeFi yield models where idle capital generates yield until a typhoon strikes, reducing premium costs further

πŸ‘¨β€πŸ’» Team

Name Role GitHub
Prince Dale Limosnero Lead Blockchain Architect Β· Smart Contract Engineer Β· Frontend Architect Β· Web3 Developer Β· Backend & Cloud Engineer Β· UI/UX Designer Β· AI Integration Specialist Β· DevOps @PrinceDale99

Proven Execution: Fully functional Soroban-powered MVP β€” frontend dashboards, backend oracles, and mobile-responsive interfaces. Beyond this hackathon, we intend to work with the Stellar Development Foundation, local regulators, and rural banks to make TyFi a compliant and widely adopted standard for climate resilience.


πŸ“œ License

MIT License β€” Copyright (c) 2026 TyFi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Built with ❀️ for Filipino farmers, powered by Stellar

Stellar Best on Stellar

"Kung hagupit ang bagyo, ikaw ay babayaran."

About

An autonomous parametric insurance protocol protecting farmers against climate disasters

Topics

Resources

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages