Skip to content

AtlasCrypt/HorizonCover-v1

Repository files navigation

HorizonCover

A decentralized parametric insurance engine providing instant, math-enforced payouts on the Stellar network.

License Rust Soroban

Join the Build: We are creating public-good DeFi infrastructure for the Stellar ecosystem. Whether you write Rust, TypeScript, or documentation, there is a place for you here. Check our open issues.


HorizonCover brings trustless, data-driven insurance to the blockchain. By connecting real-world API oracles to Soroban smart contracts, we eliminate the need for claims adjusters, turning months of bureaucratic waiting into a 3-second USDC settlement.

The Bureaucracy Problem

Traditional micro-insurance is fundamentally broken:

  • Prohibitive Overhead: The administrative cost of assessing a $500 crop loss makes the policy unviable for insurers.
  • Subjective Delays: Claims sit on human desks for 30–90 days, leaving vulnerable businesses without critical liquidity when disaster strikes.
  • Geographic Gatekeeping: Millions in developing regions are excluded from risk-hedging due to lack of local insurance infrastructure.

The HorizonCover Architecture

We replace trust with code:

  • Soroban Core Vaults: Secure pools holding USDC, utilizing Protocol 26's U256 checked arithmetic to guarantee absolute precision on every payout calculation.
  • Modular Oracles: Lightweight adapters that ping external APIs (like OpenWeather) and push deterministic data on-chain.
  • Monorepo Ecosystem: A unified workspace featuring a Next.js 14+ interface, shared TypeScript types, and a robust developer SDK.

Protocol Highlights

  • Zero-Claim Execution: Payouts are triggered automatically the moment an oracle condition (e.g., rainfall < 50mm) is met.
  • 🔒 Mathematical Guarantees: Soroban's native Yardstick math prevents any floating-point or rounding errors during financial distribution.
  • 💸 Micro-Fee Settlements: Leverage Stellar's low transaction costs to make $50 or $100 policies economically feasible.
  • 🛠️ Plug-and-Play Adapters: Developers can easily write new triggers for flight delays, earthquake magnitudes, or shipping logistics.

System Flow

graph LR
    subgraph "Real World Data"
        Weather[Weather APIs]
        Transit[Flight/Shipping APIs]
    end

    subgraph "HorizonCover Infrastructure"
        Adapters[Oracle Adapters<br/>Node.js / Rust]
        Vault((Soroban Vault<br/>Smart Contract))
    end

    subgraph "Settlement Layer"
        User[Policyholder Wallet]
        USDC[Circle USDC]
    end

    Weather --> Adapters
    Transit --> Adapters
    Adapters -- "Trigger condition met" --> Vault
    Vault -- "Calculates U256 Math" --> USDC
    USDC -- "Instant Payout" --> User

    style Vault fill:#0ea5e9,color:#fff
    style Adapters fill:#8b5cf6,color:#fff
    style USDC fill:#22c55e,color:#fff
Loading

Current Status: Phase 1 Complete ✅

We have successfully scaffolded the foundational monorepo and are now moving into the active Oracle Integration phase.

Completed Foundations:

  • ✅ Monorepo architecture (pnpm) established.
  • ✅ Core Vault contract written with P26 U256 math.
  • ✅ TypeScript SDK built for smart contract interactions.
  • ✅ Next.js Frontend with dynamic payout sandboxes and Stellar Wallets Kit.

🛠️ Open Bounties & Tasks

We are actively building our first real-world Oracle adapters. Jump in and help us cross the finish line:

  1. OpenWeather Node.js Adapter ☁️

    • Task: Build a backend cron-job that polls OpenWeather, formats millimeter data to U256, and invokes the Soroban contract.
    • Difficulty: Intermediate
  2. Logistics Oracle Concept ✈️

    • Task: Draft the architecture for a FlightAware API integration to trigger policies based on cargo delay hours.
    • Difficulty: Advanced
  3. Dashboard Enhancements 🖥️

    • Task: Expand the Next.js UI to read the Soroban RPC getEvents and display a user's historical payouts.
    • Difficulty: Easy

Local Development Quick Start

Prerequisites:

  • Rust 1.74+ | Soroban CLI (stellar-cli@26)
  • Node.js 20+ | pnpm 9+

1. Clone & Install

git clone https://github.com/AtlasCrypt/HorizonCover.git
cd HorizonCover
pnpm install

2. Run the UI locally

cp frontend/.env.example frontend/.env.local
pnpm dev

3. Compile Contracts

cd contracts/core
cargo build --target wasm32-unknown-unknown --release
stellar contract optimize --wasm ../../target/wasm32-unknown-unknown/release/horizon_cover_core.wasm

Project Structure

HorizonCover/
├── contracts/               # Soroban Smart Contracts
│   ├── core/                # The main insurance vault & payout logic
│   └── adapters/            # Data-trigger modules
├── frontend/                # Next.js Web Application
├── packages/                # Shared Libraries
│   ├── sdk/                 # TypeScript interaction SDK
│   └── types/               # Cross-repo TS definitions
└── docs/                    # Architecture and contributing guides

Contributing to HorizonCover

HorizonCover is built for the community, by the community.

To start contributing, browse the Issues tab for tasks tagged with good-first-issue or wave-task. We maintain a collaborative, open environment—simply comment on an issue to claim it, fork the repository, and submit a PR.

For detailed guidelines, see our Contributing Guide.


Developer & Ecosystem Resources

To ensure contributors have everything they need to build on HorizonCover, here is our curated resource directory:

Core Smart Contracts (Soroban)

Data & Oracle Integration

Connectivity & Off-Ramps (Public Good Focus)


License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgements & Ecosystem

This protocol is a proud participant in the Stellar Drips Wave and the broader open-source Soroban ecosystem. By combining decentralized Oracles with the raw speed of Stellar, we are proving that blockchain utility extends far beyond trading.

About

HorizonCover: An institutional-grade parametric insurance protocol for Stellar. Features a modular Soroban core (Protocol 26), automated weather/logistics adapters, and a high-performance TypeScript SDK for real-world risk automation.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors